Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2017-02-11 13:52:27 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2017-02-11 13:52:27 +0300
commitff50d83d1e27b98fa17adc8798d0f1b95b887d9a (patch)
treec75eefe858d085d60364fd36cf2413b827605e3c
parentf77e6d93acb18713c7a4fd08e8a4a0d27e06bcbc (diff)
6.1.0.1 releasev6.1.0.1
Former-commit-id: a8227cfe41f2a2bbc859f3fc5c4b353c8aa41544
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--war/cache.manifest2
-rw-r--r--war/js/app.min.js150
-rw-r--r--war/js/atlas-viewer.min.js840
-rw-r--r--war/js/atlas.min.js18
-rw-r--r--war/js/diagramly/App.js15
-rw-r--r--war/js/diagramly/EditorUi.js33
-rw-r--r--war/js/diagramly/GitHubClient.js13
-rw-r--r--war/js/diagramly/GitHubFile.js11
-rw-r--r--war/js/embed-static.min.js2
-rw-r--r--war/js/reader.min.js2
-rw-r--r--war/js/viewer.min.js836
13 files changed, 976 insertions, 954 deletions
diff --git a/ChangeLog b/ChangeLog
index 3537e02f..417d4f94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+11-FEB-2017: 6.1.0.1
+
+- Fixes overwrite of GitHub files
+- Fixes default values in GitHub dialog
+- Fixes initial save for graphics formats
+
11-FEB-2017: 6.1.0.0
- Fixes HTML export
diff --git a/VERSION b/VERSION
index 808c78ca..78d98471 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-6.1.0.0 \ No newline at end of file
+6.1.0.1 \ No newline at end of file
diff --git a/war/cache.manifest b/war/cache.manifest
index 8239b82c..0bdf6794 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 02/11/2017 09:23 AM
+# 02/11/2017 11:43 AM
/app.html
/index.html?offline=1
diff --git a/war/js/app.min.js b/war/js/app.min.js
index fe09a2b3..ba74acdc 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -79,11 +79,11 @@ frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h
li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};u.ELEMENT_DOM_INTERFACES=u.Q;u.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};u.ueffects=u.P;u.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);b=function(b){function e(a,b){var d;if(N.hasOwnProperty(b))d=N[b];else{var c=b.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=b.match($))?String.fromCharCode(parseInt(c[1],
-16)):J&&O.test(b)?(J.innerHTML="\x26"+b+";",c=J.textContent,N[b]=c):"\x26"+b+";"}return d}function g(a){return a.replace(X,e)}function k(a){return(""+a).replace(da,"\x26amp;").replace(Z,"\x26lt;").replace(aa,"\x26gt;").replace(Y,"\x26#34;")}function l(a){return a.replace(U,"\x26amp;$1").replace(Z,"\x26lt;").replace(aa,"\x26gt;")}function m(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,
+u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);b=function(b){function e(a,b){var d;if(O.hasOwnProperty(b))d=O[b];else{var c=b.match(M);d=c?String.fromCharCode(parseInt(c[1],10)):(c=b.match($))?String.fromCharCode(parseInt(c[1],
+16)):J&&N.test(b)?(J.innerHTML="\x26"+b+";",c=J.textContent,O[b]=c):"\x26"+b+";"}return d}function g(a){return a.replace(X,e)}function k(a){return(""+a).replace(da,"\x26amp;").replace(Z,"\x26lt;").replace(aa,"\x26gt;").replace(Y,"\x26#34;")}function l(a){return a.replace(U,"\x26amp;$1").replace(Z,"\x26lt;").replace(aa,"\x26gt;")}function m(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,
e){var c,g=/(<\/|<\!--|<[!?]|[&<>])/g;c=a+"";if(ha)c=c.split(g);else{for(var k=[],l=0,n;(n=g.exec(c))!==f;)k.push(c.substring(l,n.index)),k.push(n[0]),l=n.index+n[0].length;k.push(c.substring(l));c=k}u(b,c,0,{r:d,C:d},e)}}function p(a,b,d,e,c){return function(){u(a,b,d,e,c)}}function u(a,d,e,f,g){try{a.H&&0==e&&a.H(g);for(var k,l,n,m=d.length;e<m;){var s=d[e++],t=d[e];switch(s){case "\x26":fa.test(t)?(a.e&&a.e("\x26"+t,g,ba,p(a,d,e,f,g)),e++):a.e&&a.e("\x26amp;",g,ba,p(a,d,e,f,g));break;case "\x3c/":if(k=
-/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===t.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,ba,p(a,d,e,f,g));else{var A=d,z=e,y=a,F=g,D=ba,E=f,I=q(A,z);I?(y.t&&y.t(I.name,F,D,p(y,A,z,E,F)),e=I.next):e=A.length}else a.e&&a.e("\x26lt;/",g,ba,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,ba,p(a,d,e,f,g));var B=b.f[n];B&ca&&(e=v(d,{name:n,next:e,c:B},a,g,ba,f))}else{var A=d,z=a,y=
-g,F=ba,D=f,N=q(A,e);N?(z.w&&z.w(N.name,N.R,y,F,p(z,A,N.next,D,y)),e=N.c&ca?v(A,N,z,y,F,D):N.next):e=A.length}else a.e&&a.e("\x26lt;",g,ba,p(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var S=d.slice(e,l).join("");a.A(S.substr(0,S.length-2),g,ba,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,ba,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(t)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
+/^([-\w:]+)[^\'\"]*/.exec(t))if(k[0].length===t.length&&"\x3e"===d[e+1])e+=2,n=k[1].toLowerCase(),a.t&&a.t(n,g,ba,p(a,d,e,f,g));else{var A=d,z=e,y=a,F=g,D=ba,E=f,I=q(A,z);I?(y.t&&y.t(I.name,F,D,p(y,A,z,E,F)),e=I.next):e=A.length}else a.e&&a.e("\x26lt;/",g,ba,p(a,d,e,f,g));break;case "\x3c":if(k=/^([-\w:]+)\s*\/?/.exec(t))if(k[0].length===t.length&&"\x3e"===d[e+1]){e+=2;n=k[1].toLowerCase();a.w&&a.w(n,[],g,ba,p(a,d,e,f,g));var O=b.f[n];O&ca&&(e=v(d,{name:n,next:e,c:O},a,g,ba,f))}else{var A=d,z=a,y=
+g,F=ba,D=f,B=q(A,e);B?(z.w&&z.w(B.name,B.R,y,F,p(z,A,B.next,D,y)),e=B.c&ca?v(A,B,z,y,F,D):B.next):e=A.length}else a.e&&a.e("\x26lt;",g,ba,p(a,d,e,f,g));break;case "\x3c!--":if(!f.C){for(l=e+1;l<m&&!("\x3e"===d[l]&&/--$/.test(d[l-1]));l++);if(l<m){if(a.A){var S=d.slice(e,l).join("");a.A(S.substr(0,S.length-2),g,ba,p(a,d,l+1,f,g))}e=l+1}else f.C=c}f.C&&a.e&&a.e("\x26lt;!--",g,ba,p(a,d,e,f,g));break;case "\x3c!":if(/^\w/.test(t)){if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;!",
g,ba,p(a,d,e,f,g))}else a.e&&a.e("\x26lt;!",g,ba,p(a,d,e,f,g));break;case "\x3c?":if(!f.r){for(l=e+1;l<m&&"\x3e"!==d[l];l++);l<m?e=l+1:f.r=c}f.r&&a.e&&a.e("\x26lt;?",g,ba,p(a,d,e,f,g));break;case "\x3e":a.e&&a.e("\x26gt;",g,ba,p(a,d,e,f,g));break;case "":break;default:a.e&&a.e(s,g,ba,p(a,d,e,f,g))}}a.B&&a.B(g)}catch(T){if(T!==ba)throw T;}}function v(a,d,e,c,f,g){var k=a.length;ga.hasOwnProperty(d.name)||(ga[d.name]=RegExp("^"+d.name+"(?:[\\s\\/]|$)","i"));for(var n=ga[d.name],m=d.next,u=d.next+1;u<
k&&!("\x3c/"===a[u-1]&&n.test(a[u]));u++);u<k&&(u-=1);k=a.slice(m,u).join("");if(d.c&b.c.CDATA)e.z&&e.z(k,c,f,p(e,a,u,g,c));else if(d.c&b.c.RCDATA)e.F&&e.F(l(k),c,f,p(e,a,u,g,c));else throw Error("bug");return u}function q(a,e){var f=/^([-\w:]+)/.exec(a[e]),k={};k.name=f[1].toLowerCase();k.c=b.f[k.name];for(var l=a[e].substr(f[0].length),n=e+1,m=a.length;n<m&&"\x3e"!==a[n];n++)l+=a[n];if(!(m<=n)){for(var p=[];""!==l;)if(f=S.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],u=d,l=[l,a[n++]];n<
m;n++){if(u){if("\x3e"===a[n])break}else 0<=a[n].indexOf(f)&&(u=c);l.push(a[n])}if(m<=n)break;l=l.join("")}else{var u=f[1].toLowerCase(),v;if(f[2]){v=f[3];var s=v.charCodeAt(0);if(34===s||39===s)v=v.substr(1,v.length-2);v=g(v.replace(R,""))}else v="";p.push(u,v);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");k.R=p;k.next=n+1;return k}}function s(e){function c(a,b){l||b.push(a)}var g,l;return m({startDoc:function(){g=[];l=d},startTag:function(d,c,n){if(!l&&b.f.hasOwnProperty(d)){var m=
@@ -92,7 +92,7 @@ m&b.c.EMPTY&&!(p&b.c.EMPTY)&&n.push("\x3c/",u,"\x3e")}else l=!(m&b.c.EMPTY)}}},e
pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;g.length;g.length--)a.push("\x3c/",g[g.length-1].v,"\x3e")}})}function t(a,b,d,e,c){if(!c)return f;try{var g=n.parse(""+a);if(g&&(!g.K()||ja.test(g.W()))){var k=c(g,b,d,e);return k?k.toString():f}}catch(l){}return f}function L(a,b,d,e,c){d||a(b+" removed",{S:"removed",tagName:b});if(e!==c){var f="changed";e&&!c?f="removed":!e&&c&&(f="added");a(b+"."+d+" "+f,{S:f,tagName:b,la:d,oldValue:e,newValue:c})}}function P(a,b,d){b=b+"::"+d;if(a.hasOwnProperty(b))return a[b];
b="*::"+d;if(a.hasOwnProperty(b))return a[b]}function W(d,e,c,g,k){for(var l=0;l<e.length;l+=2){var n=e[l],m=e[l+1],p=m,u=f,v;if((v=d+"::"+n,b.m.hasOwnProperty(v))||(v="*::"+n,b.m.hasOwnProperty(v)))u=b.m[v];if(u!==f)switch(u){case b.d.NONE:break;case b.d.SCRIPT:m=f;k&&L(k,d,n,p,m);break;case b.d.STYLE:if("undefined"===typeof E){m=f;k&&L(k,d,n,p,m);break}var q=[];E(m,{declaration:function(a,d){var e=a.toLowerCase();T(e,d,c?function(a){return t(a,b.P.ja,b.M.ka,{TYPE:"CSS",CSS_PROP:e},c)}:f);d.length&&
q.push(e+": "+d.join(" "))}});m=0<q.length?q.join(" ; "):f;k&&L(k,d,n,p,m);break;case b.d.ID:case b.d.IDREF:case b.d.IDREFS:case b.d.GLOBAL_NAME:case b.d.LOCAL_NAME:case b.d.CLASSES:m=g?g(m):m;k&&L(k,d,n,p,m);break;case b.d.URI:m=t(m,P(b.J,d,n),P(b.I,d,n),{TYPE:"MARKUP",XML_ATTR:n,XML_TAG:d},c);k&&L(k,d,n,p,m);break;case b.d.URI_FRAGMENT:m&&"#"===m.charAt(0)?(m=m.substring(1),m=g?g(m):m,m!==f&&m!==a&&(m="#"+m)):m=f;k&&L(k,d,n,p,m);break;default:m=f,k&&L(k,d,n,p,m)}else m=f,k&&L(k,d,n,p,m);e[l+1]=
-m}return e}function V(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:W(f,g,d,e,c)}}}function Q(a,b){var d=[];s(b)(a,d);return d.join("")}var E,T;"undefined"!==typeof window&&(E=window.parseCssDeclarations,T=window.sanitizeCssProperty);var N={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,$=/^#x([0-9A-Fa-f]+)$/,O=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+m}return e}function V(d,e,c){return function(f,g){if(b.f[f]&b.c.UNSAFE)c&&L(c,f,a,a,a);else return{attribs:W(f,g,d,e,c)}}}function Q(a,b){var d=[];s(b)(a,d);return d.join("")}var E,T;"undefined"!==typeof window&&(E=window.parseCssDeclarations,T=window.sanitizeCssProperty);var O={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},M=/^#(\d+)$/,$=/^#x([0-9A-Fa-f]+)$/,N=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
f,R=/\0/g,X=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,fa=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,da=/&/g,U=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,aa=/>/g,Y=/\"/g,S=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ha=3==="a,b".split(/(,)/).length,ca=b.c.CDATA|b.c.RCDATA,ba={},ga={},ja=/^(?:https?|mailto|data)$/i,ea={};ea.pa=ea.escapeAttrib=k;ea.ra=ea.makeHtmlSanitizer=s;ea.sa=ea.makeSaxParser=m;ea.ta=ea.makeTagPolicy=V;ea.wa=ea.normalizeRCData=l;ea.xa=
ea.sanitize=function(a,b,d,e){return Q(a,V(b,d,e))};ea.ya=ea.sanitizeAttribs=W;ea.za=ea.sanitizeWithPolicy=Q;ea.Ba=ea.unescapeEntities=g;return ea}(u);g=b.sanitize;"undefined"!==typeof window&&(window.html=b,window.html_sanitize=g)})();!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function c(f,d,b){function e(k,n){if(!d[k]){if(!f[k]){var m="function"==typeof require&&require;if(!n&&m)return m(k,!0);if(g)return g(k,!0);m=Error("Cannot find module '"+k+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[k]={exports:{}};
f[k][0].call(m.exports,function(b){var d=f[k][1][b];return e(d?d:b)},m,m.exports,c,f,d,b)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<b.length;k++)e(b[k]);return e}({1:[function(c,f,d){function b(d){if(!(this instanceof b))return new b(d);d=this.options=k.assign({level:t,method:v,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},d||{});d.raw&&0<d.windowBits?d.windowBits=-d.windowBits:d.gzip&&0<d.windowBits&&16>d.windowBits&&(d.windowBits+=16);this.err=0;this.msg=
@@ -123,10 +123,10 @@ b.lookahead<X&&d===H)return U;if(0===b.lookahead)break}if(e=0,b.lookahead>=J&&(b
J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;c=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,e=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=J-1,b.strstart++,c&&(k(b,!1),0===b.strm.avail_out))return U}else if(b.match_available){if(c=D._tr_tally(b,0,
b.window[b.strstart-1]),c&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return U}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,d===G?(k(b,!0),0===b.strm.avail_out?aa:Y):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?U:Z}function q(b,d,e,c,f){this.good_length=b;this.max_lazy=d;this.nice_length=e;this.max_chain=c;this.func=f}function v(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Q;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
-this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new z.Buf16(2*$);this.dyn_dtree=new z.Buf16(2*(2*N+1));this.bl_tree=new z.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(O+1);this.heap=new z.Buf16(2*T+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*T+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new z.Buf16(2*$);this.dyn_dtree=new z.Buf16(2*(2*O+1));this.bl_tree=new z.Buf16(2*(2*M+1));e(this.dyn_ltree);e(this.dyn_dtree);e(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(N+1);this.heap=new z.Buf16(2*T+1);e(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*T+1);e(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
this.lit_bufsize=this.l_buf=0}function u(d){var e;return d&&d.state?(d.total_in=d.total_out=0,d.data_type=V,e=d.state,e.pending=0,e.pending_out=0,0>e.wrap&&(e.wrap=-e.wrap),e.status=e.wrap?fa:da,d.adler=2===e.wrap?0:1,e.last_flush=H,D._tr_init(e),I):b(d,K)}function x(b){var d=u(b);d===I&&(b=b.state,b.window_size=2*b.w_size,e(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return d}function A(d,e,c,f,g,k){if(!d)return K;var l=1;if(e===L&&(e=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>g||g>E||c!==Q||8>f||15<f||0>e||9<e||0>k||k>W)return b(d,K);8===f&&(f=9);var n=new v;return d.state=n,n.strm=d,n.wrap=l,n.gzhead=null,n.w_bits=f,n.w_size=1<<n.w_bits,n.w_mask=n.w_size-1,n.hash_bits=g+7,n.hash_size=1<<n.hash_bits,n.hash_mask=n.hash_size-1,n.hash_shift=~~((n.hash_bits+J-1)/J),n.window=new z.Buf8(2*
-n.w_size),n.head=new z.Buf16(n.hash_size),n.prev=new z.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new z.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,x(d)}var y,z=c("../utils/common"),D=c("./trees"),B=c("./adler32"),C=c("./crc32"),F=c("./messages"),H=0,G=4,I=0,K=-2,L=-1,P=1,W=4,V=2,Q=8,E=9,T=286,N=30,M=19,$=2*T+1,O=15,J=3,R=258,X=R+J+1,fa=42,da=113,U=1,Z=2,aa=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
+n.w_size),n.head=new z.Buf16(n.hash_size),n.prev=new z.Buf16(n.w_size),n.lit_bufsize=1<<g+6,n.pending_buf_size=4*n.lit_bufsize,n.pending_buf=new z.Buf8(n.pending_buf_size),n.d_buf=1*n.lit_bufsize,n.l_buf=3*n.lit_bufsize,n.level=e,n.strategy=k,n.method=c,x(d)}var y,z=c("../utils/common"),D=c("./trees"),B=c("./adler32"),C=c("./crc32"),F=c("./messages"),H=0,G=4,I=0,K=-2,L=-1,P=1,W=4,V=2,Q=8,E=9,T=286,O=30,M=19,$=2*T+1,N=15,J=3,R=258,X=R+J+1,fa=42,da=113,U=1,Z=2,aa=3,Y=4;y=[new q(0,0,0,0,function(b,d){var e=
65535;for(e>b.pending_buf_size-5&&(e=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&d===H)return U;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var c=b.block_start+e;if((0===b.strstart||b.strstart>=c)&&(b.lookahead=b.strstart-c,b.strstart=c,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-X&&(k(b,!1),0===b.strm.avail_out))return U}return b.insert=0,d===G?(k(b,!0),0===b.strm.avail_out?aa:Y):(b.strstart>b.block_start&&k(b,!1),U)}),new q(4,4,8,
4,s),new q(4,5,16,8,s),new q(4,6,32,32,s),new q(4,4,16,16,t),new q(8,16,32,32,t),new q(8,16,128,128,t),new q(8,32,128,256,t),new q(32,128,258,1024,t),new q(32,258,258,4096,t)];d.deflateInit=function(b,d){return A(b,d,Q,15,8,0)};d.deflateInit2=A;d.deflateReset=x;d.deflateResetKeep=u;d.deflateSetHeader=function(b,d){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=d,I):K};d.deflate=function(d,c){var f,m,u,v;if(!d||!d.state||5<c||0>c)return d?b(d,K):K;if(m=d.state,!d.output||!d.input&&0!==d.avail_in||
666===m.status&&c!==G)return b(d,0===d.avail_out?-5:K);if(m.strm=d,f=m.last_flush,m.last_flush=c,m.status===fa)2===m.wrap?(d.adler=0,l(m,31),l(m,139),l(m,8),m.gzhead?(l(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),l(m,255&m.gzhead.time),l(m,m.gzhead.time>>8&255),l(m,m.gzhead.time>>16&255),l(m,m.gzhead.time>>24&255),l(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),l(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(l(m,255&m.gzhead.extra.length),
@@ -147,39 +147,39 @@ if(C=0,v<H){F=v;H-=F;do L[n++]=u[C++];while(--F);C=n-G;I=L}}}else if(C+=v-F,F<H)
{}],11:[function(c,f,d){function b(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function e(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new t.Buf16(320);this.work=
new t.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var d;return b&&b.state?(d=b.state,b.total_in=b.total_out=d.total=0,b.msg="",d.wrap&&(b.adler=1&d.wrap),d.mode=z,d.last=0,d.havedict=0,d.dmax=32768,d.head=null,d.hold=0,d.bits=0,d.lencode=d.lendyn=new t.Buf32(D),d.distcode=d.distdyn=new t.Buf32(B),d.sane=1,d.back=-1,A):y}function k(b){var d;return b&&b.state?(d=b.state,d.wsize=0,d.whave=0,d.wnext=0,g(b)):y}function l(b,d){var e,c;return b&&b.state?(c=b.state,
0>d?(e=0,d=-d):(e=(d>>4)+1,48>d&&(d&=15)),d&&(8>d||15<d)?y:(null!==c.window&&c.wbits!==d&&(c.window=null),c.wrap=e,c.wbits=d,k(b))):y}function n(b,d){var c,f;return b?(f=new e,b.state=f,f.window=null,c=l(b,d),c!==A&&(b.state=null),c):y}function m(b,d,e,c){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new t.Buf8(b.wsize)),c>=b.wsize?(t.arraySet(b.window,d,e-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>c&&(f=c),t.arraySet(b.window,d,e-
-c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,s,t=c("../utils/common"),q=c("./adler32"),v=c("./crc32"),u=c("./inffast"),x=c("./inftrees"),A=0,y=-2,z=1,D=852,B=592,C=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,D,B,E,T,N,M,$,O,J,R,X,fa,da,U,Z,aa,Y=0,S=new t.Buf8(4),ha=[16,
-17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.avail_in)return y;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;B=c.hold;E=c.bits;T=n;N=D;Z=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(2&c.wrap&&35615===B){c.check=0;S[0]=255&B;S[1]=B>>>8&255;c.check=v(c.check,S,2,0);E=B=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
+c,f,b.wnext),c-=f,c?(t.arraySet(b.window,d,e-c,c,0),b.wnext=c,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,s,t=c("../utils/common"),q=c("./adler32"),v=c("./crc32"),u=c("./inffast"),x=c("./inftrees"),A=0,y=-2,z=1,D=852,B=592,C=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return n(b,15)};d.inflateInit2=n;d.inflate=function(d,e){var c,f,g,k,l,n,D,B,E,T,O,M,$,N,J,R,X,fa,da,U,Z,aa,Y=0,S=new t.Buf8(4),ha=[16,
+17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!d||!d.state||!d.output||!d.input&&0!==d.avail_in)return y;c=d.state;12===c.mode&&(c.mode=13);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;B=c.hold;E=c.bits;T=n;O=D;Z=A;a:for(;;)switch(c.mode){case z:if(0===c.wrap){c.mode=13;break}for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(2&c.wrap&&35615===B){c.check=0;S[0]=255&B;S[1]=B>>>8&255;c.check=v(c.check,S,2,0);E=B=0;c.mode=2;break}if(c.flags=0,c.head&&(c.head.done=!1),
!(1&c.wrap)||(((255&B)<<8)+(B>>8))%31){d.msg="incorrect header check";c.mode=30;break}if(8!==(15&B)){d.msg="unknown compression method";c.mode=30;break}if(B>>>=4,E-=4,U=(15&B)+8,0===c.wbits)c.wbits=U;else if(U>c.wbits){d.msg="invalid window size";c.mode=30;break}c.dmax=1<<U;d.adler=c.check=1;c.mode=512&B?10:12;E=B=0;break;case 2:for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(c.flags=B,8!==(255&c.flags)){d.msg="unknown compression method";c.mode=30;break}if(57344&c.flags){d.msg="unknown header flags set";
c.mode=30;break}c.head&&(c.head.text=B>>8&1);512&c.flags&&(S[0]=255&B,S[1]=B>>>8&255,c.check=v(c.check,S,2,0));E=B=0;c.mode=3;case 3:for(;32>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.head&&(c.head.time=B);512&c.flags&&(S[0]=255&B,S[1]=B>>>8&255,S[2]=B>>>16&255,S[3]=B>>>24&255,c.check=v(c.check,S,4,0));E=B=0;c.mode=4;case 4:for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.head&&(c.head.xflags=255&B,c.head.os=B>>8);512&c.flags&&(S[0]=255&B,S[1]=B>>>8&255,c.check=v(c.check,S,2,0));E=B=0;c.mode=
5;case 5:if(1024&c.flags){for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.length=B;c.head&&(c.head.extra_len=B);512&c.flags&&(S[0]=255&B,S[1]=B>>>8&255,c.check=v(c.check,S,2,0));E=B=0}else c.head&&(c.head.extra=null);c.mode=6;case 6:if(1024&c.flags&&(M=c.length,M>n&&(M=n),M&&(c.head&&(U=c.head.extra_len-c.length,c.head.extra||(c.head.extra=Array(c.head.extra_len)),t.arraySet(c.head.extra,f,k,M,U)),512&c.flags&&(c.check=v(c.check,f,M,k)),n-=M,k+=M,c.length-=M),c.length))break a;c.length=0;c.mode=
7;case 7:if(2048&c.flags){if(0===n)break a;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.name+=String.fromCharCode(U));while(U&&M<n);if(512&c.flags&&(c.check=v(c.check,f,M,k)),n-=M,k+=M,U)break a}else c.head&&(c.head.name=null);c.length=0;c.mode=8;case 8:if(4096&c.flags){if(0===n)break a;M=0;do U=f[k+M++],c.head&&U&&65536>c.length&&(c.head.comment+=String.fromCharCode(U));while(U&&M<n);if(512&c.flags&&(c.check=v(c.check,f,M,k)),n-=M,k+=M,U)break a}else c.head&&(c.head.comment=null);c.mode=
9;case 9:if(512&c.flags){for(;16>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(B!==(65535&c.check)){d.msg="header crc mismatch";c.mode=30;break}E=B=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0);d.adler=c.check=0;c.mode=12;break;case 10:for(;32>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}d.adler=c.check=b(B);E=B=0;c.mode=11;case 11:if(0===c.havedict)return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=n,c.hold=B,c.bits=E,2;d.adler=c.check=1;c.mode=12;case 12:if(5===e||6===e)break a;case 13:if(c.last){B>>>=
-7&E;E-=7&E;c.mode=27;break}for(;3>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}switch(c.last=1&B,B>>>=1,E-=1,3&B){case 0:c.mode=14;break;case 1:O=c;if(C){R=void 0;p=new t.Buf32(512);s=new t.Buf32(32);for(R=0;144>R;)O.lens[R++]=8;for(;256>R;)O.lens[R++]=9;for(;280>R;)O.lens[R++]=7;for(;288>R;)O.lens[R++]=8;x(1,O.lens,0,288,p,0,O.work,{bits:9});for(R=0;32>R;)O.lens[R++]=5;x(2,O.lens,0,32,s,0,O.work,{bits:5});C=!1}O.lencode=p;O.lenbits=9;O.distcode=s;O.distbits=5;if(c.mode=20,6===e){B>>>=2;E-=2;break a}break;
+7&E;E-=7&E;c.mode=27;break}for(;3>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}switch(c.last=1&B,B>>>=1,E-=1,3&B){case 0:c.mode=14;break;case 1:N=c;if(C){R=void 0;p=new t.Buf32(512);s=new t.Buf32(32);for(R=0;144>R;)N.lens[R++]=8;for(;256>R;)N.lens[R++]=9;for(;280>R;)N.lens[R++]=7;for(;288>R;)N.lens[R++]=8;x(1,N.lens,0,288,p,0,N.work,{bits:9});for(R=0;32>R;)N.lens[R++]=5;x(2,N.lens,0,32,s,0,N.work,{bits:5});C=!1}N.lencode=p;N.lenbits=9;N.distcode=s;N.distbits=5;if(c.mode=20,6===e){B>>>=2;E-=2;break a}break;
case 2:c.mode=17;break;case 3:d.msg="invalid block type",c.mode=30}B>>>=2;E-=2;break;case 14:B>>>=7&E;for(E-=7&E;32>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if((65535&B)!==(B>>>16^65535)){d.msg="invalid stored block lengths";c.mode=30;break}if(c.length=65535&B,B=0,E=0,c.mode=15,6===e)break a;case 15:c.mode=16;case 16:if(M=c.length){if(M>n&&(M=n),M>D&&(M=D),0===M)break a;t.arraySet(g,f,k,M,l);n-=M;k+=M;D-=M;l+=M;c.length-=M;break}c.mode=12;break;case 17:for(;14>E;){if(0===n)break a;n--;B+=f[k++]<<
E;E+=8}if(c.nlen=(31&B)+257,B>>>=5,E-=5,c.ndist=(31&B)+1,B>>>=5,E-=5,c.ncode=(15&B)+4,B>>>=4,E-=4,286<c.nlen||30<c.ndist){d.msg="too many length or distance symbols";c.mode=30;break}c.have=0;c.mode=18;case 18:for(;c.have<c.ncode;){for(;3>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.lens[ha[c.have++]]=7&B;B>>>=3;E-=3}for(;19>c.have;)c.lens[ha[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,aa={bits:c.lenbits},Z=x(0,c.lens,0,19,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Z){d.msg="invalid code lengths set";
-c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,R=65535&Y,!(J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(16>R)B>>>=J,E-=J,c.lens[c.have++]=R;else{if(16===R){for(O=J+2;E<O;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(B>>>=J,E-=J,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}U=c.lens[c.have-1];M=3+(3&B);B>>>=2;E-=2}else if(17===R){for(O=J+3;E<O;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=3+(7&B);
-B>>>=3;E-=3}else{for(O=J+7;E<O;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=11+(127&B);B>>>=7;E-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=U}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Z=x(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Z){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
-c.distdyn,aa={bits:c.distbits},Z=x(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Z){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=n;c.hold=B;c.bits=E;u(d,N);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;B=c.hold;E=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,O=Y>>>16&255,R=65535&Y,!(J<=
-E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(O&&0===(240&O)){X=J;fa=O;for(da=R;Y=c.lencode[da+((B&(1<<X+fa)-1)>>X)],J=Y>>>24,O=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,c.length=R,0===O){c.mode=26;break}if(32&O){c.back=-1;c.mode=12;break}if(64&O){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&O;c.mode=22;case 22:if(c.extra){for(O=c.extra;E<O;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.length+=B&(1<<c.extra)-
-1;B>>>=c.extra;E-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[B&(1<<c.distbits)-1],J=Y>>>24,O=Y>>>16&255,R=65535&Y,!(J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(0===(240&O)){X=J;fa=O;for(da=R;Y=c.distcode[da+((B&(1<<X+fa)-1)>>X)],J=Y>>>24,O=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,64&O){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&O;c.mode=24;case 24:if(c.extra){for(O=
-c.extra;E<O;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.offset+=B&(1<<c.extra)-1;B>>>=c.extra;E-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=N-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,$=c.wsize-M):$=c.wnext-M;M>c.length&&(M=c.length);O=c.window}else O=g,$=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=O[$++];while(--M);
-0===c.length&&(c.mode=21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>E;){if(0===n)break a;n--;B|=f[k++]<<E;E+=8}if(N-=D,d.total_out+=N,c.total+=N,N&&(d.adler=c.check=c.flags?v(c.check,g,N,l-N):q(c.check,g,N,l-N)),N=D,(c.flags?B:b(B))!==c.check){d.msg="incorrect data check";c.mode=30;break}E=B=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(B!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
-30;break}E=B=0}c.mode=29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=n,c.hold=B,c.bits=E,(c.wsize||N!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,N-d.avail_out)?(c.mode=31,-4):(T-=d.avail_in,N-=d.avail_out,d.total_in+=T,d.total_out+=N,c.total+=N,c.wrap&&N&&(d.adler=c.check=c.flags?v(c.check,g,N,d.next_out-N):q(c.check,g,N,d.next_out-N)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
-0)+(20===c.mode||15===c.mode?256:0),(0===T&&0===N||4===e)&&Z===A&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,A};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,A)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,A)):
+c.mode=30;break}c.have=0;c.mode=19;case 19:for(;c.have<c.nlen+c.ndist;){for(;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,R=65535&Y,!(J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(16>R)B>>>=J,E-=J,c.lens[c.have++]=R;else{if(16===R){for(N=J+2;E<N;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(B>>>=J,E-=J,0===c.have){d.msg="invalid bit length repeat";c.mode=30;break}U=c.lens[c.have-1];M=3+(3&B);B>>>=2;E-=2}else if(17===R){for(N=J+3;E<N;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=3+(7&B);
+B>>>=3;E-=3}else{for(N=J+7;E<N;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=J;E-=J;U=0;M=11+(127&B);B>>>=7;E-=7}if(c.have+M>c.nlen+c.ndist){d.msg="invalid bit length repeat";c.mode=30;break}for(;M--;)c.lens[c.have++]=U}}if(30===c.mode)break;if(0===c.lens[256]){d.msg="invalid code -- missing end-of-block";c.mode=30;break}if(c.lenbits=9,aa={bits:c.lenbits},Z=x(1,c.lens,0,c.nlen,c.lencode,0,c.work,aa),c.lenbits=aa.bits,Z){d.msg="invalid literal/lengths set";c.mode=30;break}if(c.distbits=6,c.distcode=
+c.distdyn,aa={bits:c.distbits},Z=x(2,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,aa),c.distbits=aa.bits,Z){d.msg="invalid distances set";c.mode=30;break}if(c.mode=20,6===e)break a;case 20:c.mode=21;case 21:if(6<=n&&258<=D){d.next_out=l;d.avail_out=D;d.next_in=k;d.avail_in=n;c.hold=B;c.bits=E;u(d,O);l=d.next_out;g=d.output;D=d.avail_out;k=d.next_in;f=d.input;n=d.avail_in;B=c.hold;E=c.bits;12===c.mode&&(c.back=-1);break}for(c.back=0;Y=c.lencode[B&(1<<c.lenbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=
+E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(N&&0===(240&N)){X=J;fa=N;for(da=R;Y=c.lencode[da+((B&(1<<X+fa)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,c.length=R,0===N){c.mode=26;break}if(32&N){c.back=-1;c.mode=12;break}if(64&N){d.msg="invalid literal/length code";c.mode=30;break}c.extra=15&N;c.mode=22;case 22:if(c.extra){for(N=c.extra;E<N;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.length+=B&(1<<c.extra)-
+1;B>>>=c.extra;E-=c.extra;c.back+=c.extra}c.was=c.length;c.mode=23;case 23:for(;Y=c.distcode[B&(1<<c.distbits)-1],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(0===(240&N)){X=J;fa=N;for(da=R;Y=c.distcode[da+((B&(1<<X+fa)-1)>>X)],J=Y>>>24,N=Y>>>16&255,R=65535&Y,!(X+J<=E);){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}B>>>=X;E-=X;c.back+=X}if(B>>>=J,E-=J,c.back+=J,64&N){d.msg="invalid distance code";c.mode=30;break}c.offset=R;c.extra=15&N;c.mode=24;case 24:if(c.extra){for(N=
+c.extra;E<N;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}c.offset+=B&(1<<c.extra)-1;B>>>=c.extra;E-=c.extra;c.back+=c.extra}if(c.offset>c.dmax){d.msg="invalid distance too far back";c.mode=30;break}c.mode=25;case 25:if(0===D)break a;if(M=O-D,c.offset>M){if(M=c.offset-M,M>c.whave&&c.sane){d.msg="invalid distance too far back";c.mode=30;break}M>c.wnext?(M-=c.wnext,$=c.wsize-M):$=c.wnext-M;M>c.length&&(M=c.length);N=c.window}else N=g,$=l-c.offset,M=c.length;M>D&&(M=D);D-=M;c.length-=M;do g[l++]=N[$++];while(--M);
+0===c.length&&(c.mode=21);break;case 26:if(0===D)break a;g[l++]=c.length;D--;c.mode=21;break;case 27:if(c.wrap){for(;32>E;){if(0===n)break a;n--;B|=f[k++]<<E;E+=8}if(O-=D,d.total_out+=O,c.total+=O,O&&(d.adler=c.check=c.flags?v(c.check,g,O,l-O):q(c.check,g,O,l-O)),O=D,(c.flags?B:b(B))!==c.check){d.msg="incorrect data check";c.mode=30;break}E=B=0}c.mode=28;case 28:if(c.wrap&&c.flags){for(;32>E;){if(0===n)break a;n--;B+=f[k++]<<E;E+=8}if(B!==(4294967295&c.total)){d.msg="incorrect length check";c.mode=
+30;break}E=B=0}c.mode=29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return d.next_out=l,d.avail_out=D,d.next_in=k,d.avail_in=n,c.hold=B,c.bits=E,(c.wsize||O!==d.avail_out&&30>c.mode&&(27>c.mode||4!==e))&&m(d,d.output,d.next_out,O-d.avail_out)?(c.mode=31,-4):(T-=d.avail_in,O-=d.avail_out,d.total_in+=T,d.total_out+=O,c.total+=O,c.wrap&&O&&(d.adler=c.check=c.flags?v(c.check,g,O,d.next_out-O):q(c.check,g,O,d.next_out-O)),d.data_type=c.bits+(c.last?64:0)+(12===c.mode?128:
+0)+(20===c.mode||15===c.mode?256:0),(0===T&&0===O||4===e)&&Z===A&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var d=b.state;return d.window&&(d.window=null),b.state=null,A};d.inflateGetHeader=function(b,d){var e;return b&&b.state?(e=b.state,0===(2&e.wrap)?y:(e.head=d,d.done=!1,A)):y};d.inflateSetDictionary=function(b,d){var e,c,f=d.length;return b&&b.state?(e=b.state,0!==e.wrap&&11!==e.mode?y:11===e.mode&&(c=1,c=q(c,d,f,0),c!==e.check)?-3:m(b,d,f,f)?(e.mode=31,-4):(e.havedict=1,A)):
y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(c,f,d){var b=c("../utils/common"),e=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
-16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,s,t,q,v,u){var x,A,y,z,D,B,C,F;z=u.bits;for(var H=0,G=0,I=0,K=0,L=0,P=0,W=0,V=x=0,Q=0,E=null,T=0,N=new b.Buf16(16),P=new b.Buf16(16),M=null,$=0,H=0;15>=H;H++)N[H]=0;for(G=0;G<s;G++)N[c[f+G]]++;L=z;for(K=15;1<=K&&0===N[K];K--);if(L>K&&(L=K),0===K)return t[q++]=20971520,t[q++]=20971520,u.bits=1,0;for(I=1;I<K&&0===N[I];I++);L<I&&(L=I);for(H=x=1;15>=H;H++)if(x<<=1,x-=N[H],0>x)return-1;if(0<
-x&&(0===d||1!==K))return-1;P[1]=0;for(H=1;15>H;H++)P[H+1]=P[H]+N[H];for(G=0;G<s;G++)0!==c[f+G]&&(v[P[c[f+G]]++]=G);if(0===d?(E=M=v,D=19):1===d?(E=e,T-=257,M=g,$-=257,D=256):(E=k,M=l,D=-1),Q=0,G=0,H=I,z=q,P=L,W=0,y=-1,V=1<<L,s=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var O=0;;){O++;B=H-W;v[G]<D?(C=0,F=v[G]):v[G]>D?(C=M[$+v[G]],F=E[T+v[G]]):(C=96,F=0);x=1<<H-W;I=A=1<<P;do A-=x,t[z+(Q>>W)+A]=B<<24|C<<16|F|0;while(0!==A);for(x=1<<H-1;Q&x;)x>>=1;if(0!==x?(Q&=x-1,Q+=x):Q=0,G++,0===--N[H]){if(H===K)break;
-H=c[f+v[G]]}if(H>L&&(Q&s)!==y){0===W&&(W=L);z+=I;P=H-W;for(x=1<<P;P+W<K&&(x-=N[P+W],!(0>=x));)P++,x<<=1;if(V+=1<<P,1===d&&852<V||2===d&&592<V)return 1;y=Q&s;t[y]=L<<24|P<<16|z-q|0}}return 0!==Q&&(t[z+Q]=H-W<<24|4194304),u.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=
+16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(d,c,f,s,t,q,v,u){var x,A,y,z,D,B,C,F;z=u.bits;for(var H=0,G=0,I=0,K=0,L=0,P=0,W=0,V=x=0,Q=0,E=null,T=0,O=new b.Buf16(16),P=new b.Buf16(16),M=null,$=0,H=0;15>=H;H++)O[H]=0;for(G=0;G<s;G++)O[c[f+G]]++;L=z;for(K=15;1<=K&&0===O[K];K--);if(L>K&&(L=K),0===K)return t[q++]=20971520,t[q++]=20971520,u.bits=1,0;for(I=1;I<K&&0===O[I];I++);L<I&&(L=I);for(H=x=1;15>=H;H++)if(x<<=1,x-=O[H],0>x)return-1;if(0<
+x&&(0===d||1!==K))return-1;P[1]=0;for(H=1;15>H;H++)P[H+1]=P[H]+O[H];for(G=0;G<s;G++)0!==c[f+G]&&(v[P[c[f+G]]++]=G);if(0===d?(E=M=v,D=19):1===d?(E=e,T-=257,M=g,$-=257,D=256):(E=k,M=l,D=-1),Q=0,G=0,H=I,z=q,P=L,W=0,y=-1,V=1<<L,s=V-1,1===d&&852<V||2===d&&592<V)return 1;for(var N=0;;){N++;B=H-W;v[G]<D?(C=0,F=v[G]):v[G]>D?(C=M[$+v[G]],F=E[T+v[G]]):(C=96,F=0);x=1<<H-W;I=A=1<<P;do A-=x,t[z+(Q>>W)+A]=B<<24|C<<16|F|0;while(0!==A);for(x=1<<H-1;Q&x;)x>>=1;if(0!==x?(Q&=x-1,Q+=x):Q=0,G++,0===--O[H]){if(H===K)break;
+H=c[f+v[G]]}if(H>L&&(Q&s)!==y){0===W&&(W=L);z+=I;P=H-W;for(x=1<<P;P+W<K&&(x-=O[P+W],!(0>=x));)P++,x<<=1;if(V+=1<<P,1===d&&852<V||2===d&&592<V)return 1;y=Q&s;t[y]=L<<24|P<<16|z-q|0}}return 0!==Q&&(t[z+Q]=H-W<<24|4194304),u.bits=L,0}},{"../utils/common":3}],13:[function(c,f,d){f.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(c,f,d){function b(b){for(var d=
b.length;0<=--d;)b[d]=0}function e(b,d,e,c,f){this.static_tree=b;this.extra_bits=d;this.extra_base=e;this.elems=c;this.max_length=f;this.has_stree=b&&b.length}function g(b,d){this.dyn_tree=b;this.max_code=0;this.stat_desc=d}function k(b,d){b.pending_buf[b.pending++]=255&d;b.pending_buf[b.pending++]=d>>>8&255}function l(b,d,e){b.bi_valid>V-e?(b.bi_buf|=d<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=d>>V-b.bi_valid,b.bi_valid+=e-V):(b.bi_buf|=d<<b.bi_valid&65535,b.bi_valid+=e)}function n(b,d,e){l(b,e[2*
d],e[2*d+1])}function m(b,d){var e=0;do e|=1&b,b>>>=1,e<<=1;while(0<--d);return e>>>1}function p(b,d,e){var c,f=Array(W+1),g=0;for(c=1;c<=W;c++)f[c]=g=g+e[c-1]<<1;for(e=0;e<=d;e++)c=b[2*e+1],0!==c&&(b[2*e]=m(f[c]++,c))}function s(b){var d;for(d=0;d<I;d++)b.dyn_ltree[2*d]=0;for(d=0;d<K;d++)b.dyn_dtree[2*d]=0;for(d=0;d<L;d++)b.bl_tree[2*d]=0;b.dyn_ltree[2*Q]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function t(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
b.bi_buf=0;b.bi_valid=0}function q(b,d,e,c){var f=2*d,g=2*e;return b[f]<b[g]||b[f]===b[g]&&c[d]<=c[e]}function v(b,d,e){for(var c=b.heap[e],f=e<<1;f<=b.heap_len&&(f<b.heap_len&&q(d,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(d,c,b.heap[f],b.depth));)b.heap[e]=b.heap[f],e=f,f<<=1;b.heap[e]=c}function u(b,d,e){var c,f,g,k,m=0;if(0!==b.last_lit){do c=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===c?n(b,f,d):(g=da[f],n(b,g+G+1,d),k=M[g],0!==k&&(f-=U[g],l(b,f,
k)),c--,g=256>c?fa[c]:fa[256+(c>>>7)],n(b,g,e),k=$[g],0!==k&&(c-=Z[g],l(b,c,k)));while(m<b.last_lit)}n(b,Q,d)}function x(b,d){var e,c,f,g=d.dyn_tree;c=d.stat_desc.static_tree;var k=d.stat_desc.has_stree,l=d.stat_desc.elems,n=-1;b.heap_len=0;b.heap_max=P;for(e=0;e<l;e++)0!==g[2*e]?(b.heap[++b.heap_len]=n=e,b.depth[e]=0):g[2*e+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>n?++n:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,k&&(b.static_len-=c[2*f+1]);d.max_code=n;for(e=b.heap_len>>1;1<=e;e--)v(b,g,e);f=l;
do e=b.heap[1],b.heap[1]=b.heap[b.heap_len--],v(b,g,1),c=b.heap[1],b.heap[--b.heap_max]=e,b.heap[--b.heap_max]=c,g[2*f]=g[2*e]+g[2*c],b.depth[f]=(b.depth[e]>=b.depth[c]?b.depth[e]:b.depth[c])+1,g[2*e+1]=g[2*c+1]=f,b.heap[1]=f++,v(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,u,k=d.dyn_tree,l=d.max_code,q=d.stat_desc.static_tree,s=d.stat_desc.has_stree,x=d.stat_desc.extra_bits,t=d.stat_desc.extra_base,A=d.stat_desc.max_length,z=0;for(c=0;c<=W;c++)b.bl_count[c]=0;k[2*b.heap[b.heap_max]+
1]=0;for(e=b.heap_max+1;e<P;e++)f=b.heap[e],c=k[2*k[2*f+1]+1]+1,c>A&&(c=A,z++),k[2*f+1]=c,f>l||(b.bl_count[c]++,m=0,f>=t&&(m=x[f-t]),u=k[2*f],b.opt_len+=u*(c+m),s&&(b.static_len+=u*(q[2*f+1]+m)));if(0!==z){do{for(c=A-1;0===b.bl_count[c];)c--;b.bl_count[c]--;b.bl_count[c+1]+=2;b.bl_count[A]--;z-=2}while(0<z);for(c=A;0!==c;c--)for(f=b.bl_count[c];0!==f;)m=b.heap[--e],m>l||(k[2*m+1]!==c&&(b.opt_len+=(c-k[2*m+1])*k[2*m],k[2*m+1]=c),f--)}p(g,n,b.bl_count)}function A(b,d,e){var c,f,g=-1,k=d[1],l=0,n=7,
-m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<n&&f===k||(l<m?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*E]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*N]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,p=7,u=4;0===k&&(p=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<p&&f===k)){if(m<u){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,E,b.bl_tree),l(b,m-3,2)):10>=m?
-(n(b,T,b.bl_tree),l(b,m-3,3)):(n(b,N,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,u=3):f===k?(p=6,u=3):(p=7,u=4)}}function z(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return F;for(d=32;d<G;d++)if(0!==b.dyn_ltree[2*d])return F;return C}function D(b,d,e,c){l(b,(H<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);B.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var B=c("../utils/common"),C=0,F=1,
-H=0,G=256,I=G+1+29,K=30,L=19,P=2*I+1,W=15,V=16,Q=256,E=16,T=17,N=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(I+2));b(R);var X=Array(2*K);b(X);var fa=Array(512);b(fa);var da=Array(256);b(da);var U=Array(29);b(U);var Z=Array(K);b(Z);var aa,Y,S,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(W+1);for(f=
-c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<$[f];d++)fa[c++]=f}for(c>>=7;f<K;f++){Z[f]=c<<7;for(d=0;d<1<<$[f]-7;d++)fa[256+c++]=f}for(d=0;d<=W;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,I+1,k);for(d=0;d<K;d++)X[2*d+1]=5,X[2*d]=m(d,5);aa=new e(R,M,G+1,I,W);Y=new e(X,$,0,K,W);S=new e([],O,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,
+m=4;0===k&&(n=138,m=3);d[2*(e+1)+1]=65535;for(c=0;c<=e;c++)f=k,k=d[2*(c+1)+1],++l<n&&f===k||(l<m?b.bl_tree[2*f]+=l:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*E]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*O]++,l=0,g=f,0===k?(n=138,m=3):f===k?(n=6,m=3):(n=7,m=4))}function y(b,d,e){var c,f,g=-1,k=d[1],m=0,p=7,u=4;0===k&&(p=138,u=3);for(c=0;c<=e;c++)if(f=k,k=d[2*(c+1)+1],!(++m<p&&f===k)){if(m<u){do n(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(n(b,f,b.bl_tree),m--),n(b,E,b.bl_tree),l(b,m-3,2)):10>=m?
+(n(b,T,b.bl_tree),l(b,m-3,3)):(n(b,O,b.bl_tree),l(b,m-11,7));m=0;g=f;0===k?(p=138,u=3):f===k?(p=6,u=3):(p=7,u=4)}}function z(b){var d,e=4093624447;for(d=0;31>=d;d++,e>>>=1)if(1&e&&0!==b.dyn_ltree[2*d])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return F;for(d=32;d<G;d++)if(0!==b.dyn_ltree[2*d])return F;return C}function D(b,d,e,c){l(b,(H<<1)+(c?1:0),3);t(b);k(b,e);k(b,~e);B.arraySet(b.pending_buf,b.window,d,e,b.pending);b.pending+=e}var B=c("../utils/common"),C=0,F=1,
+H=0,G=256,I=G+1+29,K=30,L=19,P=2*I+1,W=15,V=16,Q=256,E=16,T=17,O=18,M=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],$=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R=Array(2*(I+2));b(R);var X=Array(2*K);b(X);var fa=Array(512);b(fa);var da=Array(256);b(da);var U=Array(29);b(U);var Z=Array(K);b(Z);var aa,Y,S,ha=!1;d._tr_init=function(b){if(!ha){var d,c,f,k=Array(W+1);for(f=
+c=0;28>f;f++){U[f]=c;for(d=0;d<1<<M[f];d++)da[c++]=f}da[c-1]=f;for(f=c=0;16>f;f++){Z[f]=c;for(d=0;d<1<<$[f];d++)fa[c++]=f}for(c>>=7;f<K;f++){Z[f]=c<<7;for(d=0;d<1<<$[f]-7;d++)fa[256+c++]=f}for(d=0;d<=W;d++)k[d]=0;for(d=0;143>=d;)R[2*d+1]=8,d++,k[8]++;for(;255>=d;)R[2*d+1]=9,d++,k[9]++;for(;279>=d;)R[2*d+1]=7,d++,k[7]++;for(;287>=d;)R[2*d+1]=8,d++,k[8]++;p(R,I+1,k);for(d=0;d<K;d++)X[2*d+1]=5,X[2*d]=m(d,5);aa=new e(R,M,G+1,I,W);Y=new e(X,$,0,K,W);S=new e([],N,0,L,7);ha=!0}b.l_desc=new g(b.dyn_ltree,
aa);b.d_desc=new g(b.dyn_dtree,Y);b.bl_desc=new g(b.bl_tree,S);b.bi_buf=0;b.bi_valid=0;s(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,d,e,c){var f,g,k=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=z(b));x(b,b.l_desc);x(b,b.d_desc);A(b,b.dyn_ltree,b.l_desc.max_code);A(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(k=L-1;3<=k&&0===b.bl_tree[2*J[k]+1];k--);k=(b.opt_len+=3*(k+1)+14,k);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=e+5;if(e+4<=f&&-1!==d)D(b,d,e,
c);else if(4===b.strategy||g===f)l(b,2+(c?1:0),3),u(b,R,X);else{l(b,4+(c?1:0),3);d=b.l_desc.max_code+1;e=b.d_desc.max_code+1;k+=1;l(b,d-257,5);l(b,e-1,5);l(b,k-4,4);for(f=0;f<k;f++)l(b,b.bl_tree[2*J[f]+1],3);y(b,b.dyn_ltree,d-1);y(b,b.dyn_dtree,e-1);u(b,b.dyn_ltree,b.dyn_dtree)}s(b);c&&t(b)};d._tr_tally=function(b,d,e){return b.pending_buf[b.d_buf+2*b.last_lit]=d>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&d,b.pending_buf[b.l_buf+b.last_lit]=255&e,b.last_lit++,0===d?b.dyn_ltree[2*e]++:(b.matches++,
d--,b.dyn_ltree[2*(da[e]+G+1)]++,b.dyn_dtree[2*(256>d?fa[d]:fa[256+(d>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);n(b,Q,R);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(c,f,d){f.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
@@ -2576,8 +2576,8 @@ this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().rem
(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function f(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function n(){mxActor.call(this)}function m(){mxActor.call(this)}function p(){mxActor.call(this)}function s(){mxActor.call(this)}function t(){mxActor.call(this)}function q(b,a){this.canvas=
b;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=a;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function v(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function D(){mxShape.call(this)}function B(){mxShape.call(this)}function C(){mxEllipse.call(this)}function F(){mxShape.call(this)}
-function H(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function N(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
-function $(){mxActor.call(this)}function O(){mxActor.call(this)}function J(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function da(){mxActor.call(this)}function U(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
+function H(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function P(){mxCylinder.call(this)}function W(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function Q(){mxArrowConnector.call(this);this.spacing=0}function E(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function O(){mxRectangleShape.call(this)}function M(){mxActor.call(this)}
+function $(){mxActor.call(this)}function N(){mxActor.call(this)}function J(){mxActor.call(this)}function R(){mxActor.call(this)}function X(){mxActor.call(this)}function fa(){mxActor.call(this)}function da(){mxActor.call(this)}function U(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function S(){mxRhombus.call(this)}function ha(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ga(){mxEllipse.call(this)}
function ja(){mxActor.call(this)}function ea(){mxActor.call(this)}function la(){mxActor.call(this)}function wa(b,a,d,c,e,f,g,k,l,n){g+=l;var m=c.clone();c.x-=e*(2*g+l);c.y-=f*(2*g+l);e*=g+l;f*=g+l;return function(){b.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);n?b.fillAndStroke():b.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.max(0,Math.min(c,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(b.moveTo(a,e),b.lineTo(a,a),
b.lineTo(0,0),b.moveTo(a,a),b.lineTo(c,a)):(b.moveTo(0,0),b.lineTo(c-a,0),b.lineTo(c,a),b.lineTo(c,e),b.lineTo(a,e),b.lineTo(0,e-a),b.lineTo(0,0),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var ta=Math.tan(mxUtils.toRadians(30)),oa=(0.5-ta)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c,e/ta);b.translate((c-a)/2,(e-a)/2+a/4);b.moveTo(0,0.25*a);b.lineTo(0.5*a,a*oa);b.lineTo(a,0.25*a);b.lineTo(0.5*a,(0.5-oa)*a);b.lineTo(0,
0.25*a);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.redrawPath=function(b,a,d,c,e,f){a=Math.min(c,e/(0.5+ta));f?(b.moveTo(0,0.25*a),b.lineTo(0.5*a,(0.5-oa)*a),b.lineTo(a,0.25*a),b.moveTo(0.5*a,(0.5-oa)*a),b.lineTo(0.5*a,(1-oa)*a)):(b.translate((c-a)/2,(e-a)/2),b.moveTo(0,0.25*a),b.lineTo(0.5*a,a*oa),b.lineTo(a,0.25*a),b.lineTo(a,0.75*a),b.lineTo(0.5*a,(1-oa)*a),b.lineTo(0,0.75*a),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.isoCube=
@@ -2623,13 +2623,13 @@ L;mxUtils.extend(P,mxCylinder);P.prototype.jettyWidth=32;P.prototype.jettyHeight
b.lineTo(d,l+a),b.lineTo(0,l+a),b.lineTo(0,l),b.lineTo(d,l),b.lineTo(d,k+a),b.lineTo(0,k+a),b.lineTo(0,k),b.lineTo(d,k),b.close());b.end()};mxCellRenderer.prototype.defaultShapes.component=P;mxUtils.extend(W,mxDoubleEllipse);W.prototype.outerStroke=!0;W.prototype.paintVertexShape=function(b,a,d,c,e){var f=Math.min(4,Math.min(c/5,e/5));0<c&&0<e&&(b.ellipse(a+f,d+f,c-2*f,e-2*f),b.fillAndStroke());b.setShadow(!1);this.outerStroke&&(b.ellipse(a,d,c,e),b.stroke())};mxCellRenderer.prototype.defaultShapes.endState=
W;mxUtils.extend(V,W);V.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=V;mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=4;Q.prototype.isOpenEnded=function(){return!0};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Q.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=Q;mxUtils.extend(E,mxArrowConnector);E.prototype.defaultWidth=
10;E.prototype.defaultArrowWidth=20;E.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};E.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};E.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=E;mxUtils.extend(T,
-mxActor);T.prototype.size=30;T.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,a),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=T;mxUtils.extend(N,mxRectangleShape);N.prototype.dx=20;N.prototype.dy=20;N.prototype.isHtmlAllowed=function(){return!1};
-N.prototype.paintForeground=function(b,a,d,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,e*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+c,d+f);b.end();b.stroke();
-b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=N;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
+mxActor);T.prototype.size=30;T.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,e),new mxPoint(0,a),new mxPoint(c,0),new mxPoint(c,e)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.manualInput=T;mxUtils.extend(O,mxRectangleShape);O.prototype.dx=20;O.prototype.dy=20;O.prototype.isHtmlAllowed=function(){return!1};
+O.prototype.paintForeground=function(b,a,d,c,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*g,e*g));g=Math.max(f,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));b.begin();b.moveTo(a,d+f);b.lineTo(a+c,d+f);b.end();b.stroke();
+b.begin();b.moveTo(a+g,d);b.lineTo(a+g,d+e);b.end();b.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=O;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,
mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint(a,d),new mxPoint(a,e),new mxPoint(0,e)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend($,mxActor);$.prototype.dx=20;$.prototype.dy=20;$.prototype.redrawPath=function(b,a,d,c,e){a=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));d=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));Math.abs(c-a);Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=$;mxUtils.extend(O,mxActor);O.prototype.arrowWidth=
-0.3;O.prototype.arrowSize=0.2;O.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,
-f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=O;mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",O.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",O.prototype.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
+"dy",this.dy))));Math.abs(c-a);Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,d),new mxPoint((c+a)/2,d),new mxPoint((c+a)/2,e),new mxPoint((c-a)/2,e),new mxPoint((c-a)/2,d),new mxPoint(0,d)],this.isRounded,f,!0);b.end()};mxCellRenderer.prototype.defaultShapes.tee=$;mxUtils.extend(N,mxActor);N.prototype.arrowWidth=
+0.3;N.prototype.arrowSize=0.2;N.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(0,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,
+f),new mxPoint(0,f)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=N;mxUtils.extend(J,mxActor);J.prototype.redrawPath=function(b,a,d,c,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",N.prototype.arrowWidth))));a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",N.prototype.arrowSize))));d=(e-f)/2;var f=d+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,
[new mxPoint(0,e/2),new mxPoint(a,0),new mxPoint(a,d),new mxPoint(c-a,d),new mxPoint(c-a,0),new mxPoint(c,e/2),new mxPoint(c-a,e),new mxPoint(c-a,f),new mxPoint(a,f),new mxPoint(a,e)],this.isRounded,g,!0);b.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=J;mxUtils.extend(R,mxActor);R.prototype.size=0.1;R.prototype.redrawPath=function(b,a,d,c,e){a=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b.moveTo(a,0);b.lineTo(c,0);b.quadTo(c-2*a,e/2,c,e);b.lineTo(a,
e);b.quadTo(a-2*a,e/2,a,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=R;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.or=X;mxUtils.extend(fa,mxActor);fa.prototype.redrawPath=function(b,a,d,c,e){b.moveTo(0,0);b.quadTo(c,0,c,e/2);b.quadTo(c,e,0,e);b.quadTo(c/2,e/2,0,0);b.close();b.end()};mxCellRenderer.prototype.defaultShapes.xor=fa;mxUtils.extend(da,
mxActor);da.prototype.size=20;da.prototype.redrawPath=function(b,a,d,c,e){a=Math.min(c/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(b,[new mxPoint(a,0),new mxPoint(c-a,0),new mxPoint(c,0.8*a),new mxPoint(c,e),new mxPoint(0,e),new mxPoint(0,0.8*a)],this.isRounded,d,!0);b.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=da;mxUtils.extend(U,mxActor);U.prototype.size=0.375;
@@ -2649,7 +2649,7 @@ b.execute=function(){for(var b=0;b<a.length;b++)this.copyStyle(a[b])};b.getPosit
100*(b.width-a.x+b.x)/Math.min(b.width,b.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(b)})},ma=function(){return function(b){var a=[];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(na(b));return a}},ka=function(b){return function(a){var d=[ia(a,["size"],function(a){var d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(a.x+0.75*d*a.width,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,
Math.min(b,(d.x-a.x)/(0.75*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(na(a));return d}},qa=function(b,a,d){d=null!=d?d:1;return function(c){var e=[ia(c,["size"],function(a){var d=parseFloat(mxUtils.getValue(this.state.style,"size",b));return new mxPoint(a.x+d*a.width,a.getCenterY())},function(b,a){this.state.style.size=Math.max(0,Math.min(d,(a.x-b.x)/b.width))})];a&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(na(c));return e}},ua=function(b,a,d){return function(c){var e=
[ia(c,["size"],function(d){var c=Math.max(0,Math.min(d.width,Math.min(d.height,parseFloat(mxUtils.getValue(this.state.style,"size",a)))))*b;return new mxPoint(d.x+c,d.y+c)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,d.x-a.x),Math.min(a.height,d.y-a.y)))/b)})];d&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(na(c));return e}},ya=function(b){return function(a){return[ia(a,["arrowWidth","arrowSize"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",O.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",O.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},pa=function(b,a,d,c,e){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
+"arrowWidth",N.prototype.arrowWidth))),c=Math.max(0,Math.min(b,mxUtils.getValue(this.state.style,"arrowSize",N.prototype.arrowSize)));return new mxPoint(a.x+(1-c)*a.width,a.y+(1-d)*a.height/2)},function(a,d){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(a.y+a.height/2-d.y)/a.height)));this.state.style.arrowSize=Math.max(0,Math.min(b,(a.x+a.width-d.x)/a.width))})]}},pa=function(b,a,d,c,e){var f=b.absolutePoints,g=f.length-1,k=b.view.translate,l=b.view.scale,n=d?f[0]:f[g],m=d?f[1]:f[g-
1],p=m.x-n.x,u=m.y-n.y,v=Math.sqrt(p*p+u*u);return ia(b,a,function(b){b=c.call(this,v,p/v,u/v,n,m);return new mxPoint(b.x/l-k.x,b.y/l-k.y)},function(b,a,d){b=Math.sqrt(p*p+u*u);a.x=(a.x+k.x)*l;a.y=(a.y+k.y)*l;e.call(this,b,p/b,u/b,n,m,a,d)})},za=function(b,a,d){return pa(b,["width"],a,function(a,c,e,f,g){g=b.shape.getEdgeWidth()*b.view.scale+d;return new mxPoint(f.x+c*a/4+e*g/2,f.y+e*a/4-c*g/2)},function(a,c,e,f,g,k){a=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));b.style.width=Math.round(2*
a)/b.view.scale-d})},va={link:function(b){return[za(b,!0,10),za(b,!1,10)]},flexArrow:function(b){var a=b.view.graph.gridSize/b.view.scale,d=[];mxUtils.getValue(b.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(d.push(pa(b,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(a,d,c,e,f){a=(b.shape.getEdgeWidth()-b.shape.strokewidth)*b.view.scale;f=3*mxUtils.getNumber(b.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*b.view.scale;return new mxPoint(e.x+
d*(f+b.shape.strokewidth*b.view.scale)+c*a/2,e.y+c*(f+b.shape.strokewidth*b.view.scale)-d*a/2)},function(d,c,e,f,g,k,l){d=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,k.x,k.y));c=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-c,k.x,k.y);b.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-b.shape.strokewidth)/3)/100/b.view.scale;b.style.width=Math.round(2*d)/b.view.scale;mxEvent.isControlDown(l.getEvent())&&(b.style[mxConstants.STYLE_ENDSIZE]=b.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
@@ -2667,7 +2667,7 @@ a){this.state.style.width=Math.round(Math.max(I.prototype.corner,Math.min(b.widt
Math.max(0,Math.min(0.5,(a.x-b.x)/b.width))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(na(b));return a},cross:function(b){return[ia(b,["size"],function(b){var a=Math.min(b.width,b.height),a=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ea.prototype.size)))*a/2;return new mxPoint(b.getCenterX()-a,b.getCenterY()-a)},function(b,a){var d=Math.min(b.width,b.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(2*(Math.max(0,b.getCenterY()-a.y)/d),2*(Math.max(0,
b.getCenterX()-a.x)/d))))})]},note:function(a){return[ia(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",b.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,b.x+b.width-a.x),Math.min(b.height,a.y-b.y))))})]},manualInput:function(b){var a=[ia(b,["size"],function(b){var a=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,
"size",T.prototype.size)));return new mxPoint(b.x+b.width/4,b.y+3*a/4)},function(b,a){this.state.style.size=Math.round(Math.max(0,Math.min(b.height,4*(a.y-b.y)/3)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&a.push(na(b));return a},dataStorage:function(b){return[ia(b,["size"],function(b){var a=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",R.prototype.size))));return new mxPoint(b.x+(1-a)*b.width,b.getCenterY())},function(b,a){this.state.style.size=Math.max(0,
-Math.min(1,(b.x+b.width-a.x)/b.width))})]},internalStorage:function(b){var a=[ia(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",N.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",N.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})];mxUtils.getValue(b.style,
+Math.min(1,(b.x+b.width-a.x)/b.width))})]},internalStorage:function(b){var a=[ia(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",O.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",O.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})];mxUtils.getValue(b.style,
mxConstants.STYLE_ROUNDED,!1)&&a.push(na(b));return a},corner:function(b){return[ia(b,["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(b.x+a,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,Math.min(b.width,a.x-b.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},tee:function(b){return[ia(b,
["dx","dy"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"dx",$.prototype.dx))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"dy",$.prototype.dy)));return new mxPoint(b.x+(b.width+a)/2,b.y+d)},function(b,a){this.state.style.dx=Math.round(Math.max(0,2*Math.min(b.width/2,a.x-b.x-b.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(b.height,a.y-b.y)))})]},singleArrow:ya(1),doubleArrow:ya(0.5),folder:function(b){return[ia(b,["tabWidth",
"tabHeight"],function(b){var a=Math.max(0,Math.min(b.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),d=Math.max(0,Math.min(b.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(a=b.width-a);return new mxPoint(b.x+a,b.y+d)},function(b,a){var d=Math.max(0,Math.min(b.width,a.x-b.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==
@@ -2680,7 +2680,7 @@ a-v.y;a=(p*b-m*c)/(l*p-n*m);b=(n*b-l*c)/(n*m-l*p);u?(d&&(v=new mxPoint(v.x+l*a,v
new mxElbowEdgeHandler(b);d.snapToTerminals=!1;return d}return Ea.apply(this,arguments)};c.prototype.constraints=[];f.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;A.prototype.constraints=mxRectangleShape.prototype.constraints;b.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
-mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;
+mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;
T.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.15,0.05),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.85,0.05),
!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];D.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
0.1),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.75,0.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,
@@ -2694,7 +2694,7 @@ new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new
0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(0.875,0.75),!1),new mxConnectionConstraint(new mxPoint(0.375,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0.25),!1),new mxConnectionConstraint(new mxPoint(0.4,0.1),!1),new mxConnectionConstraint(new mxPoint(0.16,
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];m.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
-0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;$.prototype.constraints=null;M.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
+0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;$.prototype.constraints=null;M.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];G.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(b){d.escape();var a=d.getDeletableCells(d.getSelectionCells());if(null!=a&&0<a.length){var c=d.model.getParents(a);d.removeCells(a,b);if(null!=c){b=[];for(a=0;a<c.length;a++)(d.model.isVertex(c[a])||d.model.isEdge(c[a]))&&b.push(c[a]);d.setSelectionCells(b)}}}var c=this.editorUi,f=c.editor,d=f.graph,b=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});this.addAction("open...",
@@ -2885,9 +2885,9 @@ mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[
mxResources.get(L[v]));P.appendChild(V)}I.appendChild(P);d.isEditing()||(a.appendChild(p),mxEvent.addListener(G,"change",function(b){d.getModel().beginUpdate();try{var a=K[G.value];null!=a&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,a[0],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,a[1],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_ALIGN,a[2],d.getSelectionCells()),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,a[3],d.getSelectionCells()))}finally{d.getModel().endUpdate()}mxEvent.consume(b)}),
a.appendChild(I),mxEvent.addListener(P,"change",function(b){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,W[P.value],d.getSelectionCells());mxEvent.consume(b)}));var Q=document.createElement("input");Q.style.textAlign="right";Q.style.marginTop="4px";mxClient.IS_QUIRKS||(Q.style.position="absolute",Q.style.right="32px");Q.style.width="46px";Q.style.height=mxClient.IS_QUIRKS?"21px":"17px";k.appendChild(Q);var E=null,p=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
1,999," pt",function(b){E=b;document.execCommand("fontSize",!1,"4");b=d.cellEditor.textarea.getElementsByTagName("font");for(var a=0;a<b.length;a++)if("4"==b[a].getAttribute("size")){b[a].removeAttribute("size");b[a].style.fontSize=E+"px";window.setTimeout(function(){Q.value=E+" pt";E=null},0);break}},!0),p=this.createStepper(Q,p,1,10,!0,Menus.prototype.defaultFontSize);p.style.display=Q.style.display;p.style.marginTop="4px";mxClient.IS_QUIRKS||(p.style.right="20px");k.appendChild(p);k=l.getElementsByTagName("div")[0];
-k.style.cssFloat="right";var T=null,N="#ffffff",M=null,$="#000000",O=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return N},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){T=b},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");O.style.fontWeight="bold";var J=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");J.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return $},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){O.style.display=null==b||b==mxConstants.NONE?"none":"";J.style.display=
-O.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(O);d.cellEditor.isContentEditing()||g.appendChild(J);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
+k.style.cssFloat="right";var T=null,O="#ffffff",M=null,$="#000000",N=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return O},function(b){document.execCommand("backcolor",!1,b!=mxConstants.NONE?b:"transparent")},"#ffffff",{install:function(b){T=b},destroy:function(){T=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");N.style.fontWeight="bold";var J=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");J.style.fontWeight="bold";k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return $},function(b){document.execCommand("forecolor",!1,b!=mxConstants.NONE?b:"transparent")},"#000000",{install:function(b){M=b},destroy:function(){M=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(b){N.style.display=null==b||b==mxConstants.NONE?"none":"";J.style.display=
+N.style.display},function(b){null==b||b==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",d.getSelectionCells()):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,d.getSelectionCells())});k.style.fontWeight="bold";g.appendChild(k);g.appendChild(N);d.cellEditor.isContentEditing()||g.appendChild(J);a.appendChild(g);g=this.createPanel();g.style.paddingTop="2px";g.style.paddingBottom="4px";k=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
null,null,!0);k.style.fontWeight="bold";!b.containsLabel&&!b.autoSize&&0==b.edges.length&&g.appendChild(k);k=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,f.actions.get("formattedText"));k.style.fontWeight="bold";g.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="28px";k.style.fontWeight="normal";p=document.createElement("div");p.style.position="absolute";p.style.width="70px";p.style.marginTop="0px";p.style.fontWeight="bold";mxUtils.write(p,
mxResources.get("spacing"));k.appendChild(p);var R,X,fa,da,U,Z=this.addUnitInput(k,"pt",91,44,function(){R.apply(this,arguments)}),aa=this.addUnitInput(k,"pt",20,44,function(){X.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("top"),91);this.addLabel(k,mxResources.get("global"),20);mxUtils.br(k);mxUtils.br(k);var Y=this.addUnitInput(k,"pt",162,44,function(){fa.apply(this,arguments)}),S=this.addUnitInput(k,"pt",91,44,function(){da.apply(this,arguments)}),ha=this.addUnitInput(k,
"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(k);this.addLabel(k,mxResources.get("left"),162);this.addLabel(k,mxResources.get("bottom"),91);this.addLabel(k,mxResources.get("right"),20);if(d.cellEditor.isContentEditing()){var ca=null,ba=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(b){var a=""==b.value?120:parseInt(b.value),a=Math.max(120,isNaN(a)?120:a);null!=ca&&(d.cellEditor.restoreSelection(ca),ca=null);for(var c=d.getSelectedElement();null!=
@@ -2910,7 +2910,7 @@ mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");da=this.installInputHandler(S,
!1,e=function(){ja||(ja=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;if(null!=b){var a=mxUtils.getCurrentStyle(b);if(null!=a){c(n[0],"bold"==a.fontWeight||null!=d.getParentByName(b,"B",d.cellEditor.textarea));c(n[1],"italic"==a.fontStyle||null!=d.getParentByName(b,"I",d.cellEditor.textarea));c(n[2],null!=d.getParentByName(b,"U",d.cellEditor.textarea));c(s,"left"==a.textAlign);c(t,"center"==a.textAlign);c(q,"right"==
a.textAlign);c(D,"justify"==a.textAlign);c(z,null!=d.getParentByName(b,"SUP",d.cellEditor.textarea));c(y,null!=d.getParentByName(b,"SUB",d.cellEditor.textarea));C=d.getParentByName(b,"TABLE",d.cellEditor.textarea);H=null==C?null:d.getParentByName(b,"TR",C);F=null==C?null:d.getParentByName(b,"TD",C);B.style.display=null!=C?"":"none";if(document.activeElement!=Q){"FONT"==b.nodeName&&"4"==b.getAttribute("size")&&null!=E?(b.removeAttribute("size"),b.style.fontSize=E+"px",E=null):Q.value=parseFloat(a.fontSize)+
" pt";var b=b.style.lineHeight||a.lineHeight,e=parseFloat(b);"px"==b.substring(b.length-2)&&(e/=parseFloat(a.fontSize));"%"!=b.substring(b.length-1)&&(e*=100);ba.value=e+" %"}b=a.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});e=a.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(b,a,d,c){return"#"+
-("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=M&&($="#"==b.charAt(0)?b:"#000000",M($,!0));null!=T&&(N="#"==e.charAt(0)?e:null,T(N,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ja=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
+("0"+Number(a).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)});null!=M&&($="#"==b.charAt(0)?b:"#000000",M($,!0));null!=T&&(O="#"==e.charAt(0)?e:null,T(O,!0));null!=l.firstChild&&(a=a.fontFamily,"'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),l.firstChild.nodeValue=a)}}ja=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,
"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,c,f){BaseFormatPanel.call(this,a,c,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();(!a.containsImage||"image"==a.style.shape)&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));a=this.addEditOps(this.createPanel());
null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -3945,8 +3945,8 @@ F.vertex=!0;var H=new mxCell("Set Type",new mxGeometry(410,520,200,20),"html\x3d
I.vertex=!0;var K=new mxCell("",new mxGeometry(420,563,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.radioButton;strokeColor\x3d#999999;fillColor\x3d#ffffff;");K.vertex=!0;var L=new mxCell("Reports",new mxGeometry(440,563,50,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#55BFE0;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");L.vertex=!0;var P=new mxCell("",new mxGeometry(420,
583,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");P.vertex=!0;var W=new mxCell("Documents",new mxGeometry(440,583,70,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#EFAC43;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");W.vertex=!0;var V=new mxCell("",new mxGeometry(420,603,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");
V.vertex=!0;var Q=new mxCell("Media",new mxGeometry(440,603,40,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");Q.vertex=!0;var E=new mxCell("",new mxGeometry(420,623,14,14),"shape\x3dellipse;dashed\x3d0;strokeColor\x3d#999999;fillColor\x3d#ffffff;html\x3d1;");E.vertex=!0;var T=new mxCell("Text",new mxGeometry(440,623,30,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d3;strokeColor\x3dnone;fillColor\x3d#999999;fontColor\x3d#ffffff;fontStyle\x3d1;fontSize\x3d10;whiteSpace\x3dwrap;");
-T.vertex=!0;var N=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");N.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
-M.vertex=!0;var $=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");$.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,s,t,q,v,u,x,A,y,z,D,B,C,F,H,G,I,K,L,P,W,V,Q,E,T,N,M,$],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
+T.vertex=!0;var O=new mxCell("Save Template",new mxGeometry(0,680,150,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#3D8BCD;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");O.vertex=!0;var M=new mxCell("Cancel",new mxGeometry(170,680,100,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;fillColor\x3d#ffffff;align\x3dcenter;rSize\x3d5;strokeColor\x3d#dddddd;fontSize\x3d16;whiteSpace\x3dwrap;");
+M.vertex=!0;var $=new mxCell("Delete Template",new mxGeometry(630,680,170,40),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;align\x3dcenter;rSize\x3d5;strokeColor\x3dnone;fillColor\x3d#DB524C;fontColor\x3d#ffffff;fontSize\x3d16;whiteSpace\x3dwrap;");$.vertex=!0;return a.createVertexTemplateFromCells([c,d,b,e,g,k,l,n,m,p,s,t,q,v,u,x,A,y,z,D,B,C,F,H,G,I,K,L,P,W,V,Q,E,T,O,M,$],800,720,"Edit Template")}),this.addEntry("bootstrap business contact",function(){var c=new mxCell("",new mxGeometry(0,
0,800,50),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.horLines;strokeColor\x3d#dddddd;fillColor\x3d#fdfdfd;");c.vertex=!0;var d=new mxCell("2 fields selected",new mxGeometry(0,0.5,14,14),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.checkbox;strokeColor\x3d#dddddd;fillColor\x3dnone;align\x3dleft;labelPosition\x3dright;spacingLeft\x3d10;fontStyle\x3d1;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(13,-7);d.vertex=!0;c.insert(d);d=new mxCell("Mark as OK",new mxGeometry(0,
0.5,90,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(150,-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark as Violation",new mxGeometry(0,0.5,120,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(250,
-15);d.vertex=!0;c.insert(d);d=new mxCell("Mark all as OK",new mxGeometry(1,0.5,100,30),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rrect;rSize\x3d5;strokeColor\x3d#dddddd;;fillColor\x3d#ffffff;whiteSpace\x3dwrap;");d.geometry.relative=!0;d.geometry.offset=new mxPoint(-110,-15);d.vertex=!0;c.insert(d);d=new mxCell("Phone",new mxGeometry(40,70,100,20),"html\x3d1;shadow\x3d0;dashed\x3d0;shape\x3dmxgraph.bootstrap.rect;strokeColor\x3dnone;fillColor\x3dnone;fontColor\x3d#999999;align\x3dleft;spacingLeft\x3d5;whiteSpace\x3dwrap;");
@@ -7362,8 +7362,8 @@ k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",c=d
PrintDialog.prototype.create=function(a){function c(){s.value=Math.max(1,Math.min(g,Math.max(parseInt(s.value),parseInt(p.value))));p.value=Math.max(1,Math.min(g,Math.min(parseInt(s.value),parseInt(p.value))))}function f(b){function c(a,b,d){var f=a.getGraphBounds(),k=0,g=0,l=K.get(),n=1/a.pageScale,m=u.checked;if(m)var n=parseInt(G.value),p=parseInt(I.value),n=Math.min(l.height*p/(f.height/a.view.scale),l.width*n/(f.width/a.view.scale));else n=parseInt(v.value)/(100*a.pageScale),isNaN(n)&&(e=1/a.pageScale,
v.value="100 %");l=mxRectangle.fromRectangle(l);l.width=Math.ceil(l.width*e);l.height=Math.ceil(l.height*e);n*=e;!m&&a.pageVisible?(f=a.getPageLayout(),k-=f.x*l.width,g-=f.y*l.height):m=!0;if(null==b){b=PrintDialog.createPrintPreview(a,n,l,0,k,g,m);b.pageSelector=!1;b.mathEnabled=!1;if("undefined"!==typeof MathJax){var q=b.renderPage;b.renderPage=function(a,b,c,d,e,f){var k=q.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:k.className="geDisableMathJax";return k}}b.open(null,null,
d,!0)}else{l=a.background;if(null==l||""==l||l==mxConstants.NONE)l="#ffffff";b.backgroundColor=l;b.autoOrigin=m;b.appendGraph(a,n,k,g,d,!0)}return b}var e=parseInt(L.value)/100;isNaN(e)&&(e=1,L.value="100 %");var e=0.75*e,f=p.value,g=s.value,l=!n.checked,m=null;l&&(l=f==k&&g==k);if(!l&&null!=a.pages&&a.pages.length){var q=0,l=a.pages.length-1;n.checked||(q=parseInt(f)-1,l=parseInt(g)-1);for(var x=q;x<=l;x++){var t=a.pages[x],f=t==a.currentPage?d:null;if(null==f){var f=a.createTemporaryGraph(d.getStylesheet()),
-g=!0,q=!1,A=null,y=null;null==t.viewState&&null==t.mapping&&null==t.root&&a.updatePageRoot(t);null!=t.viewState?(g=t.viewState.pageVisible,q=t.viewState.mathEnabled,A=t.viewState.background,y=t.viewState.backgroundImage):null!=t.mapping&&null!=t.mapping.diagramMap&&(q="0"!=t.mapping.diagramMap.get("mathEnabled"),A=t.mapping.diagramMap.get("background"),y=t.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0<y.length?JSON.parse(y):null);f.background=A;f.backgroundImage=null!=y?new mxImage(y.src,
-y.width,y.height):null;f.pageVisible=g;f.mathEnabled=q;var z=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?x+1:z.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(t);f.model.setRoot(t.root)}m=c(f,m,x!=l);f!=d&&f.container.parentNode.removeChild(f.container)}}else m=c(d);m.mathEnabled&&(l=m.wnd.document,l.writeln('\x3cscript type\x3d"text/x-mathjax-config"\x3e'),l.writeln("MathJax.Hub.Config({"),l.writeln('messageStyle: "none",'),
+g=!0,q=!1,A=null,z=null;null==t.viewState&&null==t.mapping&&null==t.root&&a.updatePageRoot(t);null!=t.viewState?(g=t.viewState.pageVisible,q=t.viewState.mathEnabled,A=t.viewState.background,z=t.viewState.backgroundImage):null!=t.mapping&&null!=t.mapping.diagramMap&&(q="0"!=t.mapping.diagramMap.get("mathEnabled"),A=t.mapping.diagramMap.get("background"),z=t.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);f.background=A;f.backgroundImage=null!=z?new mxImage(z.src,
+z.width,z.height):null;f.pageVisible=g;f.mathEnabled=q;var y=f.getGlobalVariable;f.getGlobalVariable=function(a){return"page"==a?t.getName():"pagenumber"==a?x+1:y.apply(this,arguments)};document.body.appendChild(f.container);a.updatePageRoot(t);f.model.setRoot(t.root)}m=c(f,m,x!=l);f!=d&&f.container.parentNode.removeChild(f.container)}}else m=c(d);m.mathEnabled&&(l=m.wnd.document,l.writeln('\x3cscript type\x3d"text/x-mathjax-config"\x3e'),l.writeln("MathJax.Hub.Config({"),l.writeln('messageStyle: "none",'),
l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln("TeX: {"),l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),b&&(l.writeln("MathJax.Hub.Queue(function () {"),
l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script\x3e"),l.writeln('\x3cscript type\x3d"text/javascript" src\x3d"https://cdn.mathjax.org/mathjax/2.6-latest/MathJax.js"\x3e\x3c/script\x3e'));m.closeDocument();!m.mathEnabled&&b&&PrintDialog.printPreview(m)}var d=a.editor.graph,b=document.createElement("div"),e=document.createElement("h3");e.style.marginTop="0px";mxUtils.write(e,mxResources.get("print"));b.appendChild(e);var g=1,k=1,l=document.createElement("div");l.style.cssText=
"border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","all");n.setAttribute("type","radio");n.setAttribute("name","pages-printdialog");l.appendChild(n);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));l.appendChild(e);mxUtils.br(l);var m=n.cloneNode(!0);n.setAttribute("checked","checked");m.setAttribute("value","range");l.appendChild(m);
@@ -7466,14 +7466,14 @@ mxUtils.write(l,mxResources.get("height")+":");var t=document.createElement("inp
mxConstants.STYLE_ROTATION,0):"";n.appendChild(q);k.appendChild(l);k.appendChild(n);g.appendChild(k);e.appendChild(g);b.appendChild(e);var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),v=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<c.length;b++){var d=f.getCellGeometry(c[b]);null!=d&&(d=d.clone(),f.isCellMovable(c[b])&&(0<mxUtils.trim(m.value).length&&(d.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(d.y=
Number(p.value))),f.isCellResizable(c[b])&&(0<mxUtils.trim(s.value).length&&(d.width=Number(s.value)),0<mxUtils.trim(t.value).length&&(d.height=Number(t.value))),f.getModel().setGeometry(c[b],d));0<mxUtils.trim(q.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(q.value),[c[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&v.click()});e=document.createElement("div");e.style.marginTop="20px";e.style.textAlign="right";a.editor.cancelFirst?
(e.appendChild(d),e.appendChild(v)):(e.appendChild(v),e.appendChild(d));b.appendChild(e);this.container=b},LibraryDialog=function(a,c,f,d,b,e){function g(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function k(b,c,d,e,f,l,n,p,s){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=n||null==v[b]){t.style.backgroundImage="";q.style.display="none";var y=
-f,C=l;if(f>a.maxImageSize||l>a.maxImageSize){var T=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=T;l*=T}y>C?(C=Math.round(C*u/y),y=u):(y=Math.round(y*x/C),C=x);var N=document.createElement("div");N.setAttribute("draggable","true");N.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";N.style.position="relative";N.style.cursor="move";mxUtils.setPrefixedStyle(N.style,"transition","transform .1s ease-in-out");if(null!=b){var M=document.createElement("img");M.setAttribute("src",
-D.convert(b));M.style.width=y+"px";M.style.height=C+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((x-C)/2)+"px";M.style.paddingLeft=Math.floor((u-y)/2)+"px";N.appendChild(M)}else if(null!=n){var $=a.stringToCells(a.editor.graph.decompress(n.xml));0<$.length&&(a.sidebar.createThumb($,u,x,N,null,!0,!1),N.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",N.firstChild.style.cursor="")}var O=document.createElement("img");O.setAttribute("src",Editor.closeImage);O.setAttribute("border",
-"0");O.setAttribute("title",mxResources.get("delete"));O.setAttribute("align","top");O.style.paddingTop="4px";O.style.marginLeft="-22px";O.style.cursor="pointer";mxEvent.addListener(O,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&(O.style.position="relative");(function(a,b,c){mxEvent.addListener(O,"click",function(d){v[b]=null;for(var e=0;e<m.length;e++)if(null!=m[e].data&&m[e].data==b||null!=m[e].xml&&null!=c&&m[e].xml==c.xml){m.splice(e,1);break}N.parentNode.removeChild(a);0==m.length&&
-(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(O,"dblclick",function(a){mxEvent.consume(a)})})(N,b,n);N.appendChild(O);N.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var R=null;null!=b?(R={data:b,
-w:f,h:l,title:s},null!=p&&(R.aspect=p),v[b]=M,m.push(R)):null!=n&&(n.aspect="fixed",m.push(n),R=n);var X=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));J.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=z&&(z(),z=null,mxEvent.consume(a))});X();N.appendChild(J);mxEvent.addListener(J,
+f,C=l;if(f>a.maxImageSize||l>a.maxImageSize){var T=Math.min(1,Math.min(a.maxImageSize/Math.max(1,f)),a.maxImageSize/Math.max(1,l));f*=T;l*=T}y>C?(C=Math.round(C*u/y),y=u):(y=Math.round(y*x/C),C=x);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";O.style.position="relative";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=b){var M=document.createElement("img");M.setAttribute("src",
+D.convert(b));M.style.width=y+"px";M.style.height=C+"px";M.style.margin="10px";M.style.paddingBottom=Math.floor((x-C)/2)+"px";M.style.paddingLeft=Math.floor((u-y)/2)+"px";O.appendChild(M)}else if(null!=n){var $=a.stringToCells(a.editor.graph.decompress(n.xml));0<$.length&&(a.sidebar.createThumb($,u,x,O,null,!0,!1),O.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",O.firstChild.style.cursor="")}var N=document.createElement("img");N.setAttribute("src",Editor.closeImage);N.setAttribute("border",
+"0");N.setAttribute("title",mxResources.get("delete"));N.setAttribute("align","top");N.style.paddingTop="4px";N.style.marginLeft="-22px";N.style.cursor="pointer";mxEvent.addListener(N,"dragstart",function(a){mxEvent.consume(a)});null==b&&null!=n&&(N.style.position="relative");(function(a,b,c){mxEvent.addListener(N,"click",function(d){v[b]=null;for(var e=0;e<m.length;e++)if(null!=m[e].data&&m[e].data==b||null!=m[e].xml&&null!=c&&m[e].xml==c.xml){m.splice(e,1);break}O.parentNode.removeChild(a);0==m.length&&
+(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",q.style.display="");mxEvent.consume(d)});mxEvent.addListener(N,"dblclick",function(a){mxEvent.consume(a)})})(O,b,n);O.appendChild(N);O.style.marginBottom="30px";var J=document.createElement("div");J.style.position="absolute";J.style.boxSizing="border-box";J.style.bottom="-18px";J.style.left="10px";J.style.right="10px";J.style.backgroundColor="#ffffff";J.style.overflow="hidden";J.style.textAlign="center";var R=null;null!=b?(R={data:b,
+w:f,h:l,title:s},null!=p&&(R.aspect=p),v[b]=M,m.push(R)):null!=n&&(n.aspect="fixed",m.push(n),R=n);var X=function(){J.innerHTML="";J.style.cursor="pointer";J.style.whiteSpace="nowrap";J.style.textOverflow="ellipsis";mxUtils.write(J,null!=R.title&&0<R.title.length?R.title:mxResources.get("untitled"));J.style.color=null==R.title||0==R.title.length?"#d0d0d0":""};mxEvent.addListener(J,"keydown",function(a){13==a.keyCode&&null!=z&&(z(),z=null,mxEvent.consume(a))});X();O.appendChild(J);mxEvent.addListener(J,
"mousedown",function(a){"true"!=J.getAttribute("contentEditable")&&mxEvent.consume(a)});f=function(b){if(!mxClient.IS_IOS&&!mxClient.IS_QUIRKS&&!mxClient.IS_FF&&(null==document.documentMode||9<document.documentMode)){if("true"!=J.getAttribute("contentEditable")){null!=z&&(z(),z=null);if(null==R.title||0==R.title.length)J.innerHTML="";J.style.textOverflow="";J.style.whiteSpace="";J.style.cursor="text";J.style.color="";J.setAttribute("contentEditable","true");J.focus();document.execCommand("selectAll",
-!1,null);z=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";R.title=J.innerHTML;X()};mxEvent.consume(b)}}else{var c=new FilenameDialog(a,R.title||"",mxResources.get("ok"),function(a){null!=a&&(R.title=a,X())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}};mxEvent.addListener(J,"click",f);mxEvent.addListener(N,"dblclick",f);t.appendChild(N);mxEvent.addListener(N,"dragstart",function(a){null==b&&null!=n&&(O.style.visibility=
-"hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);A=g(a);mxClient.IS_GC&&(N.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(N.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(N,30);O.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(N,"dragend",function(a){"hidden"==O.style.visibility&&(O.style.visibility="",J.style.visibility="");A=null;mxUtils.setOpacity(N,100);mxUtils.setPrefixedStyle(N.style,
+!1,null);z=function(){J.removeAttribute("contentEditable");J.style.cursor="pointer";R.title=J.innerHTML;X()};mxEvent.consume(b)}}else{var c=new FilenameDialog(a,R.title||"",mxResources.get("ok"),function(a){null!=a&&(R.title=a,X())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}};mxEvent.addListener(J,"click",f);mxEvent.addListener(O,"dblclick",f);t.appendChild(O);mxEvent.addListener(O,"dragstart",function(a){null==b&&null!=n&&(N.style.visibility=
+"hidden",J.style.visibility="hidden");mxClient.IS_FF&&null!=n.xml&&a.dataTransfer.setData("Text",n.xml);A=g(a);mxClient.IS_GC&&(O.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);N.style.visibility="";J.style.visibility=""},0)});mxEvent.addListener(O,"dragend",function(a){"hidden"==N.style.visibility&&(N.style.visibility="",J.style.visibility="");A=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,
"transform",null)})}else B||(B=!0,a.handleError({message:mxResources.get("fileExists")}));else{f=!1;try{if(null!=b&&"\x3cmxlibrary"==b.substring(0,10)){C=mxUtils.parseXml(b);y=JSON.parse(mxUtils.getTextContent(C.documentElement));if(null!=y&&0<y.length)for(l=0;l<y.length;l++)null!=y[l].xml?k(null,null,0,0,0,0,y[l]):k(y[l].data,null,0,0,y[l].w,y[l].h,null,"fixed",y[l].title);a.spinner.stop();f=!0}}catch(fa){}f||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}
function l(a){a.dataTransfer.dropEffect=null!=A?"move":"copy";a.stopPropagation();a.preventDefault()}function n(b){b.stopPropagation();b.preventDefault();B=!1;y=g(b);if(null!=A)null!=y&&y<t.children.length?(m.splice(y>A?y-1:y,0,m.splice(A,1)[0]),t.insertBefore(t.children[A],t.children[y])):(m.push(m.splice(A,1)[0]),t.appendChild(t.children[A]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,c,d,e,f,g,l){k(a,c,d,e,f,g,l,"fixed",mxEvent.isAltDown(b)?
null:l.substring(0,l.lastIndexOf(".")).replace(/_/g," "));t.scrollTop=t.scrollHeight});else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,function(a){k(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var m=[];f=document.createElement("div");f.style.height=
@@ -7535,7 +7535,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
-[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.1.0.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
+[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,n){if(null!=c&&null==mxMarker.markers[c]){var m=this.getPackageForType(c);null!=m&&mxStencilRegistry.getStencil(m)}return t.apply(this,arguments)}})();(function(){EditorUi.VERSION="6.1.0.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
"shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=
1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();
EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};
@@ -7622,11 +7622,11 @@ DriveFile?(a="#"+v.getHash(),b=!1):a="#R"+encodeURIComponent(c?this.getFileData(
(y.highlight=e);"auto"!==d&&(y.target=d);v||(y.lightbox=!1);y.nav=this.editor.graph.foldingEnabled;c=parseInt(c);!isNaN(c)&&100!=c&&(y.zoom=c/100);c=[];g&&(c.push("pages"),y.resize=!0,null!=this.pages&&null!=this.currentPage&&(y.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),y.resize=!0);q&&c.push("layers");0<c.length&&(v&&c.push("lightbox"),y.toolbar=c.join(" "));u&&(y.edit=null!=a?a:"_blank");null!=a?y.url=a:y.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+
(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(y))+'"\x3e\x3c/div\x3e';A=0<A.length?"s\x3d"+A.join(";"):"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";x(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<A.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+A:"https://www.draw.io/embed2.js?"+A)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
'"\x3e\x3c/script\x3e')};EditorUi.prototype.showGitHubDialog=function(a,b,c){if(null==this.gitHubDialog){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("github"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var e=document.createElement("table"),f=document.createElement("tbody");e.style.marginBottom="16px";var g=mxUtils.bind(this,function(a,b,c){var d=document.createElement("tr"),
-e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),D())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=null,v=null,
-u=this.getCurrentFile();null!=u&&(u.constructor==GitHubFile&&null!=u.meta.drawio)&&(q=u.meta.drawio.org,v=u.meta.drawio.repo);var x=g(mxResources.get("organisation")+":","org",q),A=g(mxResources.get("repository")+":","repo",v),y=g(),z=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var D=mxUtils.bind(this,function(){var b=y.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=z.value;""==c&&(c="master");this.gitHubDialog.fn(x.value,
-A.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,D);this.gitHubDialog.init=function(a,b,c){var d=y.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));y.setAttribute("placeholder",b?"folder/filename.ext":"root");y.value=c||"";x.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};
-EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var v=document.createElement("span");mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(v);mxUtils.br(g);g.appendChild(q);v=document.createElement("span");mxUtils.write(v,mxResources.get("publicDiagramUrl"));g.appendChild(v);var u=this.getCurrentFile();null==c&&(null!=u&&u.constructor==DriveFile)&&(v=document.createElement("a"),
+e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),A())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=g(mxResources.get("organisation")+
+":","org"),v=g(mxResources.get("repository")+":","repo"),u=g(),x=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var A=mxUtils.bind(this,function(){var b=u.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=x.value;""==c&&(c="master");this.gitHubDialog.fn(q.value,v.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,A);var y=this;this.gitHubDialog.init=function(a,b,c){var d=y.getCurrentFile();null!=d&&d.constructor==
+GitHubFile&&(""==q.value&&(q.value=d.meta.org||""),""==v.value&&(v.value=d.meta.repo||""));d=u.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));u.setAttribute("placeholder",b?"folder/filename.ext":"root");u.value=c||"";q.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";q.setAttribute("value",
+"url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var v=document.createElement("span");mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(v);mxUtils.br(g);g.appendChild(q);v=document.createElement("span");mxUtils.write(v,mxResources.get("publicDiagramUrl"));g.appendChild(v);var u=this.getCurrentFile();null==c&&(null!=u&&u.constructor==DriveFile)&&(v=document.createElement("a"),
v.style.paddingLeft="12px",v.style.color="gray",v.setAttribute("href","javascript:void(0);"),mxUtils.write(v,mxResources.get("share")),g.appendChild(v),mxEvent.addListener(v,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var x=this.addLinkSection(e),A=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var y=document.createElement("input");
y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value="100%";e.appendChild(y);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(e,mxResources.get("allPages"),g,!g),B=this.addCheckbox(e,mxResources.get("layers"),!0),C=this.addCheckbox(e,mxResources.get("lightbox"),!0),F=this.addCheckbox(e,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";F.style.marginBottom=
"16px";mxEvent.addListener(C,"change",function(){C.checked?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(q.checked?c:null,A.checked,y.value,x.getTarget(),x.getColor(),z.checked,D.checked,B.checked,C.checked,F.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");
@@ -7741,8 +7741,8 @@ b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.st
":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",q=40,v=40,u=0,x=this.editor.graph;x.getGraphBounds();for(var A=function(){x.setSelectionCells($);x.scrollCellToVisible(x.getSelectionCell())},y=x.getFreeInsertPoint(),
z=y.x,D=y.y,y=D,B=null,C="auto",F=[],H=null,G=null,I=0;I<b.length&&"#"==b[I].charAt(0);){a=b[I];for(I++;I<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[I].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[I].substring(1)),I++;if("#"!=a.charAt(1)){var K=a.indexOf(":");if(0<K){var L=mxUtils.trim(a.substring(1,K)),P=mxUtils.trim(a.substring(K+1));"label"==L?B=x.sanitizeHtml(P):"style"==L?e=P:"width"==L?f=P:"height"==L?g=P:"ignore"==L?G=P.split(","):"connect"==L?F.push(JSON.parse(P)):"link"==L?H=P:
"padding"==L?u=parseFloat(P):"edgespacing"==L?q=parseFloat(P):"nodespacing"==L?v=parseFloat(P):"layout"==L&&(C=P)}}}var W=this.editor.csvToArray(b[I]);null==B&&(B="%"+W[0]+"%");if(null!=F)for(var V=0;V<F.length;V++)null==d[F[V].to]&&(d[F[V].to]={});x.model.beginUpdate();try{for(a=I+1;a<b.length;a++){var Q=this.editor.csvToArray(b[a]);if(Q.length==W.length){var E=new mxCell(B,new mxGeometry(z,y,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");E.vertex=!0;for(var T=0;T<Q.length;T++)x.setAttributeForCell(E,
-W[T],Q[T]);x.setAttributeForCell(E,"placeholders","1");E.style=x.replacePlaceholders(E,E.style);for(V=0;V<F.length;V++)d[F[V].to][E.getAttribute(F[V].to)]=E;null!=H&&"link"!=H&&(x.setLinkForCell(E,E.getAttribute(H)),x.setAttributeForCell(E,H,null));var N=this.editor.graph.getPreferredSizeForCell(E);E.geometry.width="auto"==f?N.width+u:parseFloat(f);E.geometry.height="auto"==g?N.height+u:parseFloat(g);y+=E.geometry.height+v;c.push(x.addCell(E))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted",
-"cells",c));for(var M=c.slice(),$=c.slice(),V=0;V<F.length;V++){var O=F[V];for(a=0;a<c.length;a++){var E=c[a],J=E.getAttribute(O.from);if(null!=J){x.setAttributeForCell(E,O.from,null);for(var R=J.split(","),T=0;T<R.length;T++){var X=d[O.to][R[T]];null!=X&&($.push(x.insertEdge(null,null,O.label||"",O.invert?X:E,O.invert?E:X,O.style||x.createCurrentEdgeStyle())),mxUtils.remove(O.invert?E:X,M))}}}}if(null!=G)for(a=0;a<c.length;a++){E=c[a];for(T=0;T<G.length;T++)x.setAttributeForCell(E,mxUtils.trim(G[T]),
+W[T],Q[T]);x.setAttributeForCell(E,"placeholders","1");E.style=x.replacePlaceholders(E,E.style);for(V=0;V<F.length;V++)d[F[V].to][E.getAttribute(F[V].to)]=E;null!=H&&"link"!=H&&(x.setLinkForCell(E,E.getAttribute(H)),x.setAttributeForCell(E,H,null));var O=this.editor.graph.getPreferredSizeForCell(E);E.geometry.width="auto"==f?O.width+u:parseFloat(f);E.geometry.height="auto"==g?O.height+u:parseFloat(g);y+=E.geometry.height+v;c.push(x.addCell(E))}}null==e&&x.fireEvent(new mxEventObject("cellsInserted",
+"cells",c));for(var M=c.slice(),$=c.slice(),V=0;V<F.length;V++){var N=F[V];for(a=0;a<c.length;a++){var E=c[a],J=E.getAttribute(N.from);if(null!=J){x.setAttributeForCell(E,N.from,null);for(var R=J.split(","),T=0;T<R.length;T++){var X=d[N.to][R[T]];null!=X&&($.push(x.insertEdge(null,null,N.label||"",N.invert?X:E,N.invert?E:X,N.style||x.createCurrentEdgeStyle())),mxUtils.remove(N.invert?E:X,M))}}}}if(null!=G)for(a=0;a<c.length;a++){E=c[a];for(T=0;T<G.length;T++)x.setAttributeForCell(E,mxUtils.trim(G[T]),
null)}var fa=new mxParallelEdgeLayout(x);fa.spacing=q;var da=function(){fa.execute(x.getDefaultParent());for(var a=0;a<c.length;a++){var b=x.getCellGeometry(c[a]);b.x=Math.round(x.snap(b.x));b.y=Math.round(x.snap(b.y));"auto"==f&&(b.width=Math.round(x.snap(b.width)));"auto"==g&&(b.height=Math.round(x.snap(b.height)))}};if("circle"==C){var U=new mxCircleLayout(x);U.resetEdges=!1;var Z=U.isVertexIgnored;U.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){U.execute(x.getDefaultParent());
da()},!0,A);A=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&$.length==2*c.length-1&&1==M.length){x.view.validate();var aa=new mxCompactTreeLayout(x,"horizontaltree"==C);aa.levelDistance=v;aa.edgeRouting=!1;this.executeLayout(function(){aa.execute(x.getDefaultParent(),0<M.length?M[0]:null)},!0,A);A=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==M.length){x.view.validate();var Y=new mxHierarchicalLayout(x,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
Y.intraCellSpacing=v;this.executeLayout(function(){Y.execute(x.getDefaultParent(),$);x.moveCells($,z,D)},!0,A);A=null}else if("organic"==C||"auto"==C&&$.length>c.length){x.view.validate();var S=new mxFastOrganicLayout(x);S.forceConstant=3*v;S.resetEdges=!1;var ha=S.isVertexIgnored;S.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};fa=new mxParallelEdgeLayout(x);fa.spacing=q;this.executeLayout(function(){S.execute(x.getDefaultParent());da()},!0,A);A=null}this.hideDialog()}finally{x.model.endUpdate()}null!=
@@ -7851,10 +7851,10 @@ null,this.offset=a.offset||0,this.expiresAt=m.Util.parseDate(a.expires)||Date.no
d,e;e=[];b=c=0;for(d=a.length;0<=d?d>c:c>d;b=0<=d?++c:--c)e.push(String.fromCharCode(a[b]));return e.join("")},m.Util.btoa=function(a){var b,c,d=Buffer,e,f,g;g=[];c=e=0;for(f=a.length;0<=f?f>e:e>f;c=0<=f?++e:--e)g.push(a.charCodeAt(c));return b=new d(g),b.toString("base64")}):!function(){var a,b;return b=function(a,b,c){var d,e;e=3-b;a<<=8*e;for(d=3;d>=e;)c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a>>6*d&63)),d-=1;for(d=b;3>d;)c.push("\x3d"),d+=1;return null},
a=function(a,b,c){var d;d=4-b;a<<=6*d;for(b=2;b>=d;)c.push(String.fromCharCode(a>>8*b&255)),b-=1;return null},m.Util.btoa=function(a){var c,d,e,f,g,k;f=[];e=g=d=c=0;for(k=a.length;0<=k?k>g:g>k;e=0<=k?++g:--g)c=c<<8|a.charCodeAt(e),d+=1,3===d&&(b(c,d,f),c=d=0);return 0<d&&b(c,d,f),f.join("")},m.Util.atob=function(b){var c,d,e,f,g,k,l;g=[];f=k=e=c=0;for(l=b.length;(0<=l?l>k:k>l)&&(d=b.charAt(f),"\x3d"!==d);f=0<=l?++k:--k)c=c<<6|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(d),
e+=1,4===e&&(a(c,e,g),c=e=0);return 0<e&&a(c,e,g),g.join("")}}(),function(){var a,b,c,d,e,f,g,k,l;if(m.Util.hmac=function(b,d){return a(c(k(b),k(d),b.length,d.length))},m.Util.sha1=function(b){return a(d(k(b),b.length))},m.Util.sha256=function(b){return a(e(k(b),b.length))},m.Env.require)try{b=m.Env.require("crypto"),b.createHmac&&b.createHash&&(m.Util.hmac=function(a,c){var d;return d=b.createHmac("sha1",c),d.update(a),d.digest("base64")},m.Util.sha1=function(a){var c;return c=b.createHash("sha1"),
-c.update(a),c.digest("base64")},m.Util.sha256=function(a){var c;return c=b.createHash("sha256"),c.update(a),c.digest("base64")})}catch(n){}return c=function(a,b,c,e){var f,g,k,l;return 16<b.length&&(b=d(b,e)),k=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(909522486^b[g]);return c}(),l=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(1549556828^b[g]);return c}(),f=d(k.concat(a),64+c),d(l.concat(f),84)},d=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,u,v,s,t,x,y;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>
-6<<4)+15]=b<<3;t=Array(80);c=1732584193;e=4023233417;g=2562383102;l=271733878;n=3285377520;q=0;for(v=a.length;v>q;){d=c;f=e;k=g;m=l;p=n;for(u=y=0;80>y;u=++y)16>u?t[u]=0|a[q+u<<2>>2]:(s=(0|t[u-3<<2>>2])^(0|t[u-8<<2>>2])^(0|t[u-14<<2>>2])^(0|t[u-16<<2>>2]),t[u]=s<<1|s>>>31),x=((c<<5|c>>>27)+n|0)+t[u<<2>>2]|0,x=20>u?x+((e&g|~e&l)+1518500249|0)|0:40>u?x+((e^g^l)+1859775393|0)|0:60>u?x+((e&g|e&l|g&l)-1894007588)|0:x+((e^g^l)-899497514|0)|0,n=l,l=g,g=e<<30|e>>>2,e=c,c=x;c=d+c|0;e=f+e|0;g=k+g|0;l=m+l|0;
-n=p+n|0;q=q+16|0}return[c,e,g,l,n]},e=function(a,b){var c,d,e,k,l,m,n,p,q,u,v,s,t,x,y,A,B,C,F,Z,aa,Y,S,ha,ca,ba,ga,ja,ea,la;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ea=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];u=f[4];s=f[5];x=f[6];Z=f[7];Y=0;for(ha=a.length;ha>Y;){d=c;k=e;m=l;q=p;v=u;t=s;y=x;aa=Z;for(S=la=0;64>la;S=++la)16>S?ja=ea[S]=0|a[Y+S<<2>>2]:(B=0|ea[S-15<<2>>2],A=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,F=0|ea[S-2<<2>>2],C=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10,ja=ea[S]=(A+(0|ea[S-7<<2>>2])|0)+
-(C+(0|ea[S-16<<2>>2])|0)|0),n=u&s^~u&x,ca=c&e^c&l^e&l,ba=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),ga=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),n=((Z+ga|0)+(n+ja|0)|0)+(0|g[S<<2>>2])|0,ca=ba+ca|0,Z=x,x=s,s=u,u=p+n|0,p=l,l=e,e=c,c=n+ca|0;c=d+c|0;e=k+e|0;l=m+l|0;p=q+p|0;u=v+u|0;s=t+s|0;x=y+x|0;Z=aa+Z|0;Y+=16}return[c,e,l,p,u,s,x,Z]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d=
+c.update(a),c.digest("base64")},m.Util.sha256=function(a){var c;return c=b.createHash("sha256"),c.update(a),c.digest("base64")})}catch(n){}return c=function(a,b,c,e){var f,g,k,l;return 16<b.length&&(b=d(b,e)),k=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(909522486^b[g]);return c}(),l=function(){var a,c;c=[];for(g=a=0;16>a;g=++a)c.push(1549556828^b[g]);return c}(),f=d(k.concat(a),64+c),d(l.concat(f),84)},d=function(a,b){var c,d,e,f,g,k,l,m,n,p,q,u,v,s,t,x,A;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>
+6<<4)+15]=b<<3;t=Array(80);c=1732584193;e=4023233417;g=2562383102;l=271733878;n=3285377520;q=0;for(v=a.length;v>q;){d=c;f=e;k=g;m=l;p=n;for(u=A=0;80>A;u=++A)16>u?t[u]=0|a[q+u<<2>>2]:(s=(0|t[u-3<<2>>2])^(0|t[u-8<<2>>2])^(0|t[u-14<<2>>2])^(0|t[u-16<<2>>2]),t[u]=s<<1|s>>>31),x=((c<<5|c>>>27)+n|0)+t[u<<2>>2]|0,x=20>u?x+((e&g|~e&l)+1518500249|0)|0:40>u?x+((e^g^l)+1859775393|0)|0:60>u?x+((e&g|e&l|g&l)-1894007588)|0:x+((e^g^l)-899497514|0)|0,n=l,l=g,g=e<<30|e>>>2,e=c,c=x;c=d+c|0;e=f+e|0;g=k+g|0;l=m+l|0;
+n=p+n|0;q=q+16|0}return[c,e,g,l,n]},e=function(a,b){var c,d,e,k,l,m,n,p,q,u,v,s,t,x,A,y,B,C,F,Z,aa,Y,S,ha,ca,ba,ga,ja,ea,la;a[b>>2]|=1<<31-((3&b)<<3);a[(b+8>>6<<4)+15]=b<<3;ea=Array(80);c=f[0];e=f[1];l=f[2];p=f[3];u=f[4];s=f[5];x=f[6];Z=f[7];Y=0;for(ha=a.length;ha>Y;){d=c;k=e;m=l;q=p;v=u;t=s;A=x;aa=Z;for(S=la=0;64>la;S=++la)16>S?ja=ea[S]=0|a[Y+S<<2>>2]:(B=0|ea[S-15<<2>>2],y=(B<<25|B>>>7)^(B<<14|B>>>18)^B>>>3,F=0|ea[S-2<<2>>2],C=(F<<15|F>>>17)^(F<<13|F>>>19)^F>>>10,ja=ea[S]=(y+(0|ea[S-7<<2>>2])|0)+
+(C+(0|ea[S-16<<2>>2])|0)|0),n=u&s^~u&x,ca=c&e^c&l^e&l,ba=(c<<30|c>>>2)^(c<<19|c>>>13)^(c<<10|c>>>22),ga=(u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25),n=((Z+ga|0)+(n+ja|0)|0)+(0|g[S<<2>>2])|0,ca=ba+ca|0,Z=x,x=s,s=u,u=p+n|0,p=l,l=e,e=c,c=n+ca|0;c=d+c|0;e=k+e|0;l=m+l|0;p=q+p|0;u=v+u|0;s=t+s|0;x=A+x|0;Z=aa+Z|0;Y+=16}return[c,e,l,p,u,s,x,Z]},f=[],g=[],function(){var a,b,c,d,e,k,l;b=function(a){return 4294967296*(a-Math.floor(a))|0};e=2;l=[];for(c=k=0;64>k;c=++k){for(;;){d=!0;for(a=2;e>=a*a;){if(0===e%a){d=
!1;break}a+=1}if(d)break;e+=1}8>c&&(f[c]=b(Math.pow(e,0.5)));g[c]=b(Math.pow(e,1/3));l.push(e+=1)}return l}(),a=function(a){var b,c,d,e,f;e="";b=0;for(d=4*a.length;d>b;)c=b,f=(a[c>>2]>>(3-(3&c)<<3)&255)<<16,c+=1,f|=(a[c>>2]>>(3-(3&c)<<3)&255)<<8,c+=1,f|=a[c>>2]>>(3-(3&c)<<3)&255,e+=l[f>>18&63],e+=l[f>>12&63],b+=1,e+=b>=d?"\x3d":l[f>>6&63],b+=1,e+=b>=d?"\x3d":l[63&f],b+=1;return e},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",k=function(a){var b,c,d,e;b=[];c=d=0;for(e=a.length;0<=
e?e>d:d>e;c=0<=e?++d:--d)b[c>>2]|=(a.charCodeAt(c)&255)<<(3-(3&c)<<3);return b}}(),m.Util.Oauth=function(){function a(b){this._loaded=this._appHash=this._error=this._tokenKid=this._tokenKey=this._token=this._authCode=this._stateParam=this._secret=this._id=null;this.setCredentials(b)}return a.prototype.setCredentials=function(a){if(a.key)this._id=a.key;else{if(!a.token)throw Error("No API key supplied");this._id=null}return this._secret=a.secret||null,this._appHash=null,this._error=null,this._loaded=
!0,this.reset(),a.token?(this._token=a.token,a.tokenKey&&(this._tokenKey=a.tokenKey,this._tokenKid=a.tokenKid)):a.oauthCode?this._authCode=a.oauthCode:a.oauthStateParam&&(this._stateParam=a.oauthStateParam),this},a.prototype.credentials=function(){var a;return a={},this._id&&(a.key=this._id),this._secret&&(a.secret=this._secret),null!==this._token?(a.token=this._token,this._tokenKey&&(a.tokenKey=this._tokenKey,a.tokenKid=this._tokenKid)):null!==this._authCode?a.oauthCode=this._authCode:null!==this._stateParam&&
@@ -8116,8 +8116,8 @@ OneDriveClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,func
OneDriveClient.prototype.logout=function(){this.setUser(null);this.clearCookie();WL.logout()};GitHubFile=function(a,c,f){DrawioFile.call(this,a,c);this.meta=f};mxUtils.extend(GitHubFile,DrawioFile);GitHubFile.prototype.getHash=function(){return encodeURIComponent("H"+encodeURIComponent(this.meta.org)+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?encodeURIComponent(this.meta.ref)+(null!=this.meta.path?"/"+this.meta.path:""):""):""))};
GitHubFile.prototype.getPublicUrl=function(a){null!=this.meta.download_url?mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(c){a(200<=c.getStatus()&&299>=c.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){a(null)})):a(null)};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};
GitHubFile.prototype.save=function(a,c,f){this.doSave(this.getTitle(),c,f)};GitHubFile.prototype.saveAs=function(a,c,f){this.doSave(a,c,f)};GitHubFile.prototype.doSave=function(a,c,f){var d=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=d;this.saveFile(a,!1,c,f)};
-GitHubFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var b=this.isModified,e=this.isModified();this.setModified(!1);this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=b;null!=f&&f();null==a?(this.setModified(e||this.isModified()),this.isModified()&&this.addUnsavedStatus()):(this.meta.sha=a,this.contentChanged())}),mxUtils.bind(this,function(a){this.savingFile=
-!1;this.isModified=b;this.setModified(e||this.isModified());this.isModified()&&this.addUnsavedStatus();null!=d&&d(a)}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,b)}));else null!=f&&f()};GitHubLibrary=function(a,c,f){GitHubFile.call(this,a,c,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.isAutosave=function(){return!1};GitHubLibrary.prototype.doSave=function(a,c,f){this.saveFile(a,!1,c,f)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){mxEventSource.call(this);this.ui=a;this.token=this.getPersistentToken()};mxUtils.extend(GitHubClient,mxEventSource);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.token=null;GitHubClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};
+GitHubFile.prototype.saveFile=function(a,c,f,d){if(this.isEditable())if(this.savingFile)null!=d&&d({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var b=this.isModified,e=this.isModified();this.setModified(!1);this.ui.gitHub.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=b;null!=f&&f();null==a?(this.setModified(e||this.isModified()),this.isModified()&&this.addUnsavedStatus()):(this.meta.sha=a.content.sha,this.meta.html_url=a.content.html_url,this.meta.download_url=
+a.content.download_url,this.contentChanged())}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=b;this.setModified(e||this.isModified());this.isModified()&&this.addUnsavedStatus();null!=d&&d(a)}))}else this.ui.pickFolder(App.MODE_GITHUB,mxUtils.bind(this,function(b){this.ui.gitHub.insertFile(a,this.getData(),mxUtils.bind(this,function(a){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(a)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=d&&d()}),!1,b)}));else null!=f&&f()};GitHubLibrary=function(a,c,f){GitHubFile.call(this,a,c,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.isAutosave=function(){return!1};GitHubLibrary.prototype.doSave=function(a,c,f){this.saveFile(a,!1,c,f)};GitHubLibrary.prototype.open=function(){};GitHubClient=function(a){mxEventSource.call(this);this.ui=a;this.token=this.getPersistentToken()};mxUtils.extend(GitHubClient,mxEventSource);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"23bc97120b9035515661":"89c9e4624ca416554489";GitHubClient.prototype.scope="repo";GitHubClient.prototype.extension=".xml";GitHubClient.prototype.baseUrl="https://api.github.com";GitHubClient.prototype.token=null;GitHubClient.prototype.setUser=function(a){this.user=a;this.fireEvent(new mxEventObject("userChanged"))};
GitHubClient.prototype.getUser=function(){return this.user};GitHubClient.prototype.clearPersistentToken=function(){var a=new Date;a.setYear(a.getFullYear()-1);document.cookie="ghauth\x3d; expires\x3d"+a.toUTCString()};GitHubClient.prototype.getPersistentToken=function(){var a=document.cookie,c=a.indexOf("ghauth\x3d");if(0<=c){var c=c+7,f=a.indexOf(";",c);0>f?f=a.length:postCookie=a.substring(f);a=a.substring(c,f);return 0<a.length?a:null}return null};
GitHubClient.prototype.setPersistentToken=function(a){if(null!=a){var c=new Date;c.setYear(c.getFullYear()+10);a="ghauth\x3d"+a+"; path\x3d/; expires\x3d"+c.toUTCString();"https"==document.location.protocol.toLowerCase()&&(a+=";secure");document.cookie=a}else this.clearPersistentToken()};
GitHubClient.prototype.updateUser=function(a,c){var f=mxUtils.bind(this,function(){var d=!0,b=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token\x3d"+this.token,mxUtils.bind(this,function(e){window.clearTimeout(b);d&&(401===e.getStatus()?this.authorizeRequest(f,c):(e=JSON.parse(e.getText()),this.setUser(new DrawioUser(e.id,e.email,e.name)),a()))}))});f()};
@@ -8126,13 +8126,13 @@ this.clientId+"\x26code\x3d"+b,mxUtils.bind(this,function(b){window.clearTimeout
GitHubClient.prototype.executeRequest=function(a,c,f,d,b){var e=mxUtils.bind(this,function(){var b=!0,d=window.setTimeout(mxUtils.bind(this,function(){b=!1;f({code:App.ERROR_TIMEOUT,retry:g})}),this.ui.timeout),e=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+e)};a.send(mxUtils.bind(this,function(){window.clearTimeout(d);b&&(200<=a.getStatus()&&299>=a.getStatus()?c(a):401===a.getStatus()?this.authorizeRequest(g,f):404===a.getStatus()?f({message:mxResources.get("fileNotFound")}):
409===a.getStatus()?f({status:409}):f({message:mxResources.get("error")+" "+a.getStatus()}))}),f)}),g=mxUtils.bind(this,function(){null==this.user?this.updateUser(e,f):e()});null===this.token?this.authorizeRequest(g,f):g()};GitHubClient.prototype.getLibrary=function(a,c,f){this.getFile(a,c,f,!0)};
GitHubClient.prototype.getFile=function(a,c,f,d){d=null!=d?d:!1;a=a.split("/");var b=a[0],e=a[1],g=a[2];a=a.slice(3,a.length).join("/");a=new mxXmlRequest(this.baseUrl+"/repos/"+b+"/"+e+"/contents/"+a+"?ref\x3d"+encodeURIComponent(g),null,"GET");this.executeRequest(a,mxUtils.bind(this,function(a){try{c(this.createGitHubFile(b,e,g,a,d))}catch(l){f(l)}}),f)};
-GitHubClient.prototype.createGitHubFile=function(a,c,f,d,b){d=JSON.parse(d.getText());a={org:a,repo:c,ref:f,name:d.name,path:d.path,sha:d.sha,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(c=/(\.png)$/i.test(d.name)?"data:image/png;base64,"+c:window.atob?atob(c):Base64.decode(c,!0));return b?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,f,d,b){this.insertFile(a,c,f,d,!0,b,!1)};
+GitHubClient.prototype.createGitHubFile=function(a,c,f,d,b){d=JSON.parse(d.getText());a={org:a,repo:c,ref:f,name:d.name,path:d.path,sha:d.sha,html_url:d.html_url,download_url:d.download_url};c=d.content;"base64"===d.encoding&&(c=/(\.png)$/i.test(d.name)?"data:image/png;base64,"+c:window.atob?atob(c):Base64.decode(c,!0));return b?new GitHubLibrary(this.ui,c,a):new GitHubFile(this.ui,c,a)};GitHubClient.prototype.insertLibrary=function(a,c,f,d,b){this.insertFile(a,c,f,d,!0,b,!1)};
GitHubClient.prototype.insertFile=function(a,c,f,d,b,e,g){b=null!=b?b:!1;e=e.split("/");var k=e[0],l=e[1],n=e[2],m=e.slice(3,e.length).join("/");0<m.length&&(m+="/");m+=a;this.checkExists(k+"/"+l+"/"+n+"/"+m,!0,mxUtils.bind(this,function(e,s){e?b?(g||(c=window.btoa?btoa(c):Base64.encode(c)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(k,l,n,m,a,c,s,mxUtils.bind(this,function(a){this.getFile(k+"/"+l+"/"+n+"/"+m,f,d,b)}),d)}),mxUtils.bind(this,function(){}))):f(new GitHubFile(this.ui,
-c,{org:k,repo:l,ref:n,name:a,path:m})):null!=d&&d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,f,d){var b=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){b();f(a)}),mxResources.get("changes"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
+c,{org:k,repo:l,ref:n,name:a,path:m,sha:s,isNew:!0})):null!=d&&d()}))};GitHubClient.prototype.showCommitDialog=function(a,c,f,d){var b=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(c?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){b();f(a)}),mxResources.get("changes"),null,null,null,null,mxUtils.bind(this,function(){d()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
GitHubClient.prototype.writeFile=function(a,c,f,d,b,e,g,k,l){b={path:d,message:b,content:e};null!=g&&(b.sha=g);a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+c+"/contents/"+d+"?ref\x3d"+encodeURIComponent(f),JSON.stringify(b),"PUT");this.executeRequest(a,mxUtils.bind(this,function(a){k(a)}),l)};
GitHubClient.prototype.checkExists=function(a,c,f){this.getFile(a,mxUtils.bind(this,function(d){if(c){var b=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){b();f(!0,d.meta.sha)},function(){b();f(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){f(!1)})}),mxUtils.bind(this,function(a){f(!0)}))};
-GitHubClient.prototype.saveFile=function(a,c,f){var d=a.meta.org,b=a.meta.repo,e=a.meta.ref,g=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha,mxUtils.bind(this,function(k){var l=window.btoa?btoa(a.getData()):Base64.encode(a.getData()),n=mxUtils.bind(this,function(a){this.writeFile(d,b,e,g,k,l,a,mxUtils.bind(this,function(a){a=JSON.parse(a.getText());c(a.content.sha)}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,mxResources.get("errorSavingFile"),
-mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){c(null)}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){n(a.meta.sha)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});n(a.meta.sha)}),mxUtils.bind(this,function(){c(null)}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};
+GitHubClient.prototype.saveFile=function(a,c,f){var d=a.meta.org,b=a.meta.repo,e=a.meta.ref,g=a.meta.path;this.showCommitDialog(a.meta.name,null==a.meta.sha||a.meta.isNew,mxUtils.bind(this,function(k){var l=window.btoa?btoa(a.getData()):Base64.encode(a.getData()),n=mxUtils.bind(this,function(m){this.writeFile(d,b,e,g,k,l,m,mxUtils.bind(this,function(b){delete a.meta.isNew;c(JSON.parse(b.getText()))}),mxUtils.bind(this,function(a){null!=a&&409==a.status?(resume=this.ui.spinner.pause(),a=new ErrorDialog(this.ui,
+mxResources.get("errorSavingFile"),mxResources.get("fileChangedOverwrite"),mxResources.get("cancel"),mxUtils.bind(this,function(){c(null)}),null,mxResources.get("overwrite"),mxUtils.bind(this,function(){resume();this.getFile(d+"/"+b+"/"+e+"/"+g,mxUtils.bind(this,function(a){n(a.meta.sha)}))})),this.ui.showDialog(a.container,340,150,!0,!1),a.init()):f(a)}))});n(a.meta.sha)}),mxUtils.bind(this,function(){c(null)}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};
GitHubClient.prototype.pickFolder=function(a){var c=mxUtils.bind(this,function(f){this.ui.showGitHubDialog(!1,mxUtils.bind(this,function(d,b,e,f){if(this.ui.spinner.spin(document.body,mxResources.get("loading"))){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+b+"/contents/"+f+"?ref\x3d"+encodeURIComponent(e),null,"GET");this.executeRequest(k,mxUtils.bind(this,function(c){this.ui.spinner.stop();a(d+"/"+b+"/"+e+"/"+f)}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("folderNotFound")},
null,function(){c(f)})}))}}),f)});c("")};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.ui.showGitHubDialog(!0,mxUtils.bind(this,function(c,f,d,b){a(c+"/"+f+"/"+d+"/"+b)}))};GitHubClient.prototype.logout=function(){this.setUser(null);this.clearPersistentToken();this.token=null};function ChatWindow(a,c,f,d,b,e,g,k){this.editorUi=a;this.doc=k.doc;this.rtModel=k.rt;this.chatHistory=k.chatHistory;this.chatMap=k.chatMap;this.configCollabInfo();f=document.createElement("div");f.id="mainDiv";k=document.createElement("div");k.style.padding="3px";f.appendChild(k);var l=document.createElement("div");l.style.paddingLeft="3px";l.style.paddingRight="15px";a.editor.graph.isEnabled()&&f.appendChild(l);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";k.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
@@ -8248,9 +8248,9 @@ this.extractGraphModelFromPng(b)),c(b))}),f,/(\.png)($|\?)/i.test(a))};
App.prototype.createFile=function(a,c,f,d,b,e,g){d=null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var k=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(a){k();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(a,c,g,mxUtils.bind(this,
function(a){k();this.fileCreated(a,f,e,b)}),l)):d==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(d,mxUtils.bind(this,function(d){this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l,!1,d)})):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l,
!1,g):d==App.MODE_BROWSER?(k(),d=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,f,e,b)}),l)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(k(),this.fileCreated(new LocalFile(this,c,a),f,e,b))}};
-App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0<c.length&&(b+="?libs\x3d"+c);b=this.getUrl(b);a.getMode()!=App.MODE_DEVICE&&(b+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var e=a.getData();a.setData(this.createFileData(0<e.length?this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,!0):null,null,a,window.location.protocol+"//"+window.location.hostname+b));var g=mxUtils.bind(this,function(){this.spinner.stop()}),
-k=mxUtils.bind(this,function(){g();var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);null!=c&&this.sidebar.showEntries(c);null!=d&&d()});!f&&null!=this.getCurrentFile()&&null!=this.mode?(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle())),window.openWindow(b,null,e)):e()});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){k()}),
-mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
+App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0<c.length&&(b+="?libs\x3d"+c);b=this.getUrl(b);a.getMode()!=App.MODE_DEVICE&&(b+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var e=window.location.protocol+"//"+window.location.hostname+b,g=this.getFileData(!0),k=a.getData();this.setFileData(k);a.setData(this.createFileData(this.getXmlFileData(),null,a,e));this.setFileData(g);var l=mxUtils.bind(this,function(){this.spinner.stop()}),
+n=mxUtils.bind(this,function(){l();var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);null!=c&&this.sidebar.showEntries(c);null!=d&&d()});!f&&null!=this.getCurrentFile()&&null!=this.mode?(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle())),window.openWindow(b,null,e)):e()});a.constructor==LocalFile||a.constructor==DriveFile?n():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){n()}),
+mxUtils.bind(this,function(a){l();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,f){this.hideDialog();f=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var d=localStorage.getItem(a);if(null!=d)this.fileLoaded(new StorageFile(this,d,a));else throw{message:mxResources.get("fileNotFound")};}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0)){this.spinner.stop();d=decodeURIComponent(a.substring(1));"\x3c"!=d.charAt(0)&&(d=this.editor.graph.decompress(d));var e=new LocalFile(this,d,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename);e.getHash=function(){return a};this.fileLoaded(e);this.setMode(null)}else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));this.loadTemplate(f,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=f,m=f.lastIndexOf("."),p=e.lastIndexOf("/");if(m>p&&0<p&&(e=e.substring(p+1,m),m=f.substring(m),".png"==m&&(m=".xml"),".svg"===m||
@@ -8272,7 +8272,7 @@ App.prototype.pickFolder=function(a,c,f){f=null!=f?f:!0;var d=this.spinner.pause
(e=a.data.folders[0].id,e=e.substring(e.lastIndexOf(".")+1),c(e))})):f&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){d();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(a,c,f,d,b,e){b==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,f):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):b==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,e,mxUtils.bind(this,function(a){this.spinner.stop()}),
mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),f,d,!1):b==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,d?this.base64ToBlob(a,f):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e,d)};
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,e,d)};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var c=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),c,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};App.prototype.status=function(a){this.editor.setStatus(a)};
App.prototype.showAuthDialog=function(a,c,f){var d=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=f&&f(a,function(){d()})}catch(c){this.editor.setStatus(c.message)}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){a&&(null==this.getCurrentFile()&&null==this.dialog)&&this.showSplash()}))};
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index a7788064..95cb8973 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -3,10 +3,10 @@ var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=!1;!function(a,b
c[d])}return a}function g(a){this.opts=f(a||{},g.defaults,r)}function k(){function c(b,d){return a("\x3c"+b+' xmlns\x3d"urn:schemas-microsoft.com:vml" class\x3d"spin-vml"\x3e',d)}p.addRule(".spin-vml","behavior:url(#default#VML)");g.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:m+" "+m,coordorigin:-l+" "+-l}),{width:m,height:m})}function k(a,g,m){b(n,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~g}),b(e(c("roundrect",{arcsize:d.corners}),{width:l,height:d.width,left:d.radius,
top:-d.width>>1,filter:m}),c("fill",{color:"string"==typeof d.color?d.color:d.color[a%d.color.length],opacity:d.opacity}),c("stroke",{opacity:0}))))}var g,l=d.length+d.width,m=2*l;g=2*-(d.width+d.length)+"px";var n=e(f(),{position:"absolute",top:g,left:g});if(d.shadow)for(g=1;g<=d.lines;g++)k(g,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(g=1;g<=d.lines;g++)k(g);return b(a,n)};g.prototype.opacity=function(a,b,c,d){a=a.firstChild;d=d.shadow&&
d.lines||0;a&&b+d<a.childNodes.length&&(a=a.childNodes[b+d],a=a&&a.firstChild,a=a&&a.firstChild,a&&(a.opacity=c))}}var l,m=["webkit","Moz","ms","O"],n={},p=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),r={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};g.defaults={};f(g.prototype,
-{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width;if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!l){var k,g=0,m=(d.lines-1)*(1-d.direction)/2,n=d.fps,p=n/d.speed,r=(1-d.opacity)/(p*d.trail/100),s=p/d.lines;!function G(){g++;for(var a=0;a<d.lines;a++)k=Math.max(1-(g+(d.lines-a)*s)%p*r,d.opacity),c.opacity(f,
-a*d.direction+m,k,d);c.timeout=c.el&&setTimeout(G,~~(1E3/n))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function k(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*m+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var g,
+{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width;if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!l){var k,g=0,m=(d.lines-1)*(1-d.direction)/2,n=d.fps,p=n/d.speed,r=(1-d.opacity)/(p*d.trail/100),u=p/d.lines;!function H(){g++;for(var a=0;a<d.lines;a++)k=Math.max(1-(g+(d.lines-a)*u)%p*r,d.opacity),c.opacity(f,
+a*d.direction+m,k,d);c.timeout=c.el&&setTimeout(H,~~(1E3/n))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function k(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*m+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var g,
m=0,n=(f.lines-1)*(1-f.direction)/2;m<f.lines;m++)g=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:l&&c(f.opacity,f.trail,n+m*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(g,e(k("#000","0 0 4px #000"),{top:"2px"})),b(d,b(g,k("string"==typeof f.color?f.color:f.color[m%f.color.length],"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});
-var s=e(a("group"),{behavior:"url(#default#VML)"});return!d(s,"transform")&&s.adj?k():l=d(s,"animation"),g});(function(){var a=void 0,b=!0,c=null,d=!1,e=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),
+var u=e(a("group"),{behavior:"url(#default#VML)"});return!d(u,"transform")&&u.adj?k():l=d(u,"animation"),g});(function(){var a=void 0,b=!0,c=null,d=!1,e=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),
"all-scroll col-resize crosshair default e-resize hand help move n-resize ne-resize no-drop not-allowed nw-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait".split(" "),"armenian decimal decimal-leading-zero disc georgian lower-alpha lower-greek lower-latin lower-roman square upper-alpha upper-latin upper-roman".split(" "),"100 200 300 400 500 600 700 800 900 bold bolder lighter".split(" "),"block-level inline-level table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group".split(" "),
"condensed expanded extra-condensed extra-expanded narrower semi-condensed semi-expanded ultra-condensed ultra-expanded wider".split(" "),"inherit inline inline-block inline-box inline-flex inline-grid inline-list-item inline-stack inline-table run-in".split(" "),"behind center-left center-right far-left far-right left-side leftwards right-side rightwards".split(" "),"large larger small smaller x-large x-small xx-large xx-small".split(" "),"dashed dotted double groove outset ridge solid".split(" "),
"ease ease-in ease-in-out ease-out linear step-end step-start".split(" "),"at closest-corner closest-side ellipse farthest-corner farthest-side".split(" "),"baseline middle sub super text-bottom text-top".split(" "),"caption icon menu message-box small-caption status-bar".split(" "),"fast faster slow slower x-fast x-slow".split(" "),["above","below","higher","level","lower"],["cursive","fantasy","monospace","sans-serif","serif"],["loud","silent","soft","x-loud","x-soft"],["no-repeat","repeat-x","repeat-y",
@@ -35,32 +35,32 @@ e[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup
"rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay",
"translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},g;for(g in f)"string"===typeof f[g]&&Object.hasOwnProperty.call(f,g)&&(f[g]=f[f[g]]);"undefined"!==typeof window&&(window.cssSchema=f);var k,l;(function(){function a(b){var c=parseInt(b.substring(1),16);return 65535<c?(c-=65536,String.fromCharCode(55296+(c>>10),56320+(c&1023))):c==c?String.fromCharCode(c):" ">b[1]?"":b[1]}function b(a,c){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,
c)+'"'}function c(a){return e[a]||(e[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function d(a){return f[a]||(f[a]=("\u0010">a?"%0":"%")+a.charCodeAt(0).toString(16))}var e={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])",
-"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(b){return b.replace(m,a)};k=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",k=0,m=a.length;k<m;++k){var p=l(a[k]),r=p.length,s=p.charCodeAt(0),p=34==s||39==s?b(p.substring(1,r-1),c):47==s&&1<r||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
-p||32>=s?" ":/url\(/i.test(p)?"url("+b(p.replace(n,""),d)+")":p;if(f!=p||" "!=p)a[e++]=f=p}a.length=e;return a}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function a(b){b=(""+b).match(n);return!b?c:new k(g(b[1]),g(b[2]),g(b[3]),g(b[4]),g(b[5]),g(b[6]),g(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):c}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a===
+"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(b){return b.replace(m,a)};k=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",k=0,m=a.length;k<m;++k){var p=l(a[k]),r=p.length,u=p.charCodeAt(0),p=34==u||39==u?b(p.substring(1,r-1),c):47==u&&1<r||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
+p||32>=u?" ":/url\(/i.test(p)?"url("+b(p.replace(n,""),d)+")":p;if(f!=p||" "!=p)a[e++]=f=p}a.length=e;return a}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function a(b){b=(""+b).match(n);return!b?c:new k(g(b[1]),g(b[2]),g(b[3]),g(b[4]),g(b[5]),g(b[6]),g(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):c}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a===
c)return c;a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var b=l,d;(d=a.replace(b,"$1"))!=a;a=d);return a}function f(a,b){var c=a.T(),d=b.K();d?c.ga(b.j):d=b.X();d?c.da(b.n):d=b.Y();d?c.ea(b.k):d=b.$();var k=b.g,g=e(k);if(d)c.ca(b.V()),g=g&&g.replace(m,"");else if(d=!!k){if(47!==g.charCodeAt(0))var g=e(c.g||"").replace(m,""),l=g.lastIndexOf("/")+1,g=e((l?g.substring(0,l):"")+e(k)).replace(m,"")}else g=g&&g.replace(m,""),g!==k&&c.G(g);d?c.G(g):d=b.aa();d?c.O(b.l):d=b.Z();d&&c.fa(b.o);
return c}function k(a,b,c,d,e,f,g){this.j=a;this.n=b;this.k=c;this.h=d;this.g=e;this.l=f;this.o=g}function g(a){return"string"==typeof a&&0<a.length?a:c}var l=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),m=/^(?:\.\.\/)*(?:\.\.$)?/;k.prototype.toString=function(){var a=[];c!==this.j&&a.push(this.j,":");c!==this.k&&(a.push("//"),c!==this.n&&a.push(this.n,"@"),a.push(this.k),c!==this.h&&a.push(":",this.h.toString()));c!==this.g&&a.push(this.g);c!==this.l&&a.push("?",
this.l);c!==this.o&&a.push("#",this.o);return a.join("")};k.prototype.T=function(){return new k(this.j,this.n,this.k,this.h,this.g,this.l,this.o)};k.prototype.W=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};k.prototype.ga=function(a){this.j=a?a:c};k.prototype.K=function(){return c!==this.j};k.prototype.da=function(a){this.n=a?a:c};k.prototype.X=function(){return c!==this.n};k.prototype.ea=function(a){this.k=a?a:c;this.G(this.g)};k.prototype.Y=function(){return c!==this.k};k.prototype.V=
function(){return this.h&&decodeURIComponent(this.h)};k.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=c};k.prototype.$=function(){return c!==this.h};k.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};k.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=c};k.prototype.O=function(a){this.l=a?a:c};k.prototype.aa=function(){return c!==this.l};k.prototype.ba=function(a){if("object"===typeof a&&
!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="\x26",e&&b.push("\x3d",encodeURIComponent(e.toString()));this.l=b.join("")};k.prototype.fa=function(a){this.o=a?a:c};k.prototype.Z=function(){return c!==this.o};var n=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,r=/[\#\?]/g;k.parse=a;k.create=function(a,e,f,g,l,m,n){a=new k(b(a,p),b(e,p),"string"==typeof f?encodeURIComponent(f):c,0<g?g.toString():c,b(l,r),c,"string"==typeof n?encodeURIComponent(n):c);m&&("string"===typeof m?a.O(m.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(m));return a};k.N=f;k.ma=e;k.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},N:function(b,c){return b?f(a(b),a(c)).toString():""+c}};return k}();"undefined"!==typeof window&&(window.URI=
-m);var n=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(E,k)+'")':'url("about:blank")'}function k(a){return C[a]}function g(a,b){return a?m.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(D);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function A(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var E=/[\n\f\r\"\'()*<>]/g,C={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function R(b,c,d,k,m){b=A(b);var n=f[b];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,r=p&80,s=p&1536,q=NaN,G=0,u=0;G<c.length;++G){var D=c[G].toLowerCase(),x=D.charCodeAt(0),F,H,C,E,Q,ga;if(32===x)D="";else if(34===x)D=16===r?d?e(t(g(k,l(c[G].substring(1,D.length-1))),b,d)):"":p&8&&!(r&r-1)?D:"";else if("inherit"!==D){if(Q=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
-{};for(var $=Q.length;0<=--$;)for(var ha=Q[$],ka=ha.length;0<=--ka;)ea[ha[ka]]=a;ea=n.cssLitMap=ea}Q=ea}else Q=a;if(!(ga=Q,ga[A(D)]===a))if(35===x&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=p&2?D:"";else if(48<=x&&57>=x)D=p&1?D:"";else if(F=D.charCodeAt(1),H=D.charCodeAt(2),C=48<=F&&57>=F,E=48<=H&&57>=H,43===x&&(C||46===F&&E))D=p&1?(C?"":"0")+D.substring(1):"";else if(45===x&&(C||46===F&&E))D=p&4?(C?"-":"-0")+D.substring(1):p&1?"0":"";else if(46===x&&C)D=p&1?"0"+D:"";else if('url("'===D.substring(0,5))D=
-d&&p&16?e(t(g(k,c[G].substring(5,D.length-2)),b,d)):"";else if("("===D.charAt(D.length-1))a:{Q=c;ea=G;D=1;$=ea+1;for(x=Q.length;$<x&&D;)ha=Q[$++],D+=")"===ha?-1:/^[^"']*\($/.test(ha);if(!D){D=Q[ea].toLowerCase();x=A(D);Q=Q.splice(ea,$-ea,"");ea=n.cssFns;$=0;for(ha=ea.length;$<ha;++$)if(ea[$].substring(0,x.length)==x){Q[0]=Q[Q.length-1]="";R(ea[$],Q,d,k);D=D+Q.join(" ")+")";break a}}D=""}else D=s&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?m&&512===s?c[G]+m:1024===s&&f[D]&&"number"===typeof f[D].oa?
-D:"":/^\w+$/.test(D)&&64===r&&p&8?q+1===u?(c[q]=c[q].substring(0,c[q].length-1)+" "+D+'"',""):(q=u,'"'+D+'"'):""}D&&(c[u++]=D)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();var G=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function k(p,r){function s(c,f,k){var g,n,p,r,t,D=b;g="";if(c<f)if(t=a[c],"*"===t)++c,g=t;else if(/^[a-zA-Z]/.test(t)&&(n=m(t.toLowerCase(),[])))"tagName"in n&&(t=n.tagName),++c,g=t;for(r=p=n="";D&&c<f;++c)if(t=a[c],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?D=d:n+=t+l;else if("."===t)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(t=a[c])&&!/^_|__$/.test(t)?n+="."+t:D=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();t=u.m[g+"::"+v];t!==+t&&(t=u.m["*::"+
-v]);var x;e.ia?(x=e.ia(g,v),"string"!==typeof x&&(D=d,x=v),D&&t!==+t&&(t=u.d.NONE)):(x=v,t!==+t&&(D=d));var F=v="",y=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],F=a[c++],/^[0-9A-Za-z:_\-]+$/.test(F)?F='"'+F+'"':"]"===F&&(F='""',--c),/^"([^\"\\]|\\.)*"$/.test(F)||(D=d),(y="i"===a[c])&&++c);"]"!==a[c]&&(++c,D=d);switch(t){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=F&&!y?F='"'+F.substring(1,F.length-
-1)+l+'"':"|\x3d"===v||""===v||(D=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==v&&(D=d);break;default:D=d}D&&(p+="["+x.replace(/[^\w-]/g,"\\$\x26")+v+F+(y?" i]":"]"))}else if(c<f&&":"===a[c])if(t=a[++c],G.test(t))r+=":"+t;else break;else break;c!==f&&(D=d);D&&(c=(g+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+k)&&q.push(c);return D}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var q=[],t=p,D=b,v=p;D&&v<r;++v){var x=a[v];if(H[x]===H||" "===x)s(t,v,x)?t=v+1:D=d}s(t,r,"")||(D=d);return D?(q.length&&(t=
-q.join(""),g!==c&&(t="."+g+" "+t),n.push(t)),b):!f||f(a.slice(p,r))}var g=e.na,l=e.L,m=e.Aa,n=[],p=0,r,s=0,q;for(r=0;r<a.length;++r)if(q=a[r],"("==q||"["==q?(++s,b):")"==q||"]"==q?(s&&--s,b):!(" "==a[r]&&(s||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=s=0;r<p;++r)if(","===a[r]){if(!k(s,r))return c;s=r+1}return!k(s,p)?c:n};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,k=/^\s*url\s*[(]([^)]*)[)]\s*$/,g;return(g=/^\s*["]([^"]*)["]\s*$/.exec(a))||(g=b.exec(a))||(g=d.exec(a))||(g=f.exec(a))||(g=k.exec(a))?g[1]:c}function f(k,l,m,r,G,u,D){function v(){C=
-H.length&&H[H.length-1]===c}var x=a,F=D||[0],H=[],C=d;q(l,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(a,b){if(C)a=c;else if("@media"===a)x.push("@media"," ",s(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(x.push(a," ",d+m.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof u){var l=s(b.slice(1));if("not all"!==l){++F[0];var n=[];x.push(n);var p=t(g(k,e(b[0])),function(a){var b=
-f(p,a.qa,m,r,G,u,F);--F[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;n[0]=a;u(a,!!F[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");C=!a;H.push(a)},endAtrule:function(){H.pop();C||x.push(";");v()},startBlock:function(){C||x.push("{")},endBlock:function(){C||(x.push("}"),C=b)},startRuleset:function(d){if(!C){var e=a;"@keyframes"===H[H.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-C=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,m),!d||!d.length?C=b:e=d.join(", "));C||x.push(e,"{")}H.push(c)},endRuleset:function(){H.pop();C||x.push("}");v()},declaration:function(a,c){if(!C){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);n(a,c,r,k,m.L);c.length&&x.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!F[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
-typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function a(b,d,e,f,k){for(var g=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(k||";"===b[d])){k=g+1;var l=d;k<e&&" "===b[k]&&++k;l>k&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[g].toLowerCase(),b.slice(k,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,k,g){++f;for(g.startBlock&&g.startBlock();f<k;){var l=
+m);var n=a,p=a,r=a,u=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(A,k)+'")':'url("about:blank")'}function k(a){return D[a]}function g(a,b){return a?m.ha.N(a,b):b}function s(a,b,d){if(!d)return c;var e=(""+a).match(C);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function E(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,D={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},C=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function R(b,c,d,k,m){b=E(b);var n=f[b];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,r=p&80,u=p&1536,q=NaN,H=0,t=0;H<c.length;++H){var C=c[H].toLowerCase(),x=C.charCodeAt(0),F,G,D,A,Q,ga;if(32===x)C="";else if(34===x)C=16===r?d?e(s(g(k,l(c[H].substring(1,C.length-1))),b,d)):"":p&8&&!(r&r-1)?C:"";else if("inherit"!==C){if(Q=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
+{};for(var $=Q.length;0<=--$;)for(var ha=Q[$],ka=ha.length;0<=--ka;)ea[ha[ka]]=a;ea=n.cssLitMap=ea}Q=ea}else Q=a;if(!(ga=Q,ga[E(C)]===a))if(35===x&&/^#(?:[0-9a-f]{3}){1,2}$/.test(C))C=p&2?C:"";else if(48<=x&&57>=x)C=p&1?C:"";else if(F=C.charCodeAt(1),G=C.charCodeAt(2),D=48<=F&&57>=F,A=48<=G&&57>=G,43===x&&(D||46===F&&A))C=p&1?(D?"":"0")+C.substring(1):"";else if(45===x&&(D||46===F&&A))C=p&4?(D?"-":"-0")+C.substring(1):p&1?"0":"";else if(46===x&&D)C=p&1?"0"+C:"";else if('url("'===C.substring(0,5))C=
+d&&p&16?e(s(g(k,c[H].substring(5,C.length-2)),b,d)):"";else if("("===C.charAt(C.length-1))a:{Q=c;ea=H;C=1;$=ea+1;for(x=Q.length;$<x&&C;)ha=Q[$++],C+=")"===ha?-1:/^[^"']*\($/.test(ha);if(!C){C=Q[ea].toLowerCase();x=E(C);Q=Q.splice(ea,$-ea,"");ea=n.cssFns;$=0;for(ha=ea.length;$<ha;++$)if(ea[$].substring(0,x.length)==x){Q[0]=Q[Q.length-1]="";R(ea[$],Q,d,k);C=C+Q.join(" ")+")";break a}}C=""}else C=u&&/^-?[a-z_][\w\-]*$/.test(C)&&!/__$/.test(C)?m&&512===u?c[H]+m:1024===u&&f[C]&&"number"===typeof f[C].oa?
+C:"":/^\w+$/.test(C)&&64===r&&p&8?q+1===t?(c[q]=c[q].substring(0,c[q].length-1)+" "+C+'"',""):(q=t,'"'+C+'"'):""}C&&(c[t++]=C)}1===t&&'url("about:blank")'===c[0]&&(t=0);c.length=t}}}();var H=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
+G={};G["\x3e"]=G["+"]=G["~"]=G;p=function(a,e,f){function k(p,r){function u(c,f,k){var g,n,p,r,s,C=b;g="";if(c<f)if(s=a[c],"*"===s)++c,g=s;else if(/^[a-zA-Z]/.test(s)&&(n=m(s.toLowerCase(),[])))"tagName"in n&&(s=n.tagName),++c,g=s;for(r=p=n="";C&&c<f;++c)if(s=a[c],"#"===s.charAt(0))/^#_|__$|[^\w#:\-]/.test(s)?C=d:n+=s+l;else if("."===s)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(s=a[c])&&!/^_|__$/.test(s)?n+="."+s:C=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();s=t.m[g+"::"+v];s!==+s&&(s=t.m["*::"+
+v]);var x;e.ia?(x=e.ia(g,v),"string"!==typeof x&&(C=d,x=v),C&&s!==+s&&(s=t.d.NONE)):(x=v,s!==+s&&(C=d));var F=v="",y=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],F=a[c++],/^[0-9A-Za-z:_\-]+$/.test(F)?F='"'+F+'"':"]"===F&&(F='""',--c),/^"([^\"\\]|\\.)*"$/.test(F)||(C=d),(y="i"===a[c])&&++c);"]"!==a[c]&&(++c,C=d);switch(s){case t.d.CLASSES:case t.d.LOCAL_NAME:case t.d.NONE:break;case t.d.GLOBAL_NAME:case t.d.ID:case t.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=F&&!y?F='"'+F.substring(1,F.length-
+1)+l+'"':"|\x3d"===v||""===v||(C=d);break;case t.d.URI:case t.d.URI_FRAGMENT:""!==v&&(C=d);break;default:C=d}C&&(p+="["+x.replace(/[^\w-]/g,"\\$\x26")+v+F+(y?" i]":"]"))}else if(c<f&&":"===a[c])if(s=a[++c],H.test(s))r+=":"+s;else break;else break;c!==f&&(C=d);C&&(c=(g+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+k)&&q.push(c);return C}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var q=[],s=p,C=b,v=p;C&&v<r;++v){var x=a[v];if(G[x]===G||" "===x)u(s,v,x)?s=v+1:C=d}u(s,r,"")||(C=d);return C?(q.length&&(s=
+q.join(""),g!==c&&(s="."+g+" "+s),n.push(s)),b):!f||f(a.slice(p,r))}var g=e.na,l=e.L,m=e.Aa,n=[],p=0,r,u=0,q;for(r=0;r<a.length;++r)if(q=a[r],"("==q||"["==q?(++u,b):")"==q||"]"==q?(u&&--u,b):!(" "==a[r]&&(u||G[a[r-1]]===G||G[a[r+1]]===G)))a[p++]=a[r];a.length=p;p=a.length;for(r=u=0;r<p;++r)if(","===a[r]){if(!k(u,r))return c;u=r+1}return!k(u,p)?c:n};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
+"i");u=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,k=/^\s*url\s*[(]([^)]*)[)]\s*$/,g;return(g=/^\s*["]([^"]*)["]\s*$/.exec(a))||(g=b.exec(a))||(g=d.exec(a))||(g=f.exec(a))||(g=k.exec(a))?g[1]:c}function f(k,l,m,r,H,t,C){function v(){G=
+D.length&&D[D.length-1]===c}var x=a,F=C||[0],D=[],G=d;q(l,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(a,b){if(G)a=c;else if("@media"===a)x.push("@media"," ",u(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(x.push(a," ",d+m.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof t){var l=u(b.slice(1));if("not all"!==l){++F[0];var n=[];x.push(n);var p=s(g(k,e(b[0])),function(a){var b=
+f(p,a.qa,m,r,H,t,F);--F[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;n[0]=a;t(a,!!F[0])},H)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");G=!a;D.push(a)},endAtrule:function(){D.pop();G||x.push(";");v()},startBlock:function(){G||x.push("{")},endBlock:function(){G||(x.push("}"),G=b)},startRuleset:function(d){if(!G){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+G=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,m),!d||!d.length?G=b:e=d.join(", "));G||x.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();G||x.push("}");v()},declaration:function(a,c){if(!G){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);n(a,c,r,k,m.L);c.length&&x.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!F[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=u);var q,s;(function(){function a(b,d,e,f,k){for(var g=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(k||";"===b[d])){k=g+1;var l=d;k<e&&" "===b[k]&&++k;l>k&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[g].toLowerCase(),b.slice(k,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,k,g){++f;for(g.startBlock&&g.startBlock();f<k;){var l=
b[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?a(b,f,k,g,d):"{"===l?c(b,f,k,g):e(b,f,k,g)}g.endBlock&&g.endBlock();return f}function e(a,c,d,k){var g=c,m=f(a,c,d,b);if(0>m)return m=~m,m===g?m+1:m;var n=a[m];if("{"!==n)return m===g?m+1:m;c=m+1;m>g&&" "===a[m-1]&&--m;for(k.startRuleset&&k.startRuleset(a.slice(g,m));c<d;){n=a[c];if("}"===n){++c;break}c=" "===n?c+1:l(a,c,d,k)}k.endRuleset&&k.endRuleset();return c}function f(a,b,c,d){for(var e,k=[],g=-1;b<c;++b)if(e=a[b].charAt(0),
-"["===e||"("===e)k[++g]=e;else if("]"===e&&"["===k[g]||")"===e&&"("===k[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=g&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!m.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var n=f(a,b,c,d);if(0>n)n=~n;else{for(var p=[],r=0,s=b;s<n;++s)b=a[s]," "!==b&&(p[r++]=b);if(n<c){do{b=a[n];
-if(";"===b||"}"===b)break;r=0}while(++n<c);";"===b&&++n}r&&e.declaration&&e.declaration(k.toLowerCase(),p)}return n}q=function(c,d){var f=k(c);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?a(f,g,l,d,b):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var m=/^-?[a-z]/i;t=function(a,b){for(var c=k(a),d=0,e=c.length;d<e;)d=" "!==c[d]?l(c,d,e,b):d+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
-t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};u.atype=u.d;u.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
+"["===e||"("===e)k[++g]=e;else if("]"===e&&"["===k[g]||")"===e&&"("===k[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=g&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!m.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var n=f(a,b,c,d);if(0>n)n=~n;else{for(var p=[],r=0,u=b;u<n;++u)b=a[u]," "!==b&&(p[r++]=b);if(n<c){do{b=a[n];
+if(";"===b||"}"===b)break;r=0}while(++n<c);";"===b&&++n}r&&e.declaration&&e.declaration(k.toLowerCase(),p)}return n}q=function(c,d){var f=k(c);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?a(f,g,l,d,b):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var m=/^-?[a-z]/i;s=function(a,b){for(var c=k(a),d=0,e=c.length;d<e;)d=" "!==c[d]?l(c,d,e,b):d+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
+s);var t={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};t.atype=t.d;t.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,"*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::tabindex":0,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,
"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"audio::src":1,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,
"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,
@@ -70,43 +70,43 @@ t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,
"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,
"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,
"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,
-"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};u.ATTRIBS=u.m;u.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};u.eflags=
-u.c;u.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
-kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};u.ELEMENTS=u.f;u.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
+"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};t.ATTRIBS=t.m;t.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};t.eflags=
+t.c;t.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
+kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};t.ELEMENTS=t.f;t.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",
col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",
frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",
li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
-time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};u.ELEMENT_DOM_INTERFACES=u.Q;u.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};u.ueffects=u.P;u.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);e=function(e){function f(a,b){var c;if(M.hasOwnProperty(b))c=M[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(Y))?String.fromCharCode(parseInt(d[1],
+time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};t.ELEMENT_DOM_INTERFACES=t.Q;t.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};t.ueffects=t.P;t.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
+t.URIEFFECTS=t.J;t.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};t.ltypes=t.M;t.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};t.LOADERTYPES=t.I;"undefined"!==typeof window&&(window.html4=t);e=function(e){function f(a,b){var c;if(M.hasOwnProperty(b))c=M[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(Y))?String.fromCharCode(parseInt(d[1],
16)):J&&L.test(b)?(J.innerHTML="\x26"+b+";",d=J.textContent,M[b]=d):"\x26"+b+";"}return c}function k(a){return a.replace(S,f)}function g(a){return(""+a).replace(ba,"\x26amp;").replace(Z,"\x26lt;").replace(aa,"\x26gt;").replace(U,"\x26#34;")}function l(a){return a.replace(P,"\x26amp;$1").replace(Z,"\x26lt;").replace(aa,"\x26gt;")}function n(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,
-e){var f,k=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ga)f=f.split(k);else{for(var g=[],l=0,m;(m=k.exec(f))!==c;)g.push(f.substring(l,m.index)),g.push(m[0]),l=m.index+m[0].length;g.push(f.substring(l));f=g}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,k){try{a.H&&0==d&&a.H(k);for(var g,l,m,n=c.length;d<n;){var t=c[d++],u=c[d];switch(t){case "\x26":ca.test(u)?(a.e&&a.e("\x26"+u,k,$,p(a,c,d,f,k)),d++):a.e&&a.e("\x26amp;",k,$,p(a,c,d,f,k));break;case "\x3c/":if(g=
-/^([-\w:]+)[^\'\"]*/.exec(u))if(g[0].length===u.length&&"\x3e"===c[d+1])d+=2,m=g[1].toLowerCase(),a.t&&a.t(m,k,$,p(a,c,d,f,k));else{var B=c,D=d,x=a,Q=k,y=$,z=f,T=q(B,D);T?(x.t&&x.t(T.name,Q,y,p(x,B,D,z,Q)),d=T.next):d=B.length}else a.e&&a.e("\x26lt;/",k,$,p(a,c,d,f,k));break;case "\x3c":if(g=/^([-\w:]+)\s*\/?/.exec(u))if(g[0].length===u.length&&"\x3e"===c[d+1]){d+=2;m=g[1].toLowerCase();a.w&&a.w(m,[],k,$,p(a,c,d,f,k));var H=e.f[m];H&ea&&(d=s(c,{name:m,next:d,c:H},a,k,$,f))}else{var B=c,D=a,x=k,Q=
-$,y=f,M=q(B,d);M?(D.w&&D.w(M.name,M.R,x,Q,p(D,B,M.next,y,x)),d=M.c&ea?s(B,M,D,x,Q,y):M.next):d=B.length}else a.e&&a.e("\x26lt;",k,$,p(a,c,d,f,k));break;case "\x3c!--":if(!f.C){for(l=d+1;l<n&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<n){if(a.A){var A=c.slice(d,l).join("");a.A(A.substr(0,A.length-2),k,$,p(a,c,l+1,f,k))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",k,$,p(a,c,d,f,k));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",
-k,$,p(a,c,d,f,k))}else a.e&&a.e("\x26lt;!",k,$,p(a,c,d,f,k));break;case "\x3c?":if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",k,$,p(a,c,d,f,k));break;case "\x3e":a.e&&a.e("\x26gt;",k,$,p(a,c,d,f,k));break;case "":break;default:a.e&&a.e(t,k,$,p(a,c,d,f,k))}}a.B&&a.B(k)}catch(E){if(E!==$)throw E;}}function s(a,b,c,d,f,k){var g=a.length;ha.hasOwnProperty(b.name)||(ha[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var m=ha[b.name],n=b.next,r=b.next+1;r<g&&!("\x3c/"===
+e){var f,k=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ga)f=f.split(k);else{for(var g=[],l=0,m;(m=k.exec(f))!==c;)g.push(f.substring(l,m.index)),g.push(m[0]),l=m.index+m[0].length;g.push(f.substring(l));f=g}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,k){try{a.H&&0==d&&a.H(k);for(var g,l,m,n=c.length;d<n;){var s=c[d++],t=c[d];switch(s){case "\x26":ca.test(t)?(a.e&&a.e("\x26"+t,k,$,p(a,c,d,f,k)),d++):a.e&&a.e("\x26amp;",k,$,p(a,c,d,f,k));break;case "\x3c/":if(g=
+/^([-\w:]+)[^\'\"]*/.exec(t))if(g[0].length===t.length&&"\x3e"===c[d+1])d+=2,m=g[1].toLowerCase(),a.t&&a.t(m,k,$,p(a,c,d,f,k));else{var B=c,C=d,x=a,Q=k,y=$,z=f,T=q(B,C);T?(x.t&&x.t(T.name,Q,y,p(x,B,C,z,Q)),d=T.next):d=B.length}else a.e&&a.e("\x26lt;/",k,$,p(a,c,d,f,k));break;case "\x3c":if(g=/^([-\w:]+)\s*\/?/.exec(t))if(g[0].length===t.length&&"\x3e"===c[d+1]){d+=2;m=g[1].toLowerCase();a.w&&a.w(m,[],k,$,p(a,c,d,f,k));var G=e.f[m];G&ea&&(d=u(c,{name:m,next:d,c:G},a,k,$,f))}else{var B=c,C=a,x=k,Q=
+$,y=f,M=q(B,d);M?(C.w&&C.w(M.name,M.R,x,Q,p(C,B,M.next,y,x)),d=M.c&ea?u(B,M,C,x,Q,y):M.next):d=B.length}else a.e&&a.e("\x26lt;",k,$,p(a,c,d,f,k));break;case "\x3c!--":if(!f.C){for(l=d+1;l<n&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<n){if(a.A){var E=c.slice(d,l).join("");a.A(E.substr(0,E.length-2),k,$,p(a,c,l+1,f,k))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",k,$,p(a,c,d,f,k));break;case "\x3c!":if(/^\w/.test(t)){if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",
+k,$,p(a,c,d,f,k))}else a.e&&a.e("\x26lt;!",k,$,p(a,c,d,f,k));break;case "\x3c?":if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",k,$,p(a,c,d,f,k));break;case "\x3e":a.e&&a.e("\x26gt;",k,$,p(a,c,d,f,k));break;case "":break;default:a.e&&a.e(s,k,$,p(a,c,d,f,k))}}a.B&&a.B(k)}catch(A){if(A!==$)throw A;}}function u(a,b,c,d,f,k){var g=a.length;ha.hasOwnProperty(b.name)||(ha[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var m=ha[b.name],n=b.next,r=b.next+1;r<g&&!("\x3c/"===
a[r-1]&&m.test(a[r]));r++);r<g&&(r-=1);g=a.slice(n,r).join("");if(b.c&e.c.CDATA)c.z&&c.z(g,d,f,p(c,a,r,k,d));else if(b.c&e.c.RCDATA)c.F&&c.F(l(g),d,f,p(c,a,r,k,d));else throw Error("bug");return r}function q(a,c){var f=/^([-\w:]+)/.exec(a[c]),g={};g.name=f[1].toLowerCase();g.c=e.f[g.name];for(var l=a[c].substr(f[0].length),m=c+1,n=a.length;m<n&&"\x3e"!==a[m];m++)l+=a[m];if(!(n<=m)){for(var p=[];""!==l;)if(f=Q.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],r=d,l=[l,a[m++]];m<n;m++){if(r){if("\x3e"===
-a[m])break}else 0<=a[m].indexOf(f)&&(r=b);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var r=f[1].toLowerCase(),s;if(f[2]){s=f[3];var t=s.charCodeAt(0);if(34===t||39===t)s=s.substr(1,s.length-2);s=k(s.replace(O,""))}else s="";p.push(r,s);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");g.R=p;g.next=m+1;return g}}function t(b){function f(a,b){l||b.push(a)}var k,l;return n({startDoc:function(){k=[];l=d},startTag:function(d,f,m){if(!l&&e.f.hasOwnProperty(d)){var n=e.f[d];if(!(n&e.c.FOLDABLE)){var p=
-b(d,f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=n);if(n&e.c.OPTIONAL_ENDTAG){var s=k[k.length-1];s&&s.D===d&&(s.v!==r||d!==r)&&m.push("\x3c/",s.v,"\x3e")}n&e.c.EMPTY||k.push({D:d,v:r});m.push("\x3c",r);d=0;for(s=f.length;d<s;d+=2){var q=f[d],t=f[d+1];t!==c&&t!==a&&m.push(" ",q,'\x3d"',g(t),'"')}m.push("\x3e");n&e.c.EMPTY&&!(p&e.c.EMPTY)&&
+a[m])break}else 0<=a[m].indexOf(f)&&(r=b);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var r=f[1].toLowerCase(),u;if(f[2]){u=f[3];var s=u.charCodeAt(0);if(34===s||39===s)u=u.substr(1,u.length-2);u=k(u.replace(O,""))}else u="";p.push(r,u);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");g.R=p;g.next=m+1;return g}}function s(b){function f(a,b){l||b.push(a)}var k,l;return n({startDoc:function(){k=[];l=d},startTag:function(d,f,m){if(!l&&e.f.hasOwnProperty(d)){var n=e.f[d];if(!(n&e.c.FOLDABLE)){var p=
+b(d,f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=n);if(n&e.c.OPTIONAL_ENDTAG){var u=k[k.length-1];u&&u.D===d&&(u.v!==r||d!==r)&&m.push("\x3c/",u.v,"\x3e")}n&e.c.EMPTY||k.push({D:d,v:r});m.push("\x3c",r);d=0;for(u=f.length;d<u;d+=2){var q=f[d],s=f[d+1];s!==c&&s!==a&&m.push(" ",q,'\x3d"',g(s),'"')}m.push("\x3e");n&e.c.EMPTY&&!(p&e.c.EMPTY)&&
m.push("\x3c/",r,"\x3e")}else l=!(n&e.c.EMPTY)}}},endTag:function(a,b){if(l)l=d;else if(e.f.hasOwnProperty(a)){var c=e.f[a];if(!(c&(e.c.EMPTY|e.c.FOLDABLE))){if(c&e.c.OPTIONAL_ENDTAG)for(c=k.length;0<=--c;){var f=k[c].D;if(f===a)break;if(!(e.f[f]&e.c.OPTIONAL_ENDTAG))return}else for(c=k.length;0<=--c&&k[c].D!==a;);if(!(0>c)){for(f=k.length;--f>c;){var g=k[f].v;e.f[g]&e.c.OPTIONAL_ENDTAG||b.push("\x3c/",g,"\x3e")}c<k.length&&(a=k[c].v);k.length=c;b.push("\x3c/",a,"\x3e")}}}},pcdata:f,rcdata:f,cdata:f,
-endDoc:function(a){for(;k.length;k.length--)a.push("\x3c/",k[k.length-1].v,"\x3e")}})}function u(a,b,d,e,f){if(!f)return c;try{var k=m.parse(""+a);if(k&&(!k.K()||ka.test(k.W()))){var g=f(k,b,d,e);return g?g.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function R(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
-c;if(a.hasOwnProperty(b))return a[b]}function X(b,d,f,k,g){for(var l=0;l<d.length;l+=2){var m=d[l],n=d[l+1],p=n,r=c,s;if((s=b+"::"+m,e.m.hasOwnProperty(s))||(s="*::"+m,e.m.hasOwnProperty(s)))r=e.m[s];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:n=c;g&&K(g,b,m,p,n);break;case e.d.STYLE:if("undefined"===typeof B){n=c;g&&K(g,b,m,p,n);break}var q=[];B(n,{declaration:function(a,b){var d=a.toLowerCase();T(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&q.push(d+
-": "+b.join(" "))}});n=0<q.length?q.join(" ; "):c;g&&K(g,b,m,p,n);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:n=k?k(n):n;g&&K(g,b,m,p,n);break;case e.d.URI:n=u(n,R(e.J,b,m),R(e.I,b,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:b},f);g&&K(g,b,m,p,n);break;case e.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=k?k(n):n,n!==c&&n!==a&&(n="#"+n)):n=c;g&&K(g,b,m,p,n);break;default:n=c,g&&K(g,b,m,p,n)}else n=c,g&&K(g,b,m,p,n);d[l+1]=n}return d}
-function V(b,c,d){return function(f,k){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:X(f,k,b,c,d)}}}function W(a,b){var c=[];t(b)(a,c);return c.join("")}var B,T;"undefined"!==typeof window&&(B=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,Y=/^#x([0-9A-Fa-f]+)$/,L=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
-c,O=/\0/g,S=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ba=/&/g,P=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,aa=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,$={},ha={},ka=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=g;da.ra=da.makeHtmlSanitizer=t;da.sa=da.makeSaxParser=n;da.ta=da.makeTagPolicy=V;da.wa=da.normalizeRCData=l;da.xa=
-da.sanitize=function(a,b,c,d){return W(a,V(b,c,d))};da.ya=da.sanitizeAttribs=X;da.za=da.sanitizeWithPolicy=W;da.Ba=da.unescapeEntities=k;return da}(u);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=
+endDoc:function(a){for(;k.length;k.length--)a.push("\x3c/",k[k.length-1].v,"\x3e")}})}function t(a,b,d,e,f){if(!f)return c;try{var k=m.parse(""+a);if(k&&(!k.K()||ka.test(k.W()))){var g=f(k,b,d,e);return g?g.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function R(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
+c;if(a.hasOwnProperty(b))return a[b]}function X(b,d,f,k,g){for(var l=0;l<d.length;l+=2){var m=d[l],n=d[l+1],p=n,r=c,u;if((u=b+"::"+m,e.m.hasOwnProperty(u))||(u="*::"+m,e.m.hasOwnProperty(u)))r=e.m[u];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:n=c;g&&K(g,b,m,p,n);break;case e.d.STYLE:if("undefined"===typeof B){n=c;g&&K(g,b,m,p,n);break}var q=[];B(n,{declaration:function(a,b){var d=a.toLowerCase();T(d,b,f?function(a){return t(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&q.push(d+
+": "+b.join(" "))}});n=0<q.length?q.join(" ; "):c;g&&K(g,b,m,p,n);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:n=k?k(n):n;g&&K(g,b,m,p,n);break;case e.d.URI:n=t(n,R(e.J,b,m),R(e.I,b,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:b},f);g&&K(g,b,m,p,n);break;case e.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=k?k(n):n,n!==c&&n!==a&&(n="#"+n)):n=c;g&&K(g,b,m,p,n);break;default:n=c,g&&K(g,b,m,p,n)}else n=c,g&&K(g,b,m,p,n);d[l+1]=n}return d}
+function V(b,c,d){return function(f,k){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:X(f,k,b,c,d)}}}function W(a,b){var c=[];s(b)(a,c);return c.join("")}var B,T;"undefined"!==typeof window&&(B=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,Y=/^#x([0-9A-Fa-f]+)$/,L=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+c,O=/\0/g,S=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ba=/&/g,P=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,aa=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,$={},ha={},ka=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=g;da.ra=da.makeHtmlSanitizer=s;da.sa=da.makeSaxParser=n;da.ta=da.makeTagPolicy=V;da.wa=da.normalizeRCData=l;da.xa=
+da.sanitize=function(a,b,c,d){return W(a,V(b,c,d))};da.ya=da.sanitizeAttribs=X;da.za=da.sanitizeWithPolicy=W;da.Ba=da.unescapeEntities=k;return da}(t);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=
a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):
(127<d&&2048>d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(k,m){if(!d[k]){if(!c[k]){var n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}};
-c[k][0].call(n.exports,function(b){var d=c[k][1][b];return f(d?d:b)},n,n.exports,b,c,d,e)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<e.length;k++)f(e[k]);return f}({1:[function(b,c,d){function e(b){if(!(this instanceof e))return new e(b);b=this.options=k.assign({level:s,method:t,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg=
+c[k][0].call(n.exports,function(b){var d=c[k][1][b];return f(d?d:b)},n,n.exports,b,c,d,e)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<e.length;k++)f(e[k]);return f}({1:[function(b,c,d){function e(b){if(!(this instanceof e))return new e(b);b=this.options=k.assign({level:u,method:s,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==r)throw Error(m[c]);if(b.header&&g.deflateSetHeader(this.strm,b.header),b.dictionary){var d;if(d="string"==typeof b.dictionary?l.string2buf(b.dictionary):"[object ArrayBuffer]"===p.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=g.deflateSetDictionary(this.strm,d),c!==r)throw Error(m[c]);this._dict_set=!0}}function f(b,c){var d=
-new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/deflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/messages"),n=b("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,t=8;e.prototype.push=function(b,c){var d,e,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;e=c===~~c?c:!0===c?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
+new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/deflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/messages"),n=b("./zlib/zstream"),p=Object.prototype.toString,r=0,u=-1,q=0,s=8;e.prototype.push=function(b,c){var d,e,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;e=c===~~c?c:!0===c?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),d=g.deflate(f,e),1!==d&&d!==r)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===r):2!==e||(this.onEnd(r),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===r&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==m.Z_OK)throw Error(n[b]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,r,E=this.strm,C=this.options.chunkSize,D=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?E.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?E.input=new Uint8Array(b):E.input=b;E.next_in=0;E.avail_in=E.input.length;do{if(0===E.avail_out&&(E.output=new k.Buf8(C),E.next_out=0,E.avail_out=C),d=g.inflate(E,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&D&&(r="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===s.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,r)),d===m.Z_BUF_ERROR&&!0===F&&(d=m.Z_OK,F=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
-this.ended=!0,!1;E.next_out&&(0!==E.avail_out&&d!==m.Z_STREAM_END&&(0!==E.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(E.output,E.next_out),n=E.next_out-f,p=l.buf2string(E.output,f),E.next_out=n,E.avail_out=C-n,n&&k.arraySet(E.output,E.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(E.output,E.next_out))));0===E.avail_in&&0===E.avail_out&&(F=!0)}while((0<E.avail_in||0===E.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
-e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),E.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),u=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,r,A=this.strm,D=this.options.chunkSize,C=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===u.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(D),A.next_out=0,A.avail_out=D),d=g.inflate(A,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&C&&(r="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===u.call(C)?new Uint8Array(C):C,d=g.inflateSetDictionary(this.strm,r)),d===m.Z_BUF_ERROR&&!0===F&&(d=m.Z_OK,F=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
+this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&d!==m.Z_STREAM_END&&(0!==A.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=D-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(F=!0)}while((0<A.avail_in||0===A.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
+e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),A.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
c?b:b.subarray?b.subarray(0,c):(b.length=c,b)};var e={arraySet:function(b,c,d,e,f){if(c.subarray&&b.subarray)return void b.set(c.subarray(d,d+e),f);for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){var c,d,e,f,p;c=e=0;for(d=b.length;c<d;c++)e+=b[c].length;p=new Uint8Array(e);c=e=0;for(d=b.length;c<d;c++)f=b[c],p.set(f,e),e+=f.length;return p}},f={arraySet:function(b,c,d,e,f){for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?
(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,e)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,f))};d.setTyped(b)},{}],4:[function(b,c,d){function e(b,c){if(65537>c&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,f.shrinkBuf(b,c));for(var d="",e=0;e<c;e++)d+=String.fromCharCode(b[e]);return d}var f=b("./common"),g=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch(l){g=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){k=!1}var n=
@@ -114,77 +114,77 @@ new f.Buf8(256);for(b=0;256>b;b++)n[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6&63,c[g++]=128|63&d):(c[g++]=240|d>>>18,c[g++]=128|d>>>12&63,c[g++]=128|d>>>6&63,c[g++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,k,g,l=c||b.length,m=Array(2*l);for(d=f=0;d<l;)if(k=b[d++],128>k)m[f++]=k;else if(g=n[k],4<g)m[f++]=65533,d+=g-1;else{for(k&=
2===g?31:3===g?15:7;1<g&&d<l;)k=k<<6|63&b[d++],g--;1<g?m[f++]=65533:65536>k?m[f++]=k:(k-=65536,m[f++]=55296|k>>10&1023,m[f++]=56320|1023&k)}return e(m,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+n[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var l=65535&b|0;b=b>>>16&65535|0;for(var m=0;0!==d;){m=2E3<d?2E3:d;d-=m;do l=l+c[k++]|0,b=b+l|0;while(--m);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;
-for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=D[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(z.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
-0))}function k(b,c){A._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,r=b.prev,s=b.strstart+O,q=n[k+g-1],t=n[k+g];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===t&&n[d+g-1]===q&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;d++;do;while(n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<s);if(e=O-(s-k),k=s-O,e>g){if(b.match_start=c,g=e,e>=l)break;q=n[k+g-1];t=n[k+g]}}while((c=r[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
-k+(k-S)){z.arraySet(b.window,b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,z.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=E(c.adler,e,l,g):2===c.state.wrap&&(c.adler=C(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),
+for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(y.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
+0))}function k(b,c){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,r=b.prev,u=b.strstart+O,q=n[k+g-1],s=n[k+g];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===s&&n[d+g-1]===q&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;d++;do;while(n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<u);if(e=O-(u-k),k=u-O,e>g){if(b.match_start=c,g=e,e>=l)break;q=n[k+g-1];s=n[k+g]}}while((c=r[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+k+(k-S)){y.arraySet(b.window,b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,y.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=A(c.adler,e,l,g):2===c.state.wrap&&(c.adler=D(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),
b.lookahead+=d,b.lookahead+b.insert>=J){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+J-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<J)););}}while(b.lookahead<S&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<
-b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d)),b.match_length>=J)if(e=A._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
-b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=A._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function s(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),
+b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d)),b.match_length>=J)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<J-1?b.strstart:J-1,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function u(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),
b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===R||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=
-J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=A._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=A._tr_tally(b,0,
-b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(A._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=
+J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=E._tr_tally(b,0,
+b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function s(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=W;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
-this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new z.Buf16(2*Y);this.dyn_dtree=new z.Buf16(2*(2*M+1));this.bl_tree=new z.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(L+1);this.heap=new z.Buf16(2*T+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*T+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
-this.lit_bufsize=this.l_buf=0}function u(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:ba,b.adler=2===c.wrap?0:1,c.last_flush=F,A._tr_init(c),H):e(b,N)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
-0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>B||d!==W||8>f||15<f||0>c||9<c||0>g||g>X)return e(b,N);8===f&&(f=9);var m=new t;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new z.Buf8(2*
-m.w_size),m.head=new z.Buf16(m.hash_size),m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,v(b)}var y,z=b("../utils/common"),A=b("./trees"),E=b("./adler32"),C=b("./crc32"),D=b("./messages"),F=0,G=4,H=0,N=-2,K=-1,R=1,X=4,V=2,W=8,B=9,T=286,M=30,I=19,Y=2*T+1,L=15,J=3,O=258,S=O+J+1,ca=42,ba=113,P=1,Z=2,aa=3,U=4;y=[new q(0,0,0,0,function(b,c){var d=
-65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):(b.strstart>b.block_start&&k(b,!1),P)}),new q(4,4,8,
-4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,H):N};d.deflate=function(b,c){var d,n,r,s;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||
-666===n.status&&c!==G)return e(b,0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ca)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
-l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(b.adler=C(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(r=W+(n.w_bits-8<<4)<<8,s=-1,s=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,r|=s<<6,0!==n.strstart&&(r|=32),n.status=ba,m(n,r+(31-r%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<
-(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>
-r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),
-g(b),r=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=
--1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var q;if(2===n.strategy)a:{for(var t;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){q=P;break a}break}if(n.match_length=0,t=A._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&
-(k(n,!1),0===n.strm.avail_out)?P:Z)}else if(3===n.strategy)a:{var B,u;for(t=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===F){q=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(u=n.strstart-1,B=t[u],B===t[++u]&&B===t[++u]&&B===t[++u])){d=n.strstart+O;do;while(B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&u<d);n.match_length=O-(d-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-J?(q=A._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(q=A._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),q&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Z)}else q=y[n.level].func(n,c);if(q!==aa&&q!==U||(n.status=666),q===P||q===aa)return 0===b.avail_out&&(n.last_flush=-1),H;if(q===Z&&(1===c?A._tr_align(n):5!==c&&(A._tr_stored_block(n,
-0,0,!1),3===c&&(f(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,H}return c!==G?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?H:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
-c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==ba&&666!==c?e(b,N):(b.state=null,c===ba?e(b,-3):H)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ca||d.lookahead))return N;1===g&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new z.Buf8(d.w_size),z.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=
-0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,k,l,m,n,p,r,s,q,t,u,v,x,y,z,A,E,C,D,F,G,H,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);m=b.next_out;K=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;x=d.bits;y=d.lencode;
-z=d.distcode;A=(1<<d.lenbits)-1;E=(1<<d.distbits)-1;a:do{15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);C=y[v&A];b:for(;;){if(D=C>>>24,v>>>=D,x-=D,D=C>>>16&255,0===D)K[m++]=65535&C;else{if(!(16&D)){if(0===(64&D)){C=y[(65535&C)+(v&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&C;(D&=15)&&(x<D&&(v+=N[k++]<<x,x+=8),F+=v&(1<<D)-1,v>>>=D,x-=D);15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);C=z[v&E];c:for(;;){if(D=C>>>24,v>>>=D,x-=D,D=C>>>16&255,
-!(16&D)){if(0===(64&D)){C=z[(65535&C)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&C,D&=15,x<D&&(v+=N[k++]<<x,x+=8,x<D&&(v+=N[k++]<<x,x+=8)),G+=v&(1<<D)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=D,x-=D,D=m-n,G>D){if(D=G-D,D>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(C=0,H=u,0===t){if(C+=s-D,D<F){F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}}else if(t<D){if(C+=s+t-D,D-=t,D<F){F-=D;do K[m++]=u[C++];while(--D);
-if(C=0,t<F){D=t;F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}}}else if(C+=t-D,D<F){F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}for(;2<F;)K[m++]=H[C++],K[m++]=H[C++],K[m++]=H[C++],F-=3;F&&(K[m++]=H[C++],1<F&&(K[m++]=H[C++]))}else{C=m-G;do K[m++]=K[C++],K[m++]=K[C++],K[m++]=K[C++],F-=3;while(2<F);F&&(K[m++]=K[C++],1<F&&(K[m++]=K[C++]))}break}}break}}while(k<l&&m<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=m;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=v&(1<<x)-1;d.bits=x}},
-{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
-new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=z,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(A),c.distcode=c.distdyn=new s.Buf32(E),c.sane=1,c.back=-1,x):y}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function l(b,c){var d,e;return b&&b.state?(e=b.state,
-0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):y}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):y}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
-e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),x=0,y=-2,z=1,A=852,E=592,C=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,E,A,B,T,M,I,Y,L,J,O,S,ca,ba,P,Z,aa,U=0,Q=new s.Buf8(4),ga=[16,
-17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;T=m;M=E;Z=x;a:for(;;)switch(d.mode){case z:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);B=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new y.Buf16(2*Y);this.dyn_dtree=new y.Buf16(2*(2*M+1));this.bl_tree=new y.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new y.Buf16(L+1);this.heap=new y.Buf16(2*T+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*T+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
+this.lit_bufsize=this.l_buf=0}function t(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:ba,b.adler=2===c.wrap?0:1,c.last_flush=F,E._tr_init(c),G):e(b,N)}function v(b){var c=t(b);c===G&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>B||d!==W||8>f||15<f||0>c||9<c||0>g||g>X)return e(b,N);8===f&&(f=9);var m=new s;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new y.Buf8(2*
+m.w_size),m.head=new y.Buf16(m.hash_size),m.prev=new y.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new y.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,v(b)}var z,y=b("../utils/common"),E=b("./trees"),A=b("./adler32"),D=b("./crc32"),C=b("./messages"),F=0,H=4,G=0,N=-2,K=-1,R=1,X=4,V=2,W=8,B=9,T=286,M=30,I=19,Y=2*T+1,L=15,J=3,O=258,S=O+J+1,ca=42,ba=113,P=1,Z=2,aa=3,U=4;z=[new q(0,0,0,0,function(b,c){var d=
+65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):(b.strstart>b.block_start&&k(b,!1),P)}),new q(4,4,8,
+4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,u),new q(8,16,32,32,u),new q(8,16,128,128,u),new q(8,32,128,256,u),new q(32,128,258,1024,u),new q(32,258,258,4096,u)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,G):N};d.deflate=function(b,c){var d,n,r,u;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||
+666===n.status&&c!==H)return e(b,0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ca)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
+l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(b.adler=D(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(r=W+(n.w_bits-8<<4)<<8,u=-1,u=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,r|=u<<6,0!==n.strstart&&(r|=32),n.status=ba,m(n,r+(31-r%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<
+(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>
+r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),
+g(b),r=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));0===u&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=
+-1,G}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==H)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var q;if(2===n.strategy)a:{for(var s;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){q=P;break a}break}if(n.match_length=0,s=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,s&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&
+(k(n,!1),0===n.strm.avail_out)?P:Z)}else if(3===n.strategy)a:{var B,t;for(s=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===F){q=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(t=n.strstart-1,B=s[t],B===s[++t]&&B===s[++t]&&B===s[++t])){d=n.strstart+O;do;while(B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&t<d);n.match_length=O-(d-t);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+J?(q=E._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(q=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),q&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Z)}else q=z[n.level].func(n,c);if(q!==aa&&q!==U||(n.status=666),q===P||q===aa)return 0===b.avail_out&&(n.last_flush=-1),G;if(q===Z&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,
+0,0,!1),3===c&&(f(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,G}return c!==H?G:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?G:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
+c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==ba&&666!==c?e(b,N):(b.state=null,c===ba?e(b,-3):G)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ca||d.lookahead))return N;1===g&&(b.adler=A(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new y.Buf8(d.w_size),y.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=
+0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,G};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,k,l,m,n,p,r,u,q,s,t,v,x,z,y,E,A,D,C,F,H,G,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);m=b.next_out;K=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);r=d.dmax;u=d.wsize;q=d.whave;s=d.wnext;t=d.window;v=d.hold;x=d.bits;z=d.lencode;
+y=d.distcode;E=(1<<d.lenbits)-1;A=(1<<d.distbits)-1;a:do{15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);D=z[v&E];b:for(;;){if(C=D>>>24,v>>>=C,x-=C,C=D>>>16&255,0===C)K[m++]=65535&D;else{if(!(16&C)){if(0===(64&C)){D=z[(65535&D)+(v&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&D;(C&=15)&&(x<C&&(v+=N[k++]<<x,x+=8),F+=v&(1<<C)-1,v>>>=C,x-=C);15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);D=y[v&A];c:for(;;){if(C=D>>>24,v>>>=C,x-=C,C=D>>>16&255,
+!(16&C)){if(0===(64&C)){D=y[(65535&D)+(v&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(H=65535&D,C&=15,x<C&&(v+=N[k++]<<x,x+=8,x<C&&(v+=N[k++]<<x,x+=8)),H+=v&(1<<C)-1,H>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=C,x-=C,C=m-n,H>C){if(C=H-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(D=0,G=t,0===s){if(D+=u-C,C<F){F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}}else if(s<C){if(D+=u+s-C,C-=s,C<F){F-=C;do K[m++]=t[D++];while(--C);
+if(D=0,s<F){C=s;F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}}}else if(D+=s-C,C<F){F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}for(;2<F;)K[m++]=G[D++],K[m++]=G[D++],K[m++]=G[D++],F-=3;F&&(K[m++]=G[D++],1<F&&(K[m++]=G[D++]))}else{D=m-H;do K[m++]=K[D++],K[m++]=K[D++],K[m++]=K[D++],F-=3;while(2<F);F&&(K[m++]=K[D++],1<F&&(K[m++]=K[D++]))}break}}break}}while(k<l&&m<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=m;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=v&(1<<x)-1;d.bits=x}},
+{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new u.Buf16(320);this.work=
+new u.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=y,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new u.Buf32(E),c.distcode=c.distdyn=new u.Buf32(A),c.sane=1,c.back=-1,x):z}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function l(b,c){var d,e;return b&&b.state?(e=b.state,
+0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):z}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):z}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new u.Buf8(b.wsize)),e>=b.wsize?(u.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),u.arraySet(b.window,c,d-
+e,f,b.wnext),e-=f,e?(u.arraySet(b.window,c,d-e,e,0),b.wnext=e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,u=b("../utils/common"),q=b("./adler32"),s=b("./crc32"),t=b("./inffast"),v=b("./inftrees"),x=0,z=-2,y=1,E=852,A=592,D=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,E,A,B,T,M,I,Y,L,J,O,S,ca,ba,P,Z,aa,U=0,Q=new u.Buf8(4),ga=[16,
+17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;T=m;M=E;Z=x;a:for(;;)switch(d.mode){case y:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=s(d.check,Q,2,0);B=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),
!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,B-=4,P=(15&A)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&A?10:12;B=A=0;break;case 2:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
-d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0;d.mode=3;case 3:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=t(d.check,Q,4,0));B=A=0;d.mode=4;case 4:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0;d.mode=
-5;case 5:if(1024&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>m&&(I=m),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,g,I,P)),512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
-7;case 7:if(2048&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=
+d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0;d.mode=3;case 3:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=s(d.check,Q,4,0));B=A=0;d.mode=4;case 4:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0;d.mode=
+5;case 5:if(1024&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>m&&(I=m),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),u.arraySet(d.head.extra,f,g,I,P)),512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
+7;case 7:if(2048&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=
9;case 9:if(512&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}B=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}b.adler=d.check=e(A);B=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=
-7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}switch(d.last=1&A,A>>>=1,B-=1,3&A){case 0:d.mode=14;break;case 1:L=d;if(C){O=void 0;p=new s.Buf32(512);r=new s.Buf32(32);for(O=0;144>O;)L.lens[O++]=8;for(;256>O;)L.lens[O++]=9;for(;280>O;)L.lens[O++]=7;for(;288>O;)L.lens[O++]=8;v(1,L.lens,0,288,p,0,L.work,{bits:9});for(O=0;32>O;)L.lens[O++]=5;v(2,L.lens,0,32,r,0,L.work,{bits:5});C=!1}L.lencode=p;L.lenbits=9;L.distcode=r;L.distbits=5;if(d.mode=20,6===c){A>>>=2;B-=2;break a}break;
-case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.mode=30}A>>>=2;B-=2;break;case 14:A>>>=7&B;for(B-=7&B;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>m&&(I=m),I>E&&(I=E),0===I)break a;s.arraySet(k,f,g,I,l);m-=I;g+=I;E-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===m)break a;m--;A+=f[g++]<<
+7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}switch(d.last=1&A,A>>>=1,B-=1,3&A){case 0:d.mode=14;break;case 1:L=d;if(D){O=void 0;p=new u.Buf32(512);r=new u.Buf32(32);for(O=0;144>O;)L.lens[O++]=8;for(;256>O;)L.lens[O++]=9;for(;280>O;)L.lens[O++]=7;for(;288>O;)L.lens[O++]=8;v(1,L.lens,0,288,p,0,L.work,{bits:9});for(O=0;32>O;)L.lens[O++]=5;v(2,L.lens,0,32,r,0,L.work,{bits:5});D=!1}L.lencode=p;L.lenbits=9;L.distcode=r;L.distbits=5;if(d.mode=20,6===c){A>>>=2;B-=2;break a}break;
+case 2:d.mode=17;break;case 3:b.msg="invalid block type",d.mode=30}A>>>=2;B-=2;break;case 14:A>>>=7&B;for(B-=7&B;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>m&&(I=m),I>E&&(I=E),0===I)break a;u.arraySet(k,f,g,I,l);m-=I;g+=I;E-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===m)break a;m--;A+=f[g++]<<
B;B+=8}if(d.nlen=(31&A)+257,A>>>=5,B-=5,d.ndist=(31&A)+1,A>>>=5,B-=5,d.ncode=(15&A)+4,A>>>=4,B-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.lens[ga[d.have++]]=7&A;A>>>=3;B-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,aa={bits:d.lenbits},Z=v(0,d.lens,0,19,d.lencode,0,d.work,aa),d.lenbits=aa.bits,Z){b.msg="invalid code lengths set";
d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(16>O)A>>>=J,B-=J,d.lens[d.have++]=O;else{if(16===O){for(L=J+2;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A>>>=J,B-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];I=3+(3&A);A>>>=2;B-=2}else if(17===O){for(L=J+3;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=J;B-=J;P=0;I=3+(7&A);
A>>>=3;B-=3}else{for(L=J+7;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=J;B-=J;P=0;I=11+(127&A);A>>>=7;B-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,aa={bits:d.lenbits},Z=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,aa),d.lenbits=aa.bits,Z){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=
-d.distdyn,aa={bits:d.distbits},Z=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,aa),d.distbits=aa.bits,Z){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=E){b.next_out=l;b.avail_out=E;b.next_in=g;b.avail_in=m;d.hold=A;d.bits=B;u(b,M);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=
+d.distdyn,aa={bits:d.distbits},Z=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,aa),d.distbits=aa.bits,Z){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=E){b.next_out=l;b.avail_out=E;b.next_in=g;b.avail_in=m;d.hold=A;d.bits=B;t(b,M);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=
B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(L&&0===(240&L)){S=J;ca=L;for(ba=O;U=d.lencode[ba+((A&(1<<S+ca)-1)>>S)],J=U>>>24,L=U>>>16&255,O=65535&U,!(S+J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=S;B-=S;d.back+=S}if(A>>>=J,B-=J,d.back+=J,d.length=O,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length+=A&(1<<d.extra)-
1;A>>>=d.extra;B-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=23;case 23:for(;U=d.distcode[A&(1<<d.distbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(0===(240&L)){S=J;ca=L;for(ba=O;U=d.distcode[ba+((A&(1<<S+ca)-1)>>S)],J=U>>>24,L=U>>>16&255,O=65535&U,!(S+J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=S;B-=S;d.back+=S}if(A>>>=J,B-=J,d.back+=J,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=
d.extra;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.offset+=A&(1<<d.extra)-1;A>>>=d.extra;B-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===E)break a;if(I=M-E,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,Y=d.wsize-I):Y=d.wnext-I;I>d.length&&(I=d.length);L=d.window}else L=k,Y=l-d.offset,I=d.length;I>E&&(I=E);E-=I;d.length-=I;do k[l++]=L[Y++];while(--I);
-0===d.length&&(d.mode=21);break;case 26:if(0===E)break a;k[l++]=d.length;E--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===m)break a;m--;A|=f[g++]<<B;B+=8}if(M-=E,b.total_out+=M,d.total+=M,M&&(b.adler=d.check=d.flags?t(d.check,k,M,l-M):q(d.check,k,M,l-M)),M=E,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=
-30;break}B=A=0}d.mode=29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,(d.wsize||M!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,M-b.avail_out)?(d.mode=31,-4):(T-=b.avail_in,M-=b.avail_out,b.total_in+=T,b.total_out+=M,d.total+=M,d.wrap&&M&&(b.adler=d.check=d.flags?t(d.check,k,M,b.next_out-M):q(d.check,k,M,b.next_out-M)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:
-0)+(20===d.mode||15===d.mode?256:0),(0===T&&0===M||4===c)&&Z===x&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):
-y};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
-16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,r,s,q,t,u){var v,x,y,z,A,E,C,D;z=u.bits;for(var F=0,G=0,H=0,N=0,K=0,R=0,X=0,V=v=0,W=0,B=null,T=0,M=new e.Buf16(16),R=new e.Buf16(16),I=null,Y=0,F=0;15>=F;F++)M[F]=0;for(G=0;G<r;G++)M[c[d+G]]++;K=z;for(N=15;1<=N&&0===M[N];N--);if(K>N&&(K=N),0===N)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<N&&0===M[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=M[F],0>v)return-1;if(0<
-v&&(0===b||1!==N))return-1;R[1]=0;for(F=1;15>F;F++)R[F+1]=R[F]+M[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[R[c[d+G]]++]=G);if(0===b?(B=I=t,A=19):1===b?(B=f,T-=257,I=g,Y-=257,A=256):(B=k,I=l,A=-1),W=0,G=0,F=H,z=q,R=K,X=0,y=-1,V=1<<K,r=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;E=F-X;t[G]<A?(C=0,D=t[G]):t[G]>A?(C=I[Y+t[G]],D=B[T+t[G]]):(C=96,D=0);v=1<<F-X;H=x=1<<R;do x-=v,s[z+(W>>X)+x]=E<<24|C<<16|D|0;while(0!==x);for(v=1<<F-1;W&v;)v>>=1;if(0!==v?(W&=v-1,W+=v):W=0,G++,0===--M[F]){if(F===N)break;
-F=c[d+t[G]]}if(F>K&&(W&r)!==y){0===X&&(X=K);z+=H;R=F-X;for(v=1<<R;R+X<N&&(v-=M[R+X],!(0>=v));)R++,v<<=1;if(V+=1<<R,1===b&&852<V||2===b&&592<V)return 1;y=W&r;s[y]=K<<24|R<<16|z-q|0}}return 0!==W&&(s[z+W]=F-X<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=
+0===d.length&&(d.mode=21);break;case 26:if(0===E)break a;k[l++]=d.length;E--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===m)break a;m--;A|=f[g++]<<B;B+=8}if(M-=E,b.total_out+=M,d.total+=M,M&&(b.adler=d.check=d.flags?s(d.check,k,M,l-M):q(d.check,k,M,l-M)),M=E,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=
+30;break}B=A=0}d.mode=29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return z}return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,(d.wsize||M!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,M-b.avail_out)?(d.mode=31,-4):(T-=b.avail_in,M-=b.avail_out,b.total_in+=T,b.total_out+=M,d.total+=M,d.wrap&&M&&(b.adler=d.check=d.flags?s(d.check,k,M,b.next_out-M):q(d.check,k,M,b.next_out-M)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:
+0)+(20===d.mode||15===d.mode?256:0),(0===T&&0===M||4===c)&&Z===x&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,x)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):
+z};d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,
+16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,r,u,q,s,t){var v,x,z,y,E,A,D,C;y=t.bits;for(var F=0,H=0,G=0,N=0,K=0,R=0,X=0,V=v=0,W=0,B=null,T=0,M=new e.Buf16(16),R=new e.Buf16(16),I=null,Y=0,F=0;15>=F;F++)M[F]=0;for(H=0;H<r;H++)M[c[d+H]]++;K=y;for(N=15;1<=N&&0===M[N];N--);if(K>N&&(K=N),0===N)return u[q++]=20971520,u[q++]=20971520,t.bits=1,0;for(G=1;G<N&&0===M[G];G++);K<G&&(K=G);for(F=v=1;15>=F;F++)if(v<<=1,v-=M[F],0>v)return-1;if(0<
+v&&(0===b||1!==N))return-1;R[1]=0;for(F=1;15>F;F++)R[F+1]=R[F]+M[F];for(H=0;H<r;H++)0!==c[d+H]&&(s[R[c[d+H]]++]=H);if(0===b?(B=I=s,E=19):1===b?(B=f,T-=257,I=g,Y-=257,E=256):(B=k,I=l,E=-1),W=0,H=0,F=G,y=q,R=K,X=0,z=-1,V=1<<K,r=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;A=F-X;s[H]<E?(D=0,C=s[H]):s[H]>E?(D=I[Y+s[H]],C=B[T+s[H]]):(D=96,C=0);v=1<<F-X;G=x=1<<R;do x-=v,u[y+(W>>X)+x]=A<<24|D<<16|C|0;while(0!==x);for(v=1<<F-1;W&v;)v>>=1;if(0!==v?(W&=v-1,W+=v):W=0,H++,0===--M[F]){if(F===N)break;
+F=c[d+s[H]]}if(F>K&&(W&r)!==z){0===X&&(X=K);y+=G;R=F-X;for(v=1<<R;R+X<N&&(v-=M[R+X],!(0>=v));)R++,v<<=1;if(V+=1<<R,1===b&&852<V||2===b&&592<V)return 1;z=W&r;u[z]=K<<24|R<<16|y-q|0}}return 0!==W&&(u[y+W]=F-X<<24|4194304),t.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=
b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*
-c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(X+1),k=0;for(e=1;e<=X;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function r(b){var c;for(c=0;c<H;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
-b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,k=2*d;return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function u(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+G+1,c),g=I[k],0!==g&&(f-=P[k],l(b,f,
-g)),e--,k=256>e?ca[e]:ca[256+(e>>>7)],m(b,k,d),g=Y[k],0!==g&&(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,W,c)}function v(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=R;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)t(b,k,d);f=l;
-do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,t(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,r,g=c.dyn_tree,l=c.max_code,s=c.stat_desc.static_tree,q=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,u=c.stat_desc.extra_base,v=c.stat_desc.max_length,x=0;for(e=0;e<=X;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+
-1]=0;for(d=b.heap_max+1;d<R;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+1,e>v&&(e=v,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=u&&(n=B[f-u]),r=g[2*f],b.opt_len+=r*(e+n),q&&(b.static_len+=r*(s[2*f+1]+n)));if(0!==x){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;x-=2}while(0<x);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,
-n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*B]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*M]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function y(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,r=4;0===g&&(p=138,r=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<r){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,B,b.bl_tree),l(b,n-3,2)):10>=n?
-(m(b,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,r=3):f===g?(p=6,r=3):(p=7,r=4)}}function z(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return D;return C}function A(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),C=0,D=1,
-F=0,G=256,H=G+1+29,N=30,K=19,R=2*H+1,X=15,V=16,W=256,B=16,T=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(H+2));e(O);var S=Array(2*N);e(S);var ca=Array(512);e(ca);var ba=Array(256);e(ba);var P=Array(29);e(P);var Z=Array(N);e(Z);var aa,U,Q,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(X+1);for(e=
-d=0;28>e;e++){P[e]=d;for(c=0;c<1<<I[e];c++)ba[d++]=e}ba[d-1]=e;for(e=d=0;16>e;e++){Z[e]=d;for(c=0;c<1<<Y[e];c++)ca[d++]=e}for(d>>=7;e<N;e++){Z[e]=d<<7;for(c=0;c<1<<Y[e]-7;c++)ca[256+d++]=e}for(c=0;c<=X;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,H+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);aa=new f(O,I,G+1,H,X);U=new f(S,Y,0,N,X);Q=new f([],L,0,K,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
-aa);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=A;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=z(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(g=K-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)A(b,c,d,
-e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),u(b,O,S);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,
-c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>c?ca[c]:ca[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,W,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
+c],d[2*c+1])}function n(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(X+1),k=0;for(e=1;e<=X;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function r(b){var c;for(c=0;c<G;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function u(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);
+b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,k=2*d;return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function s(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function t(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+H+1,c),g=I[k],0!==g&&(f-=P[k],l(b,f,
+g)),e--,k=256>e?ca[e]:ca[256+(e>>>7)],m(b,k,d),g=Y[k],0!==g&&(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,W,c)}function v(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=R;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)s(b,k,d);f=l;
+do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],s(b,k,1),e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,s(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,r,g=c.dyn_tree,l=c.max_code,u=c.stat_desc.static_tree,q=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,t=c.stat_desc.extra_base,v=c.stat_desc.max_length,x=0;for(e=0;e<=X;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+
+1]=0;for(d=b.heap_max+1;d<R;d++)f=b.heap[d],e=g[2*g[2*f+1]+1]+1,e>v&&(e=v,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=t&&(n=B[f-t]),r=g[2*f],b.opt_len+=r*(e+n),q&&(b.static_len+=r*(u[2*f+1]+n)));if(0!==x){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;x-=2}while(0<x);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,
+n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=g,g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*B]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*M]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function z(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,r=4;0===g&&(p=138,r=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<r){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,B,b.bl_tree),l(b,n-3,2)):10>=n?
+(m(b,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b,n-11,7));n=0;k=f;0===g?(p=138,r=3):f===g?(p=6,r=3):(p=7,r=4)}}function y(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return D;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<H;c++)if(0!==b.dyn_ltree[2*c])return C;return D}function E(b,c,d,e){l(b,(F<<1)+(e?1:0),3);u(b);k(b,d);k(b,~d);A.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var A=b("../utils/common"),D=0,C=1,
+F=0,H=256,G=H+1+29,N=30,K=19,R=2*G+1,X=15,V=16,W=256,B=16,T=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(G+2));e(O);var S=Array(2*N);e(S);var ca=Array(512);e(ca);var ba=Array(256);e(ba);var P=Array(29);e(P);var Z=Array(N);e(Z);var aa,U,Q,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(X+1);for(e=
+d=0;28>e;e++){P[e]=d;for(c=0;c<1<<I[e];c++)ba[d++]=e}ba[d-1]=e;for(e=d=0;16>e;e++){Z[e]=d;for(c=0;c<1<<Y[e];c++)ca[d++]=e}for(d>>=7;e<N;e++){Z[e]=d<<7;for(c=0;c<1<<Y[e]-7;c++)ca[256+d++]=e}for(c=0;c<=X;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,G+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);aa=new f(O,I,H+1,G,X);U=new f(S,Y,0,N,X);Q=new f([],L,0,K,7);ga=!0}b.l_desc=new g(b.dyn_ltree,
+aa);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=y(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(g=K-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,
+e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),t(b,O,S);else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);t(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&u(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,
+c--,b.dyn_ltree[2*(ba[d]+H+1)]++,b.dyn_dtree[2*(256>c?ca[c]:ca[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,W,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=
null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";
window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a="1"==urlParams.offline?"en":urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
@@ -226,7 +226,7 @@ mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=M
mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};
var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,r=(l.geometry.y-
-l.previous.y)*n,s=(l.geometry.width-l.previous.width)*n,n=(l.geometry.height-l.previous.height)*n;0==d?(m.x-=p,m.y-=r,m.width-=s,m.height-=n):(m.x+=p/10,m.y+=r/10,m.width+=s/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+l.previous.y)*n,u=(l.geometry.width-l.previous.width)*n,n=(l.geometry.height-l.previous.height)*n;0==d?(m.x-=p,m.y-=r,m.width-=u,m.height-=n):(m.x+=p/10,m.y+=r/10,m.width+=u/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),parseCssNumber:function(a){"thin"==
a?a="2":"medium"==a?a="4":"thick"==a&&(a="6");a=parseFloat(a);isNaN(a)&&(a=0);return a},setPrefixedStyle:function(){var a=null;mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&9<=document.documentMode&&10>document.documentMode&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==
@@ -249,9 +249,9 @@ f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(a,c){mxUti
null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,(!mxUtils.isNaN(a[d])||!mxUtils.isNaN(b[d]))&&a[d]!=b[d])return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=
[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" \x3d [null]\n";else if("function"==typeof a[c])b+=c+" \x3d\x3e [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" \x3d\x3e ["+d+"]\n");else b+=c+
-" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*m+r*n;var m=-1*r*m+p*n,n=e*e,s=m*m,q=c*c,t=d*d,u=n/q+s/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((q*t-q*s-t*n)/(q*s+t*n)));n=f*c*m/d;s=-1*f*d*
-e/c;k=p*n-r*s+k/2;l=r*n+p*s+l/2;q=Math.atan2((m-s)/d,(e-n)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-m-s)/d,(-e-n)/c)-Math.atan2((m-s)/d,(e-n)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),s=-m*(n*x+d*v),q=-m*(c*x-p*v),r=[],y=0;y<g;++y){f+=e;var v=Math.cos(f),x=Math.sin(f),t=n*v-d*x+k,u=c*v+p*x+l,z=-m*(n*x+d*v),
-v=-m*(c*x-p*v),x=6*y;r[x]=Number(s+a);r[x+1]=Number(q+b);r[x+2]=Number(t-z+a);r[x+3]=Number(u-v+b);r[x+4]=Number(t+a);r[x+5]=Number(u+b);s=t+z;q=u+v}return r},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,
+" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*m+r*n;var m=-1*r*m+p*n,n=e*e,u=m*m,q=c*c,s=d*d,t=n/q+u/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((q*s-q*u-s*n)/(q*u+s*n)));n=f*c*m/d;u=-1*f*d*
+e/c;k=p*n-r*u+k/2;l=r*n+p*u+l/2;q=Math.atan2((m-u)/d,(e-n)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-m-u)/d,(-e-n)/c)-Math.atan2((m-u)/d,(e-n)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),u=-m*(n*x+d*v),q=-m*(c*x-p*v),r=[],z=0;z<g;++z){f+=e;var v=Math.cos(f),x=Math.sin(f),s=n*v-d*x+k,t=c*v+p*x+l,y=-m*(n*x+d*v),
+v=-m*(c*x-p*v),x=6*z;r[x]=Number(u+a);r[x+1]=Number(q+b);r[x+2]=Number(s-y+a);r[x+3]=Number(t-v+b);r[x+4]=Number(s+a);r[x+5]=Number(t+b);u=s+y;q=t+v}return r},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,
d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;
c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=
mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;
@@ -480,8 +480,8 @@ mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert
mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
-mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var s=this.createElement("text");s.setAttribute("x",this.format(a));s.setAttribute("y",this.format(b));s.setAttribute("w",this.format(c));s.setAttribute("h",this.format(d));s.setAttribute("str",e);null!=f&&s.setAttribute("align",f);null!=g&&s.setAttribute("valign",g);s.setAttribute("wrap",k?"1":"0");null==l&&(l="");s.setAttribute("format",l);null!=m&&s.setAttribute("overflow",
-m);null!=n&&s.setAttribute("clip",n?"1":"0");null!=p&&s.setAttribute("rotation",p);null!=r&&s.setAttribute("dir",r);this.root.appendChild(s)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var u=this.createElement("text");u.setAttribute("x",this.format(a));u.setAttribute("y",this.format(b));u.setAttribute("w",this.format(c));u.setAttribute("h",this.format(d));u.setAttribute("str",e);null!=f&&u.setAttribute("align",f);null!=g&&u.setAttribute("valign",g);u.setAttribute("wrap",k?"1":"0");null==l&&(l="");u.setAttribute("format",l);null!=m&&u.setAttribute("overflow",
+m);null!=n&&u.setAttribute("clip",n?"1":"0");null!=p&&u.setAttribute("rotation",p);null!=r&&u.setAttribute("dir",r);this.root.appendChild(u)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
@@ -518,23 +518,23 @@ mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;d="display:in
mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(a=this.convertHtml(a),"fill"!=e&&"width"!=e?a='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+
b+'"\x3e'+a+"\x3c/div\x3e":d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement};
mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight};
-mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var s=this.state;a+=s.dx;b+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(c)+"px"):"fill"==k?(r.style.width=Math.round(c+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(c+1)+"px",0<d&&(r.style.maxHeight=Math.round(d)+
-"px"));g&&0<c&&(r.style.width=Math.round(c+1)+"px");var q=0,t=0,t=r;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);q=(null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:t.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,c)),r.style.width=q+"px");q=(null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:t.offsetWidth)+2;t=(null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:t.offsetHeight)-2;l&&(t=Math.min(t,d),q=Math.min(q,c));"width"==k?d=t:"fill"!=k&&(c=q,d=t);l=
-g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(e+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=m&&(e+="rotate("+m+","+-g+","+
+mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var u=this.state;a+=u.dx;b+=u.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(c)+"px"):"fill"==k?(r.style.width=Math.round(c+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(c+1)+"px",0<d&&(r.style.maxHeight=Math.round(d)+
+"px"));g&&0<c&&(r.style.width=Math.round(c+1)+"px");var q=0,s=0,s=r;null!=s.firstChild&&"DIV"==s.firstChild.nodeName&&(s=s.firstChild);q=(null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:s.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,c)),r.style.width=q+"px");q=(null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:s.offsetWidth)+2;s=(null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:s.offsetHeight)-2;l&&(s=Math.min(s,d),q=Math.min(q,c));"width"==k?d=s:"fill"!=k&&(c=q,d=s);l=
+g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(e+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=m&&(e+="rotate("+m+","+-g+","+
-l+")");n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
-mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var s=this.state;a+=s.dx;b+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y=
-document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(x);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
-c){var z=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var A=y.style.whiteSpace;x.style.whiteSpace="nowrap";z<x.offsetWidth&&(y.style.whiteSpace=A)}n&&(z=Math.min(z,c));y.style.width=z+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=v+"px";q.setAttribute("style",y.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;y.parentNode.removeChild(y);u.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),z=y.offsetWidth,0==z&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),z=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=z),!n&&k&&(0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(A=q.style.whiteSpace,q.style.whiteSpace="nowrap",z<y.offsetWidth&&
-(q.style.whiteSpace=A)),v=z+v-1,k&&"fill"!=m&&"width"!=m&&(n&&(v=Math.min(v,c)),q.style.width=v+"px"),v=y.offsetWidth,x=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");n&&(x=Math.min(x,d),v=Math.min(v,c));"width"==m?d=x:"fill"!=m&&(c=v,d=x);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
-r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
-")"+y);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,r)}};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var u=this.state;a+=u.dx;b+=u.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",s=this.createElement("g");1>u.alpha&&s.setAttribute("opacity",u.alpha);var t=this.createElement("foreignObject");t.setAttribute("style","overflow:visible;");t.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);s.appendChild(t);this.root.appendChild(s);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z=
+document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(x);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=u.fontBorderColor&&(v+=2,r+=2);if(k&&0<
+c){var y=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=z.style.whiteSpace;x.style.whiteSpace="nowrap";y<x.offsetWidth&&(z.style.whiteSpace=E)}n&&(y=Math.min(y,c));z.style.width=y+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=v+"px";q.setAttribute("style",z.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;z.parentNode.removeChild(z);t.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):t.appendChild(q),z=q,null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==q.style.wordWrap&&(z.style.width="100%")),y=z.offsetWidth,0==y&&q.parentNode==t&&(q.style.visibility="hidden",document.body.appendChild(q),y=z.offsetWidth),this.cacheOffsetSize&&(s.mxCachedOffsetWidth=y),!n&&k&&(0<c&&this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(E=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<z.offsetWidth&&
+(q.style.whiteSpace=E)),v=y+v-1,k&&"fill"!=m&&"width"!=m&&(n&&(v=Math.min(v,c)),q.style.width=v+"px"),v=z.offsetWidth,x=z.offsetHeight,this.cacheOffsetSize&&(s.mxCachedFinalOffsetWidth=v,s.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=t&&(t.appendChild(q),q.style.visibility="");n&&(x=Math.min(x,d),v=Math.min(v,c));"width"==m?d=x:"fill"!=m&&(c=v,d=x);1>u.alpha&&s.setAttribute("opacity",u.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
+r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;z=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(z+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=p&&(z+="rotate("+p+","+-q+","+-r+")");s.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
+")"+z);t.setAttribute("width",Math.round(Math.max(1,c)));t.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(t,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(t.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(t),c.appendChild(a),s.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
-mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=n&&(q+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&s.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
-n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),s.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")):s.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&s.setAttribute("text-anchor",
-n);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&s.setAttribute("font-size",r*k.scale+"px");0<q.length&&s.setAttribute("transform",q);1>k.alpha&&s.setAttribute("opacity",k.alpha);q=e.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var t=r+(q.length-1)*p;n=b+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(t,d):t)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(t,d):t,n-=m+2));for(m=0;m<q.length;m++)0<
-q[m].length&&0<mxUtils.trim(q[m]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(r,q[m]),s.appendChild(r)),n+=p;this.root.appendChild(s);this.addTextBackground(s,e,a,b,c,"fill"==l?d:t,f,g,l)};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,u=this.createElement("g"),q=k.transform||"";this.updateFont(u);0!=n&&(q+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&u.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
+n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),u.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")):u.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&u.setAttribute("text-anchor",
+n);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&u.setAttribute("font-size",r*k.scale+"px");0<q.length&&u.setAttribute("transform",q);1>k.alpha&&u.setAttribute("opacity",k.alpha);q=e.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var s=r+(q.length-1)*p;n=b+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(s,d):s)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(s,d):s,n-=m+2));for(m=0;m<q.length;m++)0<
+q[m].length&&0<mxUtils.trim(q[m]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(r,q[m]),u.appendChild(r)),n+=p;this.root.appendChild(u);this.addTextBackground(u,e,a,b,c,"fill"==l?d:s,f,g,l)};
mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
"underline")};
mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,k,l){var m=this.state;if(null!=m.fontBackgroundColor||null!=m.fontBorderColor){var n=null;if("fill"==l||"width"==l)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,d*m.scale,(e-2)*m.scale,(f+2)*m.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var n=a.getBBox(),p=mxClient.IS_IE&&mxClient.IS_SVG,
@@ -560,24 +560,24 @@ mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){var l=null;f?(l=this.cre
mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.style.textDecoration="inherit",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=
f,c.innerHTML=a);a=c.style;a.fontSize=e.fontSize/this.vmlScale+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
(a.textDecoration="underline");return c};
-mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){var s=this.state;if("html"==l){null!=s.rotation&&(b=this.rotatePoint(a,b,s.rotation,s.rotationCx,s.rotationCy),a=b.x,b=b.y);8==document.documentMode&&!mxClient.IS_EM?(a+=s.dx,b+=s.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(b-=1)):(a*=s.scale,b*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline";
-l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),u=t.x,t=t.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
-(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=s.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){var u=this.state;if("html"==l){null!=u.rotation&&(b=this.rotatePoint(a,b,u.rotation,u.rotationCx,u.rotationCy),a=b.x,b=b.y);8==document.documentMode&&!mxClient.IS_EM?(a+=u.dx,b+=u.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(b-=1)):(a*=u.scale,b*=u.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline";
+l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=u.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var s=mxUtils.getAlignmentAsPoint(f,g),t=s.x,s=s.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
+(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=u.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
"false",r.appendChild(l),this.root.appendChild(r)):this.root.appendChild(l);n?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==m?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==m&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){v=p*(Math.PI/180);p=parseFloat(parseFloat(Math.cos(v)).toFixed(8));
r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var x=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;n?(c=Math.min(c,v),
-q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,e.style.height=q+"px";d=q;n=(d-d*g+c*-x)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-x)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*s.scale)+"px",m.style.top=this.format(b+(n-d/2)*s.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(s=8==document.documentMode&&
-!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-c/2)*s)+"px",l.style.top=this.format(b+(n-d/2)*s)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
-"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",s.appendChild(e),l.style.left=this.format(a+c*u*this.state.scale)+"px",l.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+
-"%",q.style.top=100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,r)}};
+q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,e.style.height=q+"px";d=q;n=(d-d*g+c*-x)/2-r*c*(t+0.5)+p*d*(s+0.5);k=(c-c*g+d*-x)/2+p*c*(t+0.5)+r*d*(s+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*u.scale)+"px",m.style.top=this.format(b+(n-d/2)*u.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(u=8==document.documentMode&&
+!mxClient.IS_EM?1:u.scale,l.style.left=this.format(a+(k-c/2)*u)+"px",l.style.top=this.format(b+(n-d/2)*u)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
+"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),u=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",u.appendChild(e),l.style.left=this.format(a+c*t*this.state.scale)+"px",l.style.top=this.format(b+d*s*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*t+
+"%",q.style.top=100*s+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,r)}};
mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,r){k=this.state;a=(a+k.dx)*k.scale;b=(b+k.dy)*k.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
"v-text-align:"+f;d.style.align=f;d.style.fontFamily=k.fontFamily;d.string=e;d.on="true";f=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=f+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");k=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=p*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,x=s.getCenterX(),y=s.y,z=s.y+s.height,A=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-u)<q?(f=b-a.x,
-q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-A)<t?(g=b-a.getCenterY(),t=Math.abs(b-A),c=!0):Math.abs(b-
-y)<t?(g=b-a.y,t=Math.abs(b-y),c=!0):Math.abs(b-z)<t&&(g=b-a.y-a.height,t=Math.abs(b-z),c=!0);c&&(p=C,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||c},E=0;E<this.states.length;E++){var C=this.states[E];null!=C&&(this.horizontal&&(b.call(this,C.getCenterX(),
-C),b.call(this,C.x,C),b.call(this,C.x+C.width,C)),this.vertical&&(s.call(this,C.getCenterY(),C),s.call(this,C.y,C),s.call(this,C.y+C.height,C)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),n||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,m=null,n=!1,p=null,r=null,u=this.getGuideTolerance(),q=u,s=u,u=a.clone();u.x+=b.x;u.y+=b.y;var t=u.x,v=u.x+u.width,x=u.getCenterX(),z=u.y,y=u.y+u.height,E=u.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-t)<q?(f=b-a.x,
+q=Math.abs(b-t),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var u=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)<s?(g=b-a.getCenterY(),s=Math.abs(b-E),c=!0):Math.abs(b-
+z)<s?(g=b-a.y,s=Math.abs(b-z),c=!0):Math.abs(b-y)<s&&(g=b-a.y-a.height,s=Math.abs(b-y),c=!0);c&&(p=D,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||c},A=0;A<this.states.length;A++){var D=this.states[A];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),
+D),b.call(this,D.x,D),b.call(this,D.x+D.width,D)),this.vertical&&(u.call(this,D.getCenterY(),D),u.call(this,D.y,D),u.call(this,D.y+D.height,D)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),n||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(m,minY),new mxPoint(m,maxY)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,e.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!n&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+f-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+f-this.graph.panDx,p.x+p.width)),this.guideY.points=
null!=minX&&null!=maxX?[new mxPoint(minX,r),new mxPoint(maxX,r)]:[new mxPoint(-this.graph.panDx,r),new mxPoint(e.scrollWidth-3-this.graph.panDx,r)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw());b=new mxPoint(f,g)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
@@ -638,9 +638,9 @@ mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=thi
mxShape.prototype.createTransparentSvgRectangle=function(a,b,c,d){var e=document.createElementNS(mxConstants.NS_SVG,"rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);e.setAttribute("fill","none");e.setAttribute("stroke","none");e.setAttribute("pointer-events","all");return e};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,k,l,m){var n=mxMarker.markers[c];return null!=n?n(a,b,c,d,e,f,g,k,l,m):null}};
-(function(){function a(a){a=null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,s){c=1.118*l*r;p=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:0.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(q.x,q.y);b.lineTo(q.x-l-m/a,q.y-m+l/a);(g==mxConstants.ARROW_CLASSIC||g==mxConstants.ARROW_CLASSIC_THIN)&&b.lineTo(q.x-3*l/4,q.y-3*m/4);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.close();s?b.fillAndStroke():b.stroke()}}}function b(a){a=
-null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,s){c=1.118*l*r;g=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=g;k.x+=2*-c;k.y+=2*-g;return function(){b.begin();b.moveTo(q.x-l-m/a,q.y-m+l/a);b.lineTo(q.x,q.y);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,r){n=c==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var s=g.clone();s.x-=b;s.y-=n;g.x+=-k-b;g.y+=-l-n;var q=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(s.x,s.y);a.lineTo(s.x-
-k/2-l/q,s.y+k/q-l/2);a.lineTo(s.x-k,s.y-l);a.lineTo(s.x-k/2+l/q,s.y-l/2-k/q);a.close();r?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,r){var s=m/2,q=g.clone();g.x-=k*s;g.y-=l*s;return function(){a.ellipse(q.x-s,q.y-s,m,m);r?a.fillAndStroke():a.stroke()}});
+(function(){function a(a){a=null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,u){c=1.118*l*r;p=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:0.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(q.x,q.y);b.lineTo(q.x-l-m/a,q.y-m+l/a);(g==mxConstants.ARROW_CLASSIC||g==mxConstants.ARROW_CLASSIC_THIN)&&b.lineTo(q.x-3*l/4,q.y-3*m/4);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.close();u?b.fillAndStroke():b.stroke()}}}function b(a){a=
+null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,u){c=1.118*l*r;g=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=g;k.x+=2*-c;k.y+=2*-g;return function(){b.begin();b.moveTo(q.x-l-m/a,q.y-m+l/a);b.lineTo(q.x,q.y);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,r){n=c==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var u=g.clone();u.x-=b;u.y-=n;g.x+=-k-b;g.y+=-l-n;var q=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(u.x,u.y);a.lineTo(u.x-
+k/2-l/q,u.y+k/q-l/2);a.lineTo(u.x-k,u.y-l);a.lineTo(u.x-k/2+l/q,u.y-l/2-k/q);a.close();r?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,r){var u=m/2,q=g.clone();g.x-=k*u;g.y-=l*u;return function(){a.ellipse(q.x-u,q.y-u,m,m);r?a.fillAndStroke():a.stroke()}});
mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
@@ -654,19 +654,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=mxUti
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b)};mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};
mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=Math.max(this.arrowWidth,this.endSize);a.grow((b/2+this.strokewidth)*this.scale)};
-mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],k=g.x-f.x,l=g.y-f.y,m=Math.sqrt(k*k+l*l),n=m-2*c-e,k=k/m,l=l/m,m=d*l/3,d=-d*k/3,e=f.x-m/2+c*k,f=f.y-d/2+c*l,p=e+m,r=f+d,s=p+n*k,n=r+n*l,q=s+m,t=n+d,u=q-3*m,v=t-3*d;a.begin();a.moveTo(e,f);a.lineTo(p,r);a.lineTo(s,n);a.lineTo(q,t);a.lineTo(g.x-c*k,g.y-c*l);a.lineTo(u,v);a.lineTo(u+m,v+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],k=g.x-f.x,l=g.y-f.y,m=Math.sqrt(k*k+l*l),n=m-2*c-e,k=k/m,l=l/m,m=d*l/3,d=-d*k/3,e=f.x-m/2+c*k,f=f.y-d/2+c*l,p=e+m,r=f+d,u=p+n*k,n=r+n*l,q=u+m,s=n+d,t=q-3*m,v=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(p,r);a.lineTo(u,n);a.lineTo(q,s);a.lineTo(g.x-c*k,g.y-c*l);a.lineTo(t,v);a.lineTo(t+m,v+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
-mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],s=1;s<b.length-1&&b[s].x==
-b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,x=u,y=s/t,z,A=y,t=f*y,E=-f*u,C=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,y,n,d,f,m,!0);else{v=b[0].x+t/2+m*u;z=b[0].y+E/2+m*y;var D=b[0].x-t/2+m*u,F=b[0].y-E/2+m*y;g?(a.moveTo(v,z),C.push(function(){a.lineTo(D,F)})):(a.moveTo(D,F),a.lineTo(v,z))}for(var G=z=v=0,t=0;t<b.length-2;t++)if(E=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,z=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+z*z),0!=G&&(x=v/G,A=z/G,tmp=Math.max(Math.sqrt((u*x+y*A+1)/2),0.04),v=u+x,z=y+A,G=Math.sqrt(v*v+z*z),0!=G)){v/=G;z/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=E&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+z*f/2/G,N=b[t+1].y-v*f/2/G;z=b[t+1].x-z*f/2/G;v=b[t+1].y+v*f/2/G;0==E||!p?(a.lineTo(H,N),function(b,c){C.push(function(){a.lineTo(b,c)})}(z,v)):-1==E?(E=z+A*f,G=v-x*f,
-a.lineTo(z+y*f,v-u*f),a.quadTo(H,N,E,G),function(b,c){C.push(function(){a.lineTo(b,c)})}(z,v)):(a.lineTo(H,N),function(b,c){var d=H-y*f,e=N+u*f,k=H-A*f,g=N+x*f;C.push(function(){a.quadTo(b,c,d,e)});C.push(function(){a.lineTo(k,g)})}(z,v));u=x;y=A}t=f*A;E=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,m,!1);else{a.lineTo(r.x-m*x+t/2,r.y-m*A+E/2);var K=r.x-m*x-t/2,R=r.y-m*A-E/2;g?(a.moveTo(K,R),C.splice(0,0,function(){a.moveTo(K,R)})):a.lineTo(K,R)}for(t=C.length-1;0<=t;t--)C[t]();g?(a.end(),
-a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,m,!0),a.stroke(),a.end()))}};
+mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],u=1;u<b.length-1&&b[u].x==
+b[0].x&&b[u].y==b[0].y;)u++;var q=b[u].x-b[0].x,u=b[u].y-b[0].y,s=Math.sqrt(q*q+u*u);if(0!=s){var t=q/s,v,x=t,z=u/s,y,E=z,s=f*z,A=-f*t,D=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=t;u=z;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,t,z,n,d,f,m,!0);else{v=b[0].x+s/2+m*t;y=b[0].y+A/2+m*z;var C=b[0].x-s/2+m*t,F=b[0].y-A/2+m*z;g?(a.moveTo(v,y),D.push(function(){a.lineTo(C,F)})):(a.moveTo(C,F),a.lineTo(v,y))}for(var H=y=v=0,s=0;s<b.length-2;s++)if(A=mxUtils.relativeCcw(b[s].x,
+b[s].y,b[s+1].x,b[s+1].y,b[s+2].x,b[s+2].y),v=b[s+2].x-b[s+1].x,y=b[s+2].y-b[s+1].y,H=Math.sqrt(v*v+y*y),0!=H&&(x=v/H,E=y/H,tmp=Math.max(Math.sqrt((t*x+z*E+1)/2),0.04),v=t+x,y=z+E,H=Math.sqrt(v*v+y*y),0!=H)){v/=H;y/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),H=0!=A&&p?Math.max(0.1,H):Math.max(tmp,0.06),G=b[s+1].x+y*f/2/H,N=b[s+1].y-v*f/2/H;y=b[s+1].x-y*f/2/H;v=b[s+1].y+v*f/2/H;0==A||!p?(a.lineTo(G,N),function(b,c){D.push(function(){a.lineTo(b,c)})}(y,v)):-1==A?(A=y+E*f,H=v-x*f,
+a.lineTo(y+z*f,v-t*f),a.quadTo(G,N,A,H),function(b,c){D.push(function(){a.lineTo(b,c)})}(y,v)):(a.lineTo(G,N),function(b,c){var d=G-z*f,e=N+t*f,k=G-E*f,g=N+x*f;D.push(function(){a.quadTo(b,c,d,e)});D.push(function(){a.lineTo(k,g)})}(y,v));t=x;z=E}s=f*E;A=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-t,-z,c,e,f,m,!1);else{a.lineTo(r.x-m*x+s/2,r.y-m*E+A/2);var K=r.x-m*x-s/2,R=r.y-m*E-A/2;g?(a.moveTo(K,R),D.splice(0,0,function(){a.moveTo(K,R)})):a.lineTo(K,R)}for(s=D.length-1;0<=s;s--)D[s]();g?(a.end(),
+a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,u,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-t,-z,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
-function mxText(a,b,c,d,e,f,g,k,l,m,n,p,r,s,q,t,u,v,x,y,z){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=y?y:0;this.textDirection=z;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
+function mxText(a,b,c,d,e,f,g,k,l,m,n,p,r,u,q,s,t,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=u?u:!0;this.background=q;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
@@ -756,8 +756,8 @@ mxStackLayout.prototype.resizeParentMax=!1;mxStackLayout.prototype.resizeLast=!1
mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,k=0,l=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);b/=this.graph.view.scale;for(g=0;g<l;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(k<=b&&c>b)break;k=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k,
-mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),r=0;r<p;r++){var s=d.getChildAt(a,r);if(!this.isVertexIgnored(s)&&this.isVertexMovable(s)){var q=d.getGeometry(s);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=k&&(c&&k.x+k.width+q.width+2*this.spacing>this.wrap||!c&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=
-0;var l=Math.max(l,c?q.height:q.width),t=0;if(!this.borderCollapse)var u=this.graph.getCellStyle(s),t=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?q.x=m+this.spacing+Math.floor(t/2):q.y=m+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(s,q);n=s;k=q;m=c?k.x+k.width+Math.floor(t/2):k.y+k.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),r=0;r<p;r++){var u=d.getChildAt(a,r);if(!this.isVertexIgnored(u)&&this.isVertexMovable(u)){var q=d.getGeometry(u);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=k&&(c&&k.x+k.width+q.width+2*this.spacing>this.wrap||!c&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=
+0;var l=Math.max(l,c?q.height:q.width),s=0;if(!this.borderCollapse)var t=this.graph.getCellStyle(u),s=mxUtils.getNumber(t,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?q.x=m+this.spacing+Math.floor(s/2):q.y=m+this.spacing+Math.floor(s/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(u,q);n=u;k=q;m=c?k.x+k.width+Math.floor(s/2):k.y+k.height+Math.floor(s/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
b,k):this.resizeLast&&null!=b&&(null!=k&&null!=n)&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);(null==c||b.x!=c.x||b.y!=c.y||b.width!=c.width||b.height!=c.height)&&this.graph.getModel().setGeometry(a,b)};
mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.spacing+this.marginRight,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.spacing+this.marginBottom,f.height=this.resizeParentMax?Math.max(f.height,c):c);(b.x!=f.x||b.y!=f.y||b.width!=f.width||b.height!=f.height)&&e.setGeometry(a,f)};
function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
@@ -788,7 +788,7 @@ mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=
mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)};
mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,k=this.getVertexBounds(c),l=0;l<e.length;l++){for(var m=
-e[l].cell.cell,n=this.getVertexBounds(m),m=this.graph.getEdgesBetween(c,m,!1),p=[],r=0,s=0,q=0;q<m.length;q++)this.horizontal?(r=k.x+k.width,s=k.y+b,p.push(new mxPoint(r,s)),r=k.x+k.width+f,p.push(new mxPoint(r,s)),s=n.y+n.height/2):(r=k.x+b,s=k.y+k.height,p.push(new mxPoint(r,s)),s=k.y+k.height+f,p.push(new mxPoint(r,s)),r=n.x+n.width/2),p.push(new mxPoint(r,s)),this.setEdgePoints(m[q],p);l<d/2?f+=this.prefVertEdgeOff:l>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+e[l].cell.cell,n=this.getVertexBounds(m),m=this.graph.getEdgesBetween(c,m,!1),p=[],r=0,u=0,q=0;q<m.length;q++)this.horizontal?(r=k.x+k.width,u=k.y+b,p.push(new mxPoint(r,u)),r=k.x+k.width+f,p.push(new mxPoint(r,u)),u=n.y+n.height/2):(r=k.x+b,u=k.y+k.height,p.push(new mxPoint(r,u)),u=k.y+k.height+f,p.push(new mxPoint(r,u)),r=n.x+n.width/2),p.push(new mxPoint(r,u)),this.setEdgePoints(m[q],p);l<d/2?f+=this.prefVertEdgeOff:l>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxRadialTreeLayout(a){mxCompactTreeLayout.call(this,a,!1)}
mxUtils.extend(mxRadialTreeLayout,mxCompactTreeLayout);mxRadialTreeLayout.prototype.angleOffset=0.5;mxRadialTreeLayout.prototype.rootx=0;mxRadialTreeLayout.prototype.rooty=0;mxRadialTreeLayout.prototype.levelDistance=120;mxRadialTreeLayout.prototype.nodeDistance=10;mxRadialTreeLayout.prototype.autoRadius=!1;mxRadialTreeLayout.prototype.sortEdges=!1;mxRadialTreeLayout.prototype.rowMinX=[];mxRadialTreeLayout.prototype.rowMaxX=[];mxRadialTreeLayout.prototype.rowMinCenX=[];
mxRadialTreeLayout.prototype.rowMaxCenX=[];mxRadialTreeLayout.prototype.rowRadi=[];mxRadialTreeLayout.prototype.row=[];mxRadialTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
@@ -801,7 +801,7 @@ mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disabl
mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var k=mxObjectIdentity.get(g);this.indices[k]=d;var l=this.getVertexBounds(g),m=l.width,n=l.height,p=l.x,r=l.y;this.cellLocation[d][0]=p+m/2;this.cellLocation[d][1]=r+n/2;this.radius[d]=Math.min(m,n);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
-var s=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(s,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(s[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(s[m],!1);var k=mxObjectIdentity.get(c[m]),q=this.indices[k];this.neighbours[d][m]=null!=q?q:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+var u=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(u,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(u[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(u[m],!1);var k=mxObjectIdentity.get(c[m]),q=this.indices[k];this.neighbours[d][m]=null!=q?q:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(l=this.getVertexBounds(g),null!=l&&(this.cellLocation[d][0]-=l.width/2,this.cellLocation[d][1]-=l.height/2,p=this.graph.snap(this.cellLocation[d][0]),r=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,p,r),c=null==c?p:Math.min(c,p),a=null==a?r:Math.min(a,r)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
@@ -860,9 +860,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;f-=1;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++){l=d[g]+f;for(++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l]}return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],m=v.getNextLayerConnectedCells(f),n=v.getPreviousLayerConnectedCells(f),s=[],q=[],y=0;y<m.length;y++)s[y]=m[y].getGeneralPurposeVariable(f+
-1);for(y=0;y<n.length;y++)q[y]=n[y].getGeneralPurposeVariable(f-1)}else m=p,n=r,s=t,q=u,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);t=[];u=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(f+1);for(y=0;y<r.length;y++)u[y]=r[y].getGeneralPurposeVariable(f-1);for(var z=0,A=0,y=0;y<s.length;y++)for(var E=0;E<t.length;E++)s[y]>t[E]&&z++,s[y]<t[E]&&A++;for(y=0;y<q.length;y++)for(E=0;E<u.length;E++)q[y]>u[E]&&z++,q[y]<u[E]&&A++;if(A<z||A==z&&e)p=v.getGeneralPurposeVariable(f),
-v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,r=n,t=s,u=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,r=null,u=null,q=null,s=null,t=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],m=v.getNextLayerConnectedCells(f),n=v.getPreviousLayerConnectedCells(f),u=[],q=[],z=0;z<m.length;z++)u[z]=m[z].getGeneralPurposeVariable(f+
+1);for(z=0;z<n.length;z++)q[z]=n[z].getGeneralPurposeVariable(f-1)}else m=p,n=r,u=s,q=t,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);s=[];t=[];for(z=0;z<p.length;z++)s[z]=p[z].getGeneralPurposeVariable(f+1);for(z=0;z<r.length;z++)t[z]=r[z].getGeneralPurposeVariable(f-1);for(var y=0,E=0,z=0;z<u.length;z++)for(var A=0;A<s.length;A++)u[z]>s[A]&&y++,u[z]<s[A]&&E++;for(z=0;z<q.length;z++)for(A=0;A<t.length;A++)q[z]>t[A]&&y++,q[z]<t[A]&&E++;if(E<y||E==y&&e)p=v.getGeneralPurposeVariable(f),
+v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,r=n,s=u,t=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -874,11 +874,11 @@ mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.pro
mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3dCoord assignment debug\x3d\x3d\x3d\x3d\x3d\x3d\x3d");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b)," ");mxLog.writeln()}mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d")};
mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
-mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,r=n.length,s=this.medianXValue(k,l+1),q=this.medianXValue(n,
-l-1),t=p+r,u=e.getGeneralPurposeVariable(l),v=u;0<t&&(v=(s*p+q*r)/t);p=!1;v<u-1?0==m?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m-1],u=m.getGeneralPurposeVariable(l),u=u+m.width/2+this.intraCellSpacing+e.width/2,u<v?(e.setGeneralPurposeVariable(l,v),p=!0):u<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,u),p=!0)):v>u+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],u=m.getGeneralPurposeVariable(l),u=u-m.width/2-this.intraCellSpacing-e.width/2,u>v?(e.setGeneralPurposeVariable(l,
-v),p=!0):u>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,u),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,r=n.length,u=this.medianXValue(k,l+1),q=this.medianXValue(n,
+l-1),s=p+r,t=e.getGeneralPurposeVariable(l),v=t;0<s&&(v=(u*p+q*r)/s);p=!1;v<t-1?0==m?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m-1],t=m.getGeneralPurposeVariable(l),t=t+m.width/2+this.intraCellSpacing+e.width/2,t<v?(e.setGeneralPurposeVariable(l,v),p=!0):t<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,t),p=!0)):v>t+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],t=m.getGeneralPurposeVariable(l),t=t-m.width/2-this.intraCellSpacing-e.width/2,t>v?(e.setGeneralPurposeVariable(l,
+v),p=!0):t>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,t),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var k=null,k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var l=0,g=d[f].cell,l=0,k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
-null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));for(var m=0,k=-1E8,n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var r=p.cell;p.visited?(k=r.getGeneralPurposeVariable(a)+r.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=r.width+this.intraCellSpacing,n--)}}m=0;r=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var s=p.cell;p.visited?(r=s.getGeneralPurposeVariable(a)-s.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=s.width+this.intraCellSpacing,
+null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));for(var m=0,k=-1E8,n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var r=p.cell;p.visited?(k=r.getGeneralPurposeVariable(a)+r.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=r.width+this.intraCellSpacing,n--)}}m=0;r=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var u=p.cell;p.visited?(r=u.getGeneralPurposeVariable(a)-u.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=u.width+this.intraCellSpacing,
n++)}l>=k&&l<=r?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>r&&(g.setGeneralPurposeVariable(a,r),this.currentXDelta+=l-r);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
@@ -892,14 +892,14 @@ mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.ge
mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=-Number.MAX_VALUE;for(var d=b.vertexMapper.getValues(),c=0;c<d.length;c++)this.setVertexLocation(d[c]);(this.layout.edgeStyle==mxHierarchicalEdgeStyle.ORTHOGONAL||this.layout.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();
for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};
-mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);for(var n=e.x[0]-e.width/2,p=n+e.width,r=f=0,g=[],m=0;m<l.length;m++){var s=l[m].cell,
-q;if(s.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.length;t++)if(q[t].source==s||q[t].target==s)f+=q[t].edges.length,r++,g.push(q[t])}else f+=s.edges.length,r++,g.push(s)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;m<g.length;m++){s=g[m].edges.length;q=this.jettyPositions[g[m].ids[0]];null==q&&(q=[],this.jettyPositions[g[m].ids[0]]=q);m<f/2?
-p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff);for(t=0;t<s;t++)q[4*t+2*k]=n,n+=l,q[4*t+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
-mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),r=[],s=a.isReversed;p!=g&&(s=!s);if(null!=f){var q=s?
-2:0,t=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],u=f[4*e+1+q];s!=l&&(u=-u);var t=t+u,q=f[4*e+q],v=k.model.getTerminal(n,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,t+u))):(r.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,y=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var z=x,x=y,y=z;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,y))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(y,
-v)));this.limitX=Math.max(this.limitX,v);p+=t}null!=f&&(q=s?2:0,t=s?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],u=f[4*e+3-q],s!=l&&(u=-u),t-=u,q=f[4*e+2-q],s=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-r.push(new mxPoint(q,t-u)),r.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t-u,q)),r.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);for(var n=e.x[0]-e.width/2,p=n+e.width,r=f=0,g=[],m=0;m<l.length;m++){var u=l[m].cell,
+q;if(u.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<q.length;s++)if(q[s].source==u||q[s].target==u)f+=q[s].edges.length,r++,g.push(q[s])}else f+=u.edges.length,r++,g.push(u)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;m<g.length;m++){u=g[m].edges.length;q=this.jettyPositions[g[m].ids[0]];null==q&&(q=[],this.jettyPositions[g[m].ids[0]]=q);m<f/2?
+p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff);for(s=0;s<u;s++)q[4*s+2*k]=n,n+=l,q[4*s+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),r=[],u=a.isReversed;p!=g&&(u=!u);if(null!=f){var q=u?
+2:0,s=u?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],t=f[4*e+1+q];u!=l&&(t=-t);var s=s+t,q=f[4*e+q],v=k.model.getTerminal(n,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,s)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,s+t))):(r.push(new mxPoint(s,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(s+t,q)))}q=a.x.length-1;s=t=-1;p=a.maxRank-1;for(u&&(q=0,t=a.x.length,s=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=t;q+=s){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,z=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(u)var y=x,x=z,z=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,z))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(z,
+v)));this.limitX=Math.max(this.limitX,v);p+=s}null!=f&&(q=u?2:0,s=u?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],t=f[4*e+3-q],u!=l&&(t=-t),s-=t,q=f[4*e+2-q],u=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(u)&&k.model.getParent(u)==p&&(q=k.view.getState(u),q=null!=q?q.x:p.geometry.x+a.target.width*u.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+r.push(new mxPoint(q,s-t)),r.push(new mxPoint(q,s))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(s-t,q)),r.push(new mxPoint(s,q))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
@@ -1002,16 +1002,16 @@ return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<
Math.tan(f)/2):f<-m?(g.y=a.y,g.x=b-a.height*Math.tan(l)/2):f<m?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(l)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,k=a.height/2,l=e+g,m=f+k;b=c.x;c=c.y;var n=parseInt(b-l),p=parseInt(c-m);if(0==n&&0!=p)return new mxPoint(l,
m+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-m,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,b<=e&&(a=-a),new mxPoint(l+a,c);if(b>=e&&b<=e+a.width)return a=b-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,m+a)}e=p/n;m-=e*l;f=g*g*e*e+k*k;a=-2*l*f;k=Math.sqrt(a*a-4*f*(g*g*e*e*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*f);k=(-a-k)/(2*f);l=e*g+m;m=e*k+m;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(l-c,2));b=Math.sqrt(Math.pow(k-b,2)+Math.pow(m-c,2));f=c=0;e<b?(c=
g,f=l):(c=k,f=m);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,k=e+a/2,l=c.x;c=c.y;if(g==l)return k>c?new mxPoint(g,e):new mxPoint(g,e+a);if(k==c)return g>l?new mxPoint(b,k):new mxPoint(b+f,k);var m=g,n=k;d&&(l>=b&&l<=b+f?m=l:c>=e&&c<=e+a&&(n=c));return l<g?c<k?mxUtils.intersection(l,c,m,n,g,e,b,k):mxUtils.intersection(l,c,m,n,g,e+a,b,k):c<k?mxUtils.intersection(l,c,m,n,g,e,b+f,k):mxUtils.intersection(l,c,m,n,g,e+a,b+f,k)},TrianglePerimeter:function(a,
-b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width;a=a.height;var l=f+k/2,m=g+a/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),r=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(n=r,p=new mxPoint(l,g),r=new mxPoint(f+k,g+a)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),r=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),r=new mxPoint(f+k,g+a));var s=c.x-
-l,q=c.y-m,s=e?Math.atan2(s,q):Math.atan2(q,s),t=e?Math.atan2(k,a):Math.atan2(a,k),q=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?s>-t&&s<t:s<-Math.PI+t||s>Math.PI-t,t=null;q?t=d&&(e&&c.x>=n.x&&c.x<=r.x||!e&&c.y>=n.y&&c.y<=r.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+a*Math.tan(s)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-a*Math.tan(s)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+a/2+k*Math.tan(s)/2):new mxPoint(f,
-g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,m),c.y>=g&&c.y<=g+a?(d.x=e?l:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=!e?m:b==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,m=d.y),t=e&&c.x<=f+k/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,l,m,p.x,p.y,r.x,r.y));null==t&&(t=new mxPoint(l,m));return t},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=
--Math.atan2(n-a,m-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;q=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(t){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width;a=a.height;var l=f+k/2,m=g+a/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),r=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(n=r,p=new mxPoint(l,g),r=new mxPoint(f+k,g+a)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),r=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),r=new mxPoint(f+k,g+a));var u=c.x-
+l,q=c.y-m,u=e?Math.atan2(u,q):Math.atan2(q,u),s=e?Math.atan2(k,a):Math.atan2(a,k),q=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?u>-s&&u<s:u<-Math.PI+s||u>Math.PI-s,s=null;q?s=d&&(e&&c.x>=n.x&&c.x<=r.x||!e&&c.y>=n.y&&c.y<=r.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+a*Math.tan(u)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-a*Math.tan(u)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+a/2+k*Math.tan(u)/2):new mxPoint(f,
+g+a/2-k*Math.tan(u)/2):(d&&(d=new mxPoint(l,m),c.y>=g&&c.y<=g+a?(d.x=e?l:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=!e?m:b==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,m=d.y),s=e&&c.x<=f+k/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,l,m,p.x,p.y,r.x,r.y));null==s&&(s=new mxPoint(l,m));return s},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=
+-Math.atan2(n-a,m-l),r=Math.PI,u=Math.PI/2,q=new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var s=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;q=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(s){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,
f+3*k/4)}else if(m>e+g){if(n==f+k/4)return new mxPoint(e+g,f+k/4);if(n==f+3*k/4)return new mxPoint(e+g,f+3*k/4)}else if(m==e){if(n<a)return new mxPoint(e,f+k/4);if(n>a)return new mxPoint(e,f+3*k/4)}else if(m==e+g){if(n<a)return new mxPoint(e+g,f+k/4);if(n>a)return new mxPoint(e+g,f+3*k/4)}if(n==f)return new mxPoint(l,f);if(n==f+k)return new mxPoint(l,f+k);m<l?n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):n<f+k/4?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+
g,f-Math.floor(0.25*k))):n>f+3*k/4&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+Math.floor(1.25*k))):m>l&&(n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e+g,f),q=new mxPoint(e+g,f+k)):n<f+k/4?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):n>f+3*k/4&&(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))))}else{if(n==a){if(m<=e)return new mxPoint(e,f+k/2);if(m>=e+g)return new mxPoint(e+g,f+k/
2)}else if(n<f){if(m==e+g/4)return new mxPoint(e+g/4,f);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f)}else if(n>f+k){if(m==e+g/4)return new mxPoint(e+g/4,f+k);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f+k)}else if(n==f){if(m<l)return new mxPoint(e+g/4,f);if(m>l)return new mxPoint(e+3*g/4,f)}else if(n==f+k){if(m<l)return new mxPoint(e+g/4,f+k);if(n>a)return new mxPoint(e+3*g/4,f+k)}if(m==e)return new mxPoint(e,a);if(m==e+g)return new mxPoint(e+g,a);n<a?m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f),q=new mxPoint(e+
g,f)):m<e+g/4?(b=new mxPoint(e-Math.floor(0.25*g),f+k),q=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f+k)):n>a&&(m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f+k),q=new mxPoint(e+g,f+k)):m<e+g/4?(b=new mxPoint(e-Math.floor(0.25*g),f),q=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f)))}d=
-l;p=a;m>=e&&m<=e+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);q=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,q.x,q.y)}else{if(t){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(0.25*k));if(p==s)return new mxPoint(e+Math.floor(0.5*g),f);if(p==r-m)return new mxPoint(e,f+Math.floor(0.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(0.75*k));if(p==-s)return new mxPoint(e+Math.floor(0.5*g),f+k);if(p==-r+m)return new mxPoint(e,f+Math.floor(0.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),
-q=new mxPoint(e+g,f+k)):p>m&&p<s?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):p>s&&p<r-m?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f-Math.floor(0.25*k))):p>r-m&&p<=r||p<-r+m&&p>=-r?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):p<-m&&p>-s?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))):p<-s&&p>-r+m&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+
+l;p=a;m>=e&&m<=e+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);q=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,q.x,q.y)}else{if(s){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(0.25*k));if(p==u)return new mxPoint(e+Math.floor(0.5*g),f);if(p==r-m)return new mxPoint(e,f+Math.floor(0.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(0.75*k));if(p==-u)return new mxPoint(e+Math.floor(0.5*g),f+k);if(p==-r+m)return new mxPoint(e,f+Math.floor(0.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),
+q=new mxPoint(e+g,f+k)):p>m&&p<u?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):p>u&&p<r-m?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f-Math.floor(0.25*k))):p>r-m&&p<=r||p<-r+m&&p>=-r?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):p<-m&&p>-u?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))):p<-u&&p>-r+m&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+
Math.floor(1.25*k)))}else{m=Math.atan2(k/2,g/4);if(p==m)return new mxPoint(e+Math.floor(0.75*g),f);if(p==r-m)return new mxPoint(e+Math.floor(0.25*g),f);if(p==r||p==-r)return new mxPoint(e,f+Math.floor(0.5*k));if(0==p)return new mxPoint(e+g,f+Math.floor(0.5*k));if(p==-m)return new mxPoint(e+Math.floor(0.75*g),f+k);if(p==-r+m)return new mxPoint(e+Math.floor(0.25*g),f+k);0<p&&p<m?(b=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f+k)):p>m&&p<r-m?(b=new mxPoint(e,
f),q=new mxPoint(e+g,f)):p>r-m&&p<r?(b=new mxPoint(e-Math.floor(0.25*g),f+k),q=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k))):0>p&&p>-m?(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f)):p<-m&&p>-r+m?(b=new mxPoint(e,f+k),q=new mxPoint(e+g,f+k)):p<-r+m&&p>-r&&(b=new mxPoint(e-Math.floor(0.25*g),f),q=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)))}q=mxUtils.intersection(l,a,c.x,c.y,b.x,b.y,q.x,q.y)}return null==q?new mxPoint(l,a):q}};
function mxPrintPreview(a,b,c,d,e,f,g,k,l){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=mxRectangle.fromRectangle(null!=c?c:a.pageFormat);this.title=null!=k?k:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;
@@ -1021,10 +1021,10 @@ mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode
mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f)};
mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.initializeOverlay,f=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(a,b,c,d){b.dialect=a.view.graph.dialect;b.init(a.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;b=!1;null==this.wnd&&(b=!0,this.wnd=window.open());var g=this.wnd.document;if(b){var k=this.getDoctype();null!=k&&0<k.length&&
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),m=this.graph.getView().getScale(),n=m/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
-(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var a=this.createPageSelector(t,q);g.body.appendChild(a);
+(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),s=Math.max(1,Math.ceil((l.height+this.y0)/u));this.pageCount=q*s;var t=mxUtils.bind(this,function(){if(this.pageSelector&&(1<s||1<q)){var a=this.createPageSelector(s,q);g.body.appendChild(a);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),v=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
-if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var y=0;y<x.length;y++)v(x[y],!0);for(var z=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var A=y*s/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var E=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,C=y*q+a+1,D=new mxRectangle(E,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-E,-A,this.scale,C,a,D);this.printBackgroundImage&&this.insertBackgroundImage(a,-E,-A)}),C);f.setAttribute("id","mxPage-"+C);v(f,null!=z||y<t-1||a<q-1)}}if(null!=z)for(y=0;y<z.length;y++)v(z[y],y<z.length-1);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
+if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var z=0;z<x.length;z++)v(x[z],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<s;z++){var E=z*u/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,D=z*q+a+1,C=new mxRectangle(A,E,r,u),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-A,-E,this.scale,D,a,C);this.printBackgroundImage&&this.insertBackgroundImage(a,-A,-E)}),D);f.setAttribute("id","mxPage-"+D);v(f,null!=y||z<s-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length-1);b&&!d&&(this.closeDocument(),t());this.wnd.focus()}catch(F){null!=
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1034,10 +1034,10 @@ mxPrintPreview.prototype.renderPage=function(a,b,c,d,e,f){f=this.wnd.document;va
"relative";m.style.marginLeft=c+"px";m.style.marginTop=d+"px";8==f.documentMode&&(l.style.position="absolute",m.style.position="absolute");10==f.documentMode&&(m.style.width="100%",m.style.height="100%");l.appendChild(m);g.appendChild(l);document.body.appendChild(g);k=m}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),l=document.createElement("div"),l.style.width=a-2*this.border+"px",l.style.height=
b-2*this.border+"px",l.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"):(l.style.top=this.border+"px",l.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}e(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
-mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var s=g.getTranslate();g.translate=new mxPoint(a,
-b);var q=this.graph.cellRenderer.redraw,t=g.states;a=g.scale;if(this.clipping){var u=new mxRectangle((f.x+s.x)*a,(f.y+s.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=t.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(u,d)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,c,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var u=g.getTranslate();g.translate=new mxPoint(a,
+b);var q=this.graph.cellRenderer.redraw,s=g.states;a=g.scale;if(this.clipping){var t=new mxRectangle((f.x+u.x)*a,(f.y+u.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=s.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(t,d)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,c,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)v=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=v;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),
-0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=q;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=s;a.destroy();g.setEventsEnabled(p)}};
+0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=q;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=u;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
@@ -1150,26 +1150,26 @@ f),g=f.y<k||f.y>n,k=f.x<l||f.x>m;else l=Math.max(b.x,c.x),m=Math.min(b.x+b.width
b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),k=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:Math.round(k+(a-k)/2),k=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(k=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,
a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?!mxUtils.contains(c,d.x,k)&&!mxUtils.contains(b,d.x,k)&&e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/
-2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var n=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],t=b,u=g[0],v=!1,x=!1,v=n;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var y=null!=u&&u.x==v.x,z=null!=u&&u.y==v.y,A=null!=t&&v.y>=t.y&&
-v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=z||null==u&&A,x=y||null==u&&t;if(!(0==s&&(v&&x||y&&z))){if(null!=u&&!z&&!y&&(A||t)){m=A?!1:!0;break}if(x||v){m=v;1==s&&(m=0==d.length%2?v:x);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];y&&z&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
-p.y));m?p.y=n.y:p.x=n.x;for(s=0;s<d.length;s++)m=!m,n=d[s],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[r]&&g[r].y!=n.y||null==g[r]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
+2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var n=[],u=0;u<d.length;u++){var q=a.view.transformControlPoint(a,d[u]);null!=
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],s=b,t=g[0],v=!1,x=!1,v=n;null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),s=null);for(u=0;2>u;u++){var z=null!=t&&t.x==v.x,y=null!=t&&t.y==v.y,E=null!=s&&v.y>=s.y&&
+v.y<=s.y+s.height,s=null!=s&&v.x>=s.x&&v.x<=s.x+s.width,v=y||null==t&&E,x=z||null==t&&s;if(!(0==u&&(v&&x||z&&y))){if(null!=t&&!y&&!z&&(E||s)){m=E?!1:!0;break}if(x||v){m=v;1==u&&(m=0==d.length%2?v:x);break}}s=c;t=g[r];null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),s=null);v=d[d.length-1];z&&y&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
+p.y));m?p.y=n.y:p.x=n.x;for(u=0;u<d.length;u++)m=!m,n=d[u],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[r]&&g[r].y!=n.y||null==g[r]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[r]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&(Math.abs(q.x-e[e.length-1].x)<k&&Math.abs(q.y-e[e.length-1].y)<k)&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<k&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<k&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,
dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,
2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,
VERTEX_MASK:3072,getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+
-mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:m.x,t=null!=c?c.y:m.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*
-mxEdgeStyle.getJettySize(a,b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var y=x+f,z=!1;if(null!=l&&null!=m)var z=m.x-l.x,A=m.y-l.y,z=z*z+A*A<y*y;if(z||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];z=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(n,
-p,r,s),z),n=z.x,p=z.y,r=z.width,s=z.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),z),q=z.x,t=z.y,u=z.width,v=z.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];n=[[n,p,r,s],[q,t,u,v]];x=[f,x];for(z=0;2>
-z;z++)mxEdgeStyle.limits[z][1]=n[z][0]-x[z],mxEdgeStyle.limits[z][2]=n[z][1]-x[z],mxEdgeStyle.limits[z][4]=n[z][0]+n[z][2]+x[z],mxEdgeStyle.limits[z][8]=n[z][1]+n[z][3]+x[z];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;z=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);A=x-p;x=0;0>z?x=0>A?2:1:0>=A&&(x=3,0==z&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(z=0;2>z;z++)null!=p&&(b[z][0]=(p.x-n[z][0])/n[z][2],1>=Math.abs(p.x-n[z][0])?a[z]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[z][0]-n[z][2])&&(a[z]=
-mxConstants.DIRECTION_MASK_EAST),b[z][1]=(p.y-n[z][1])/n[z][3],1>=Math.abs(p.y-n[z][1])?a[z]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[z][1]-n[z][3])&&(a[z]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);z=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(z-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=
-Math.max(r-y,0);y=[];c=[];l=[];c[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=z>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=z>=p?z:p;r=[[0,0],[0,0]];s=!1;for(z=0;2>z;z++)0==a[z]&&(0==(c[z]&d[z])&&(c[z]=mxUtils.reversePortConstraints(c[z])),0==(l[z]&d[z])&&(l[z]=mxUtils.reversePortConstraints(l[z])),r[z][0]=l[z],r[z][1]=c[z]);0<p&&0<m&&(0<(c[0]&d[0])&&
-0<(l[1]&d[1])?(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<m&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(z=0;2>z;z++)if(0==a[z]&&(0==(r[z][0]&d[z])&&(r[z][0]=r[z][1]),y[z]=r[z][0]&d[z],y[z]|=(r[z][1]&d[z])<<8,y[z]|=(r[1-z][z]&d[z])<<16,y[z]|=(r[1-z][1-z]&d[z])<<24,0==(y[z]&15)&&(y[z]<<=8),0==(y[z]&3840)&&(y[z]=
-y[z]&15|y[z]>>8),0==(y[z]&983040)&&(y[z]=y[z]&65535|(y[z]&251658240)>>8),a[z]=y[z]&15,d[z]==mxConstants.DIRECTION_MASK_WEST||d[z]==mxConstants.DIRECTION_MASK_NORTH||d[z]==mxConstants.DIRECTION_MASK_EAST||d[z]==mxConstants.DIRECTION_MASK_SOUTH))a[z]=d[z];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;y-=x;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(z=0;z<d.length;z++)l=d[z]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),m=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[z]&mxEdgeStyle.TARGET_MASK),s=0<(d[z]&mxEdgeStyle.SOURCE_MASK),p=(d[z]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[z]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?n[s][0]+b[s][0]*n[s][2]:r?n[s][1]+b[s][1]*
-n[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:y=l;for(z=0;z<=f&&!(z==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);z++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[z][0]),Math.round(mxEdgeStyle.wayPoints1[z][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
+mxEdgeStyle.orthBuffer)/mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,u=null!=b?b.height:0,q=null!=c?c.x:m.x,s=null!=c?c.y:m.y,t=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*
+mxEdgeStyle.getJettySize(a,b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var z=x+f,y=!1;if(null!=l&&null!=m)var y=m.x-l.x,E=m.y-l.y,y=y*y+E*E<z*z;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(n,
+p,r,u),y),n=y.x,p=y.y,r=y.width,u=y.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,s,t,v),y),q=y.x,s=y.y,t=y.width,v=y.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;u=Math.round(10*u)/10;q=Math.round(10*q)/10;s=Math.round(10*s)/10;t=Math.round(10*t)/10;v=Math.round(10*v)/10;a=[0,0];n=[[n,p,r,u],[q,s,t,v]];x=[f,x];for(y=0;2>
+y;y++)mxEdgeStyle.limits[y][1]=n[y][0]-x[y],mxEdgeStyle.limits[y][2]=n[y][1]-x[y],mxEdgeStyle.limits[y][4]=n[y][0]+n[y][2]+x[y],mxEdgeStyle.limits[y][8]=n[y][1]+n[y][3]+x[y];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;y=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=x-p;x=0;0>y?x=0>E?2:1:0>=E&&(x=3,0==y&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(b[y][0]=(p.x-n[y][0])/n[y][2],1>=Math.abs(p.x-n[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[y][0]-n[y][2])&&(a[y]=
+mxConstants.DIRECTION_MASK_EAST),b[y][1]=(p.y-n[y][1])/n[y][3],1>=Math.abs(p.y-n[y][1])?a[y]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[y][1]-n[y][3])&&(a[y]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);y=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(y-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=
+Math.max(r-z,0);z=[];c=[];l=[];c[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=y>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=y>=p?y:p;r=[[0,0],[0,0]];u=!1;for(y=0;2>y;y++)0==a[y]&&(0==(c[y]&d[y])&&(c[y]=mxUtils.reversePortConstraints(c[y])),0==(l[y]&d[y])&&(l[y]=mxUtils.reversePortConstraints(l[y])),r[y][0]=l[y],r[y][1]=c[y]);0<p&&0<m&&(0<(c[0]&d[0])&&
+0<(l[1]&d[1])?(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],u=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],u=!0));0<p&&!u&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],u=!0);0<m&&!u&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(y=0;2>y;y++)if(0==a[y]&&(0==(r[y][0]&d[y])&&(r[y][0]=r[y][1]),z[y]=r[y][0]&d[y],z[y]|=(r[y][1]&d[y])<<8,z[y]|=(r[1-y][y]&d[y])<<16,z[y]|=(r[1-y][1-y]&d[y])<<24,0==(z[y]&15)&&(z[y]<<=8),0==(z[y]&3840)&&(z[y]=
+z[y]&15|z[y]>>8),0==(z[y]&983040)&&(z[y]=z[y]&65535|(z[y]&251658240)>>8),a[y]=z[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;z-=x;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),m=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),s=0<(d[y]&mxEdgeStyle.TARGET_MASK),u=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(u||s)&&9>p?(u=u?0:1,q=r&&0==l?n[u][0]+b[u][0]*n[u][2]:r?n[u][1]+b[u][1]*
+n[u][3]:mxEdgeStyle.limits[u][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:z=l;for(y=0;y<=f&&!(y==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);y++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[y][0]),Math.round(mxEdgeStyle.wayPoints1[y][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -1312,20 +1312,20 @@ this.cellsAdded(c,a,f,null,null,!1,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!1,!1);
mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b,!0);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),null!=c&&(b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c));return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.removeCellsAfterUngroup(a);this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsAfterUngroup=function(a){this.cellsRemoved(this.addAllEdges(a))};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=0,r=0;if(this.isSwimlane(a[k]))var s=this.getStartSize(a[k]),p=s.width,r=
-s.height;l=l.clone();c&&(l.x=Math.round(l.x+n.x-b-p-g),l.y=Math.round(l.y+n.y-b-r-d));l.width=Math.round(n.width+2*b+p+g+e);l.height=Math.round(n.height+2*b+r+d+f);this.model.setGeometry(a[k],l);this.moveCells(m,b+p-n.x+g,b+r-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=0,r=0;if(this.isSwimlane(a[k]))var u=this.getStartSize(a[k]),p=u.width,r=
+u.height;l=l.clone();c&&(l.x=Math.round(l.x+n.x-b-p-g),l.y=Math.round(l.y+n.y-b-r-d));l.width=Math.round(n.width+2*b+p+g+e);l.height=Math.round(n.height+2*b+r+d+f);this.model.setGeometry(a[k],l);this.moveCells(m,b+p-n.x+g,b+r-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
mxGraph.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=0;c<a.length;c++)if(this.model.isVertex(a[c])||this.model.isEdge(a[c])){var d=this.view.getBoundingBox(this.view.getState(a[c]),!0);null!=d&&(null==b?b=mxRectangle.fromRectangle(d):b.add(d))}return b};
mxGraph.prototype.cloneCells=function(a,b,c){b=null!=b?b:!0;var d=null;if(null!=a){for(var e=new mxDictionary,d=[],f=0;f<a.length;f++)e.put(a[f],!0),d.push(a[f]);if(0<d.length)for(var g=this.view.scale,k=this.view.translate,d=this.model.cloneCells(a,!0,c),f=0;f<a.length;f++)if(!b&&this.model.isEdge(d[f])&&null!=this.getEdgeValidationError(d[f],this.model.getTerminal(d[f],!0),this.model.getTerminal(d[f],!1)))d[f]=null;else{var l=this.model.getGeometry(d[f]);if(null!=l){var m=this.view.getState(a[f]),
n=this.view.getState(this.model.getParent(a[f]));if(null!=m&&null!=n)if(c=n.origin.x,n=n.origin.y,this.model.isEdge(d[f])){for(var m=m.absolutePoints,p=this.model.getTerminal(a[f],!0);null!=p&&!e.get(p);)p=this.model.getParent(p);null==p&&l.setTerminalPoint(new mxPoint(m[0].x/g-k.x,m[0].y/g-k.y),!0);for(p=this.model.getTerminal(a[f],!1);null!=p&&!e.get(p);)p=this.model.getParent(p);null==p&&(p=m.length-1,l.setTerminalPoint(new mxPoint(m[p].x/g-k.x,m[p].y/g-k.y),!1));l=l.points;if(null!=l)for(m=0;m<
l.length;m++)l[m].x+=c,l[m].y+=n}else l.translate(c,n)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};
mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var r=this.view.getState(p),s=null!=r?r.origin:n,q=this.model.getGeometry(a[l]);if(null!=q){var t=s.x-m.x,u=s.y-m.y,q=q.clone();q.translate(t,u);!q.relative&&this.model.isVertex(a[l])&&!this.isAllowNegativeCoordinates()&&
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var r=this.view.getState(p),u=null!=r?r.origin:n,q=this.model.getGeometry(a[l]);if(null!=q){var s=u.x-m.x,t=u.y-m.y,q=q.clone();q.translate(s,t);!q.relative&&this.model.isVertex(a[l])&&!this.isAllowNegativeCoordinates()&&
(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[l],q)}}b==p&&c+l>this.model.getChildCount(b)&&c--;this.model.add(b,a[l],c+l);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],d,!0);null!=e&&this.cellConnected(a[l],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",
d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,g){var n=this.model.getGeometry(d);if(null!=n){var p=this.view.getState(d);if(null!=p){for(var r=p.getVisibleTerminal(g),s=!1;null!=r;){if(a[e]==r){s=!0;break}r=this.model.getParent(r)}if(s){var r=c.x,s=c.y,q=this.view.getState(this.model.getParent(d));
-null!=q&&this.model.isVertex(q.cell)&&(r=q.x/b,s=q.y/b);n=n.clone();p=p.absolutePoints;q=g?0:p.length-1;n.setTerminalPoint(new mxPoint(p[q].x/b-r,p[q].y/b-s),g);this.model.setTerminal(f[k],null,g);this.model.setGeometry(f[k],n)}}}}),k=0;k<f.length;k++)d.get(f[k])||(g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,g){var n=this.model.getGeometry(d);if(null!=n){var p=this.view.getState(d);if(null!=p){for(var r=p.getVisibleTerminal(g),u=!1;null!=r;){if(a[e]==r){u=!0;break}r=this.model.getParent(r)}if(u){var r=c.x,u=c.y,q=this.view.getState(this.model.getParent(d));
+null!=q&&this.model.isVertex(q.cell)&&(r=q.x/b,u=q.y/b);n=n.clone();p=p.absolutePoints;q=g?0:p.length-1;n.setTerminalPoint(new mxPoint(p[q].x/b-r,p[q].y/b-u),g);this.model.setTerminal(f[k],null,g);this.model.setGeometry(f[k],n)}}}}),k=0;k<f.length;k++)d.get(f[k])||(g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCells([a])[0];var k=this.view.getState(a),l=this.getCellGeometry(c);if(null!=l&&null!=l.points&&null!=k){var m=this.view.translate,n=this.view.scale,p=mxUtils.findNearestSegment(k,(d+m.x)*n,(e+m.y)*n);l.points=l.points.slice(0,p);l=this.getCellGeometry(a);null!=l&&null!=l.points&&(l=l.clone(),l.points=l.points.slice(p),this.model.setGeometry(a,
l))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0);this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
@@ -1348,7 +1348,7 @@ mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if
(e.width=l,e.height=m);this.model.isVertex(a)?this.cellResized(a,e,!0,d):this.model.setGeometry(a,e)}};mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.getCellGeometry(b);if(null!=b&&null!=c&&!this.isCellCollapsed(b)&&(a=this.getCellGeometry(a),null!=a&&!a.relative&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};
mxGraph.prototype.importCells=function(a,b,c,d,e,f){return this.moveCells(a,b,c,!0,d,e,f)};
mxGraph.prototype.moveCells=function(a,b,c,d,e,f,g){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){a=this.model.getTopmostCells(a);this.model.beginUpdate();try{for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(var m=mxUtils.bind(this,function(a){for(;null!=a;){if(k.get(a))return!0;a=this.model.getParent(a)}return!1}),n=[],l=0;l<a.length;l++){var p=this.getCellGeometry(a[l]),r=this.model.getParent(a[l]);(null==p||!p.relative||!this.model.isEdge(r)||
-!m(this.model.getTerminal(r,!0))&&!m(this.model.getTerminal(r,!1)))&&n.push(a[l])}a=n;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var s=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(s);if(null!=e){var q=this.model.getChildCount(e);this.cellsAdded(a,e,q,null,
+!m(this.model.getTerminal(r,!0))&&!m(this.model.getTerminal(r,!1)))&&n.push(a[l])}a=n;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var u=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(u);if(null!=e){var q=this.model.getChildCount(e);this.cellsAdded(a,e,q,null,
null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);if(null!=d){b=parseFloat(b);c=parseFloat(c);d=d.clone();d.translate(b,c);!d.relative&&this.model.isVertex(a)&&!this.isAllowNegativeCoordinates()&&(d.x=Math.max(0,parseFloat(d.x)),d.y=Math.max(0,parseFloat(d.y)));if(d.relative&&!this.model.isEdge(a)){var e=this.model.getParent(a),f=0;this.model.isVertex(e)&&(f=this.view.getState(e),e=null!=f?f.style:this.getCellStyle(e),f=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0));
@@ -1372,7 +1372,7 @@ d,k,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f
mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
c,"previous",e))}finally{this.model.endUpdate()}}};
mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var f=this.model.getGeometry(a[e]);if(null!=f){var g=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=g&&null!=k){var f=f.clone(),l=-k.origin.x,m=-k.origin.y,n=g.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=p&&this.isCellDisconnectable(a[e],
-p,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(;null!=r&&!d.get(r);)r=this.model.getParent(r);if(null==r){var s=n.length-1;f.setTerminalPoint(new mxPoint(n[s].x/b-c.x+l,n[s].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};
+p,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(;null!=r&&!d.get(r);)r=this.model.getParent(r);if(null==r){var u=n.length-1;f.setTerminalPoint(new mxPoint(n[u].x/b-c.x+l,n[u].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};
mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};
mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};
mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
@@ -1447,9 +1447,9 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=g.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)){var s=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(r=mxUtils.getBoundingBox(r,s));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k?f.push(p):this.getCells(a,
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=g.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)){var u=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(r=mxUtils.getBoundingBox(r,u));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k?f.push(p):this.getCells(a,
b,c,d,p,f)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
-mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,r=0,s=0;s<n.length;s++)this.view.getVisibleTerminal(n[s],!0)==m?p++:r++;(c&&0==p&&0<r||!c&&0==r&&0<p)&&d.push(m);n=c?r-p:p-r;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,r=0,u=0;u<n.length;u++)this.view.getVisibleTerminal(n[u],!0)==m?p++:r++;(c&&0==p&&0<r||!c&&0==r&&0<p)&&d.push(m);n=c?r-p:p-r;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d)))if(d=this.model.getEdgeCount(a),0<d)for(var f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),k=this.model.getTerminal(g,!0)==a;if(!b||k)k=this.model.getTerminal(g,!k),this.traverse(k,b,c,g,e)}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
@@ -1640,8 +1640,8 @@ mxConnectionHandler.prototype.drawPreview=function(){this.updatePreview(null==th
mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget(c)||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=!1,g=null;e.beginUpdate();try{if(null!=a&&null==b&&(!this.graph.isIgnoreTerminalEvent(c)&&this.isCreateTarget(c))&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);f=!0;if(null==d||!this.graph.getModel().isEdge(d)){var k=this.graph.getView().getState(d);if(null!=k){var l=e.getGeometry(b);l.x-=k.origin.x;l.y-=k.origin.y}}else d=
this.graph.getDefaultParent();this.graph.addCell(b,d)}var m=this.graph.getDefaultParent();null!=a&&null!=b&&(e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(m=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(m=e.getParent(m)));var n=k=null;null!=this.edgeState&&(k=this.edgeState.cell.value,n=this.edgeState.cell.style);g=this.insertEdge(m,null,k,a,b,n);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);
this.graph.setConnectionConstraint(g,b,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);e.getParent(a);if(this.isInsertBefore(g,a,b,c,d)){m=null;for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&(m=l.parent.getIndex(l),l.parent.insert(g,m))}var p=e.getGeometry(g);null==p&&(p=new mxGeometry,p.relative=!0,e.setGeometry(g,p));if(null!=
-this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,s=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-s.x,q.y/r-s.y))}}if(null==b){var t=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-t.x,this.originalPoint.y/r-t.y):new mxPoint(this.currentPoint.x/r-t.x,this.currentPoint.y/r-t.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
-this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(u){mxLog.show(),mxLog.debug(u.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
+this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,u=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-u.x,q.y/r-u.y))}}if(null==b){var s=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-s.x,this.originalPoint.y/r-s.y):new mxPoint(this.currentPoint.x/r-s.x,this.currentPoint.y/r-s.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
+this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(t){mxLog.show(),mxLog.debug(t.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return this.graph.addEdge(b,a,d,e)};
mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.view.translate,f=this.graph.view.scale,g=new mxPoint(this.currentPoint.x/f-e.x,this.currentPoint.y/f-e.y);c.x=Math.round(g.x-c.width/2-this.graph.panDx/f);c.y=Math.round(g.y-c.height/2-this.graph.panDy/f);
g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null!=k){var l=k.x/f-e.x,e=k.y/f-e.y;Math.abs(l-c.x)<=g&&(c.x=Math.round(l));Math.abs(e-c.y)<=g&&(c.y=Math.round(e))}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
@@ -1731,8 +1731,8 @@ mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&
this.customHandles.length;a++)this.customHandles[a].reset();null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());this.removeHint();this.redrawHandles();this.unscaledBounds=this.edgeHandlers=null};
mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f,g){e=this.graph.model.getGeometry(a);null!=e&&(d==mxEvent.LABEL_HANDLE?(c=this.graph.view.scale,b=Math.round((this.labelShape.bounds.getCenterX()-this.startX)/c),c=Math.round((this.labelShape.bounds.getCenterY()-this.startY)/c),e=e.clone(),null==e.offset?e.offset=new mxPoint(b,c):(e.offset.x+=b,e.offset.y+=c),this.graph.model.setGeometry(a,e)):null!=this.unscaledBounds&&(c=this.graph.view.scale,(0!=this.childOffsetX||0!=this.childOffsetY)&&
this.moveChildren(a,Math.round(this.childOffsetX/c),Math.round(this.childOffsetY/c)),this.graph.resizeCell(a,this.unscaledBounds,g)))};mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f),k=this.graph.getCellGeometry(g);null!=k&&(k=k.clone(),k.translate(b,c),d.setGeometry(g,k))}};
-mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,r=p+m;a=a.y-g.y*f;var s=a+n,q=p+m/2,t=a+n/2;4<d?(s+=c,e&&(s=this.graph.snap(s/f)*f)):3>d&&(a+=c,e&&(a=this.graph.snap(a/f)*f));if(0==d||3==d||5==d)p+=b,e&&(p=this.graph.snap(p/f)*f);else if(2==d||4==d||7==d)r+=b,e&&(r=this.graph.snap(r/
-f)*f);e=r-p;c=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=r-e,a=s-c)));l&&(e+=e-m,c+=c-n,p+=q-(p+e/2),a+=t-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,r=p+m;a=a.y-g.y*f;var u=a+n,q=p+m/2,s=a+n/2;4<d?(u+=c,e&&(u=this.graph.snap(u/f)*f)):3>d&&(a+=c,e&&(a=this.graph.snap(a/f)*f));if(0==d||3==d||5==d)p+=b,e&&(p=this.graph.snap(p/f)*f);else if(2==d||4==d||7==d)r+=b,e&&(r=this.graph.snap(r/
+f)*f);e=r-p;c=u-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=r-e,a=u-c)));l&&(e+=e-m,c+=c-n,p+=q-(p+e/2),a+=s-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));
return d};mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]&&(this.bounds.width<2*this.sizers[0].bounds.width+2*b||this.bounds.height<2*this.sizers[0].bounds.height+2*b))b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b;return a};
mxVertexHandler.prototype.redrawHandles=function(){var a=this.tolerance;this.verticalOffset=this.horizontalOffset=0;var b=this.bounds;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]){if(null==this.index&&this.manageSizers&&8<=this.sizers.length){var c=this.getHandlePadding();this.horizontalOffset=c.x;this.verticalOffset=c.y;if(0!=this.horizontalOffset||0!=this.verticalOffset)b=new mxRectangle(b.x,b.y,b.width,b.height),b.x-=this.horizontalOffset/2,b.width+=this.horizontalOffset,b.y-=
@@ -1868,7 +1868,7 @@ mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener
function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
-mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var k=!1;null!=f;){if("add"==f.nodeName){var l=f.getAttribute("if");if(null==l||e[l]){var l=f.getAttribute("as"),l=mxResources.get(l)||l,m=mxUtils.eval(mxUtils.getTextContent(f)),n=f.getAttribute("action"),p=f.getAttribute("icon"),r=f.getAttribute("iconCls"),s=f.getAttribute("enabled-if"),s=null==s||e[s];k&&(b.addSeparator(g),k=!1);null!=p&&this.imageBasePath&&(p=this.imageBasePath+p);l=this.addAction(b,a,l,p,m,n,c,g,r,s);this.addItems(a,
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var k=!1;null!=f;){if("add"==f.nodeName){var l=f.getAttribute("if");if(null==l||e[l]){var l=f.getAttribute("as"),l=mxResources.get(l)||l,m=mxUtils.eval(mxUtils.getTextContent(f)),n=f.getAttribute("action"),p=f.getAttribute("icon"),r=f.getAttribute("iconCls"),u=f.getAttribute("enabled-if"),u=null==u||e[u];k&&(b.addSeparator(g),k=!1);null!=p&&this.imageBasePath&&(p=this.imageBasePath+p);l=this.addAction(b,a,l,p,m,n,c,g,r,u);this.addItems(a,
b,c,d,e,f.firstChild,l)}}else"separator"==f.nodeName&&(k=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,k,l,m){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},k,l,m)};
mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),k=e[d].getAttribute("name");null!=k&&"function"==typeof g&&(f[k]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
@@ -1974,10 +1974,10 @@ function(a,c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"
g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f),m=null;null!=l&&0<l.length&&mxStylesheetCodec.allowEval?m=mxUtils.eval(l):(m=f.getAttribute("value"),mxUtils.isNumeric(m)&&(m=parseFloat(m)));null!=m&&(g[k]=m)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||
-f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),r=mxUtils.getTextContent(c),s=null;if(null!=l)s=d.addItem(f,g,l,k);else if(null!=m)var q=mxDefaultToolbarCodec.allowEval?mxUtils.eval(r):null,s=d.addMode(f,g,m,k,q);else if(null!=n||null!=r&&0<r.length)s=e.templates[n],n=c.getAttribute("style"),null!=s&&null!=n&&(s=e.graph.cloneCells([s])[0],s.setStyle(n)),n=null,null!=r&&0<r.length&&
-mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(r)),s=d.addPrototype(f,g,s,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g){n=d.addActionCombo(f);for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p))}else{var t=null,u=d.addPrototype(f,g,function(){var a=e.templates[t.value];if(null!=a){var a=a.clone(),b=t.options[t.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+
-a+" not found");return null},null,null,p),t=d.addCombo();mxEvent.addListener(t,"change",function(){d.toolbar.selectMode(u,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(t,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(t,g,r||n).cellStyle=p.getAttribute("style"))}null!=s&&(n=c.getAttribute("id"),
-null!=n&&0<n.length&&s.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),r=mxUtils.getTextContent(c),u=null;if(null!=l)u=d.addItem(f,g,l,k);else if(null!=m)var q=mxDefaultToolbarCodec.allowEval?mxUtils.eval(r):null,u=d.addMode(f,g,m,k,q);else if(null!=n||null!=r&&0<r.length)u=e.templates[n],n=c.getAttribute("style"),null!=u&&null!=n&&(u=e.graph.cloneCells([u])[0],u.setStyle(n)),n=null,null!=r&&0<r.length&&
+mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(r)),u=d.addPrototype(f,g,u,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g){n=d.addActionCombo(f);for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+
+a+" not found");return null},null,null,p),s=d.addCombo();mxEvent.addListener(s,"change",function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(s,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(s,g,r||n).cellStyle=p.getAttribute("style"))}null!=u&&(n=c.getAttribute("id"),
+null!=n&&0<n.length&&u.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),k=parseInt(a.getAttribute("y")),l=a.getAttribute("width"),m=a.getAttribute("height"),
g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,k,l,m,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
@@ -2023,12 +2023,12 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'\x3csvg width\x3d"'+c+'" height\x3d"'+
c+'" xmlns\x3d"'+mxConstants.NS_SVG+'"\x3e\x3cdefs\x3e\x3cpattern id\x3d"grid" width\x3d"'+c+'" height\x3d"'+c+'" patternUnits\x3d"userSpaceOnUse"\x3e\x3cpath d\x3d"'+d.join(" ")+'" fill\x3d"none" stroke\x3d"'+a+'" opacity\x3d"0.2" stroke-width\x3d"1"/\x3e\x3cpath d\x3d"M '+c+" 0 L 0 0 0 "+c+'" fill\x3d"none" stroke\x3d"'+a+'" stroke-width\x3d"1"/\x3e\x3c/pattern\x3e\x3c/defs\x3e\x3crect width\x3d"100%" height\x3d"100%" fill\x3d"url(#grid)"/\x3e\x3c/svg\x3e'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=
function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,
-q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,x=q.x+b,y=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
-[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
+q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var s=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),t=(a=a&&Math.min(s.width,s.height)>this.minPageBreakDist)?Math.ceil(c/s.height)-1:0,v=a?Math.ceil(b/s.width)-1:0,x=q.x+b,z=q.y+c;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?t:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
+[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*s.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*s.height))]:[new mxPoint(Math.round(q.x+(c+1)*s.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*s.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments);a.intersects=
mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=a.width/this.scale,e=a.height/this.scale,f=this.graph.pageFormat,g=this.graph.pageScale,
a=f.width*g,f=f.height*g,g=Math.floor(Math.min(0,b)/a),q=Math.floor(Math.min(0,c)/f),b=Math.ceil(Math.max(1,b+d)/a),c=Math.ceil(Math.max(1,c+e)/f);return new mxRectangle(this.scale*(this.translate.x+g*a),this.scale*(this.translate.y+q*f),this.scale*(b-g)*a,this.scale*(c-q)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);if(this.dialect!=mxConstants.DIALECT_SVG&&null!=this.view.backgroundPageShape&&(!this.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.container)))this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px"};var e=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,f,g){var s=e.apply(this,arguments);null!=g&&!g&&mxEvent.addListener(s,"mousedown",function(a){mxEvent.consume(a)});return s};var f=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=f.apply(this,arguments),e=b.getParent(d);
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px"};var e=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,f,g){var u=e.apply(this,arguments);null!=g&&!g&&mxEvent.addListener(u,"mousedown",function(a){mxEvent.consume(a)});return u};var f=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=f.apply(this,arguments),e=b.getParent(d);
if(null==c||c!=d&&c!=e)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(e)&&b.isVertex(e)&&!this.graph.isContainer(e);)d=e,e=this.graph.getModel().getParent(d);return d};var g=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=g.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(!(null!=c&&a.isSource(c.control)))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();EditorUi=function(a,b,c){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=c;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs\x3d":(new Image).src=mxPopupMenu.prototype.submenuImage;!mxClient.IS_SVG&&null!=mxConnectionHandler.prototype.connectImage&&((new Image).src=mxConnectionHandler.prototype.connectImage.src);
@@ -2038,16 +2038,16 @@ b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this
this.diagramContainer.removeAttribute("title")}));var e=!1,f=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||f.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,
function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=
function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=!1,m=null,n=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;
-if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
-if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;
-d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var u=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
+if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),u=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
+if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=u.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));u.toolbar.setFontName(c);u.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var s=d.cellEditor.stopEditing;
+d.cellEditor.stopEditing=function(a,b){s.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var t=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("\x3d");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)v.push(A[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var E=function(a,b){d.getModel().beginUpdate();
-try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=v.slice(),f=0;f<m.length;f++){var p=m[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(n,q);0<=s&&n.splice(s,1);for(var t=0;t<A.length;t++){var u=A[t];if(0<=mxUtils.indexOf(u,q))for(var y=
-0;y<u.length;y++){var z=mxUtils.indexOf(n,u[y]);0<=z&&n.splice(z,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],E=e[q];if(null!=E&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,E,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
-b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&!(e=d.getModel().isVertex(c[k])||e,(f=d.getModel().isEdge(c[k])||f)&&e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(y,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
-mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(z,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(v,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(v,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(z,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+"keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)v.push(E[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var A=function(a,b){d.getModel().beginUpdate();
+try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=v.slice(),f=0;f<m.length;f++){var p=m[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),u=mxUtils.indexOf(n,q);0<=u&&n.splice(u,1);for(var s=0;s<E.length;s++){var t=E[s];if(0<=mxUtils.indexOf(t,q))for(var A=
+0;A<t.length;A++){var y=mxUtils.indexOf(n,t[A]);0<=y&&n.splice(y,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],z=e[q];if(null!=z&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,z,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){A(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
+b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&!(e=d.getModel().isVertex(c[k])||e,(f=d.getModel().isEdge(c[k])||f)&&e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(z,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
+mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(y,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(v,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(v,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(y,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2076,18 +2076,18 @@ function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor
"Next Page"),l=mxUtils.bind(this,function(){null!=this.pages&&(1<this.pages.length&&null!=this.currentPage)&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display=
"none",f.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (Alt+Mousewheel)");d(mxUtils.bind(this,
function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit")||"Fit");var n=null,p=null,r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";
-p=null}),600)}),a||200)}),s=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+p=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){q.style.display=1<t.getChildCount(t.root)?
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),s=a.getModel();s.addListener(mxEvent.CHANGE,function(){q.style.display=1<s.getChildCount(s.root)?
"":"none"})}null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,(mxResources.get("close")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||s(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
-"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||s(30)}));var u=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&(Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u)&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=
-this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var y=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;
-if(null==k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):y.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
-this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=z&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-z.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-z.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
+"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
+"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var t=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<t&&Math.abs(this.scrollTop-a.container.scrollTop)<t&&(Math.abs(this.startX-c.getGraphX())<t&&Math.abs(this.startY-c.getGraphY())<t)&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():u(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=
+this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;
+if(null==k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):z.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
+1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
+this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=y&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-y.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-y.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
break}d=d.parentNode}}))};EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
EditorUi.prototype.lightboxFit=function(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(60);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2171,15 +2171,15 @@ b){l=f=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRend
!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*
d,d=this.graph.view.translate,f=this.graph.view.scale,k=this.graph.getPageLayout(),g=0;g<k.width;g++)b.push(new mxRectangle(((k.x+g)*e+d.x)*f,(k.y*c+d.y)*f,e*f,c*f));for(g=0;g<k.height;g++)b.push(new mxRectangle((k.x*e+d.x)*f,((k.y+g)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor=
"#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):
-c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
-function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,
+c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),u=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
+function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),u=0):u=(new Date).getTime()-r};var s=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&s.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,
arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
-function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return y.apply(this,arguments)};var z=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return z.apply(this,arguments);if(null!=
-this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var s=
-mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(r=mxUtils.getBoundingBox(r,s));(k.isEdge(p)||k.isVertex(p))&&(r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=g)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
-"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
-null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
+function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return z.apply(this,arguments)};var y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.apply(this,arguments);if(null!=
+this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var u=
+mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(r=mxUtils.getBoundingBox(r,u));(k.isEdge(p)||k.isVertex(p))&&(r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=g)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
+"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();A=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
+null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy=urlParams.target||"auto";Graph.prototype.linkTarget="_blank";
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=window!=window.top?document.referrer:document.location.toString();
@@ -2196,8 +2196,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,c){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,g=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1==arguments.length&&("[object String]"==Object.prototype.toString.call(a)&&
-!/\d/.test(a))&&(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),s=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),u={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
-12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:s,MM:g(s),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+!/\d/.test(a))&&(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),u=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),s=c?0:a.getTimezoneOffset(),t={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
+12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:u,MM:g(u),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<s?"-":"+")+g(100*Math.floor(Math.abs(s)/60)+Math.abs(s)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in t?t[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),c=b.getChildCount(b.root),d=0;d<c;d++)(function(c){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");b.isVisible(c)&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d.appendChild(g);var k=c.value||
mxResources.get("background")||"Background";d.setAttribute("title",k);mxUtils.write(d,k);a.appendChild(d);mxEvent.addListener(g,"click",function(){null!=g.getAttribute("checked")?g.removeAttribute("checked"):g.setAttribute("checked","checked");b.setVisible(c,g.checked)})})(b.getChildAt(b.root,d));return a};
@@ -2206,9 +2206,9 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(c.cell)&&(l=c.x,k=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(l+f.x*g,k+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),l=this.view.getState(c),null!=g&&(null!=l&&mxUtils.intersects(g,l))&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{l=c;if(null==l&&e){for(var k=a,m=this.getCellGeometry(a);null!=
-m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);null!=m&&(m.x=f.x-m.width/2,m.y=f.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=m&&m.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==s.parent)&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==c&&(null!=l&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
-q));null!=s&&g.push(s);null==c&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(f,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
+m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);null!=m&&(m.x=f.x-m.width/2,m.y=f.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var u=mxEvent.isControlDown(d)&&e||null==c&&null!=m&&m.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=u&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=u.parent;)d=this.model.getParent(d);null!=d&&(null!=d.parent&&d.parent==u.parent)&&(q=d.parent.getIndex(d),d.parent.insert(u,q))}null==c&&(null!=l&&null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
+q));null!=u&&g.push(u);null==c&&null!=l&&g.push(l);null==l&&null!=u&&u.geometry.setTerminalPoint(f,!1);null!=u&&this.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{this.model.endUpdate()}return g};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],c="",d;for(d in this.model.cells)if(c=this.model.cells[d],this.model.isVertex(c)||this.model.isEdge(c))this.isHtmlLabel(c)?(a.innerHTML=this.getLabel(c),c=mxUtils.extractTextWithWhitespace([a])):c=this.getLabel(c),c=mxUtils.trim(c.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<c.length&&b.push(c);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2265,7 +2265,7 @@ HoverIcons.prototype.update=function(a,b,c){if(this.graph.connectionArrowsEnable
this.startTime);this.setDisplay("");if(null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,c))this.reset(!1);else if(null!=this.currentState||d>this.activationDelay)if(this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==c||!mxUtils.contains(this.bbox,b,c)))null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=
a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset()}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(b,c,f,g){if(null!=c&&null!=b&&("1"==c.style.snapToPoint||"1"==b.style.snapToPoint)){c=this.getTerminalPort(b,c,g);var k=this.getNextPoint(b,f,g),l=this.graph.isOrthogonal(b),m=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=m)var p=Math.cos(-m),r=Math.sin(-m),k=mxUtils.getRotatedPoint(k,p,r,n);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(b.style[g?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&l,p);0!=m&&(p=Math.cos(m),r=Math.sin(m),k=mxUtils.getRotatedPoint(k,p,r,n));if(null!=c){m=this.graph.getAllConnectionConstraints(c);l=n=null;for(p=0;p<m.length;p++)if(r=this.graph.getConnectionPoint(c,m[p]),null!=r){var s=(r.x-k.x)*(r.x-k.x)+(r.y-k.y)*(r.y-k.y);if(null==l||s<l)n=r,l=s}null!=n&&(k=n)}b.setAbsoluteTerminalPoint(k,g)}else a.apply(this,
+0);p+=parseFloat(b.style[g?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&l,p);0!=m&&(p=Math.cos(m),r=Math.sin(m),k=mxUtils.getRotatedPoint(k,p,r,n));if(null!=c){m=this.graph.getAllConnectionConstraints(c);l=n=null;for(p=0;p<m.length;p++)if(r=this.graph.getConnectionPoint(c,m[p]),null!=r){var u=(r.x-k.x)*(r.x-k.x)+(r.y-k.y)*(r.y-k.y);if(null==l||u<l)n=r,l=u}null!=n&&(k=n)}b.setAbsoluteTerminalPoint(k,g)}else a.apply(this,
arguments)};var b=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,f){var g=b.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=f.state&&(g=f.state.view.graph.replacePlaceholders(f.state.cell,g));return g};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,
8))try{var f=b.substring(8,b.length-1),g=mxUtils.parseXml(a.view.graph.decompress(f));return new mxShape(new mxStencil(g.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var c=mxStencilRegistry.getBasenameForStencil(a);if(null!=c){b=mxStencilRegistry.libraries[c];if(null!=b){if(null==mxStencilRegistry.packages[c]){mxStencilRegistry.packages[c]=1;for(c=0;c<b.length;c++){var d=b[c];if(".xml"==d.toLowerCase().substring(d.length-4,d.length))mxStencilRegistry.loadStencilSet(d,null);else if(".js"==d.toLowerCase().substring(d.length-
@@ -2285,8 +2285,8 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(k){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null!=e&&!e.relative&&c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();
-var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(k);if(null!=n){var s=null!=p?this.getConnectionConstraint(n,p,!0):null,q=null!=r?this.getConnectionConstraint(n,r,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,k,!1,s)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/
-2;g.y+=g.height/2-g.width/2;var t=g.width;g.width=g.height;g.height=t;b.setGeometry(e,g);var u=this.view.getState(e);if(null!=u){var v=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
+var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(k);if(null!=n){var u=null!=p?this.getConnectionConstraint(n,p,!0):null,q=null!=r?this.getConnectionConstraint(n,r,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,k,!1,u)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/
+2;g.y+=g.height/2-g.width/2;var s=g.width;g.width=g.height;g.height=s;b.setGeometry(e,g);var t=this.view.getState(e);if(null!=t){var v=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){var d=null;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),
@@ -2309,9 +2309,9 @@ k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=0;c<b.length;c++){var d=this.view.getState(a[c]);if(null!=d){var e=this.getCellGeometry(b[c]);null!=e&&e.relative&&(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);
return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;k=null!=k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=
null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*
-c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.imageOffset=e?-0.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,r,s){var q=this.state;if(null!=this.foAltText&&
-(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");mxUtils.write(t,f);return t}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var r=k.drawCellState;k.drawCellState=function(a,
+c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.imageOffset=e?-0.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,r,u){var q=this.state;if(null!=this.foAltText&&
+(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var s=this.createElement("text");s.setAttribute("x",Math.round(d/2));s.setAttribute("y",Math.round((e+q.fontSize)/2));s.setAttribute("fill",q.fontColor||"black");s.setAttribute("text-anchor","middle");s.setAttribute("font-size",Math.round(q.fontSize)+"px");s.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&s.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+s.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&s.setAttribute("text-decoration","underline");mxUtils.write(s,f);return s}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var r=k.drawCellState;k.drawCellState=function(a,
b){(f||a.view.graph.isCellSelected(a.cell))&&r.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=
function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],
d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};
@@ -2355,37 +2355,37 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=
!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=
18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};
-var s=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){s.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&(this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount())&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};
+var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){u.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&(this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount())&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};
mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,k=null;null!=this.first&&(null!=this.currentX&&null!=this.currentY)&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,k=(this.currentY-e)/this.graph.view.scale,
mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),k=this.graph.snap(k)));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),g=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{g=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0);for(c=0;c<g.length;c++)if(this.graph.isCellMovable(g[c])){var l=
this.graph.view.getState(g[c]),m=this.graph.getCellGeometry(g[c]);null!=l&&null!=m&&(m=m.clone(),m.translate(f,k),this.graph.model.setGeometry(g[c],m))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;
var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,k=this.graph.tolerance;if(null!=this.div||Math.abs(e)>k||Math.abs(f)>k)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=
-c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
+this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var s=(new Date).getTime(),t=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(s=(new Date).getTime(),t=0):t=(new Date).getTime()-s;this.currentTerminalState=
+c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;
-this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var z=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&(null!=d&&d.relative)&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return z.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):A.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&E.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){C.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node)&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
+this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&(null!=d&&d.relative)&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return y.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var A=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&A.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node)&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?
"":"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
"",this.updateLinkHint(b),this.graph.container.appendChild(this.linkHint));var c=b;60<c.length&&(c=c.substring(0,36)+"..."+c.substring(c.length-20));var d=document.createElement("a");d.setAttribute("href",this.graph.getAbsoluteUrl(b));d.setAttribute("title",b);null!=this.graph.linkTarget&&d.setAttribute("target",this.graph.linkTarget);mxUtils.write(d,c);this.linkHint.innerHTML="";this.linkHint.appendChild(d);this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&(b=document.createElement("img"),
-b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=
-mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
-this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var H=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
-function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
+b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=
+mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
+this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var G=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
+function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var X=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(X.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+
a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
-this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(a,b){this.canvas=
+this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function A(){mxShape.call(this)}function E(){mxShape.call(this)}function C(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function X(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function s(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function E(){mxShape.call(this)}function A(){mxShape.call(this)}function D(){mxEllipse.call(this)}function C(){mxShape.call(this)}
+function F(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function G(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function X(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
function Y(){mxActor.call(this)}function L(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}
function ka(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),ma=(0.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/sa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,0.25*b);a.lineTo(0.5*b,b*ma);a.lineTo(b,0.25*b);a.lineTo(0.5*b,(0.5-ma)*b);a.lineTo(0,
@@ -2400,31 +2400,31 @@ b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=k;
mxActor);m.prototype.size=0.3;m.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=m;mxUtils.extend(n,mxActor);n.prototype.size=0.2;n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=n;mxUtils.extend(p,mxActor);p.prototype.size=0.2;p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=p;mxUtils.extend(r,mxActor);r.prototype.size=0.5;r.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,
-0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(s,mxActor);s.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=s;q.prototype.moveTo=
+0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;q.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,e,f,k){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=k};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),e=Math.sqrt(c*c+d*d);if(2>e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),k=this.defaultVariation;5>f&&(f=5,k/=3);for(var g=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},
l=g(a-this.lastX)*c/f,g=g(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var m=l*e+this.lastX,n=g*e+this.lastY,p=(Math.random()-0.5)*k;this.originalLineTo.call(this.canvas,m-p*d,n-p*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&("0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle)&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Aa=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Aa.apply(this,arguments)};var Ba=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ba.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
mxConstants.NONE){if(!f&&(null==this.fill||this.fill==mxConstants.NONE))a.pointerEvents=!1;a.begin();this.isRounded?(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
-c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=0.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=
-a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxActor);u.prototype.size=0.2;u.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=u;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(s,mxRectangleShape);s.prototype.size=0.1;s.prototype.isHtmlAllowed=function(){return!1};s.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=
+a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};s.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=s;mxUtils.extend(t,mxActor);t.prototype.size=0.2;t.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=t;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,0.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,0.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.plus=x;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){wa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
-1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};y.prototype.paintForeground=function(a,b,c,
+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};z.prototype.paintForeground=function(a,b,c,
d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,k=null;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+
-f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,s=c,r=g==mxConstants.ALIGN_CENTER?r+(d-m)/2:g==mxConstants.ALIGN_RIGHT?r+(d-m-p):r+p,s=l==mxConstants.ALIGN_MIDDLE?s+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?s+(e-n-p):s+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,r,s,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
-e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=A;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
-a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=E;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=C;mxUtils.extend(D,mxShape);D.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
-0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
-4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
-k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=G&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
-b,c)};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};
-mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,
+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,q=c,r=g==mxConstants.ALIGN_CENTER?r+(d-m)/2:g==mxConstants.ALIGN_RIGHT?r+(d-m-p):r+p,q=l==mxConstants.ALIGN_MIDDLE?q+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?q+(e-n-p):q+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,r,q,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(y,mxCylinder);y.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=y;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
+e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(A,mxShape);A.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};A.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
+a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=A;mxUtils.extend(D,mxEllipse);D.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=D;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
+0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
+4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(H,mxRectangleShape);H.prototype.size=40;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};H.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
+k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=H&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};H.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=H;mxUtils.extend(G,mxShape);G.prototype.width=60;G.prototype.height=30;G.prototype.corner=10;G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
+b,c)};G.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};
+mxCellRenderer.prototype.defaultShapes.umlFrame=G;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=H.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));
c.y<a.getCenterY()&&(d+=1,d*=-1);return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
N;mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
@@ -2452,14 +2452,14 @@ mxCellRenderer.prototype.defaultShapes.partialRectangle=$;mxUtils.extend(ha,mxEl
e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ka;mxUtils.extend(da,mxActor);da.prototype.size=0.2;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var k=(d-f)/2,f=k+f;a.moveTo(0,b);a.lineTo(k,b);a.lineTo(k,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);
a.lineTo(f,e);a.lineTo(k,e);a.lineTo(k,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=da;mxUtils.extend(na,mxActor);na.prototype.size=0.25;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=na;mxMarker.addMarker("dash",
function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.moveTo(d.x-n/2+p/2,d.y-p/2-n/2);a.lineTo(d.x-p/2-3*n/2,d.y-3*p/2+n/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
-function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=va.apply(this,arguments),r=e*(k+2*l),s=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*r+e*l,n.y-2*s+f*l);a.moveTo(n.x-r-s+f*l,n.y-s+r-e*l);a.lineTo(n.x+s-r-f*l,n.y-s-r+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=1.118*e*l;c=1.118*f*l;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-
+function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=va.apply(this,arguments),r=e*(k+2*l),q=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*r+e*l,n.y-2*q+f*l);a.moveTo(n.x-r-q+f*l,n.y-q+r-e*l);a.lineTo(n.x+q-r-f*l,n.y-q-r+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=1.118*e*l;c=1.118*f*l;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-
e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},la=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,e=null!=b?b:c.height/8;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+e)},function(a,b,c){a=Math.min(50,Math.max(0,
100*(a.width-b.x+a.x)/Math.min(a.width,a.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(a)})},ja=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},ia=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+0.75*c*b.width,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
Math.min(a,(c.x-b.x)/(0.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},pa=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},ta=function(a,b,c){return function(d){var e=
[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",L.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",L.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-
-1],p=n.x-m.x,r=n.y-m.y,s=Math.sqrt(p*p+r*r);return fa(a,b,function(a){a=d.call(this,s,p/s,r/s,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+r*r);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,r/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
+1],p=n.x-m.x,r=n.y-m.y,q=Math.sqrt(p*p+r*r);return fa(a,b,function(a){a=d.call(this,q,p/q,r/q,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+r*r);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,r/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},ua={link:function(a){return[ya(a,!0,10),ya(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(oa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+
c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(oa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*
@@ -2471,8 +2471,8 @@ c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxU
a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[fa(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(la(a,c/2))}return b},label:ja(),ext:ja(),rectangle:ja(),triangle:ja(),rhombus:ja(),hexagon:ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",G.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){var b=[fa(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,
-b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=
+"size",H.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){var b=[fa(a,["width","height"],function(a){var b=Math.max(G.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",G.prototype.width))),c=Math.max(1.5*G.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",G.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,
+b){this.state.style.width=Math.round(Math.max(G.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*G.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",s.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=
Math.max(0,Math.min(0.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},cross:function(a){return[fa(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",da.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(2*(Math.max(0,a.getCenterY()-b.y)/c),2*(Math.max(0,
a.getCenterX()-b.x)/c))))})]},note:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"size",T.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,
@@ -2482,21 +2482,21 @@ mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},corner:function(a){return
"tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==
mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[fa(a,["size"],
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,2*((b.y-a.y)/a.height)))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(u.prototype.size,!0),hexagon:pa(v.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(t.prototype.size,!0),hexagon:pa(v.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
ua[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=ua[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var qa=new mxPoint(1,0),ra=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ja=Math.cos(ia),ia=Math.sin(ia),qa=mxUtils.getRotatedPoint(qa,ja,ia),ia=mxUtils.toRadians(-150),ja=Math.cos(ia),ia=Math.sin(ia),
-ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,p=ra.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){var s=g;a=function(a,b,c){a-=s.x;var d=
-b-s.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);r?(c&&(s=new mxPoint(s.x+l*b,s.y+m*b),e.push(s)),s=new mxPoint(s.x+n*a,s.y+p*a)):(c&&(s=new mxPoint(s.x+n*a,s.y+p*a),e.push(s)),s=new mxPoint(s.x+l*b,s.y+m*b));e.push(s)};null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
+ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,p=ra.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){var q=g;a=function(a,b,c){a-=q.x;var d=
+b-q.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);r?(c&&(q=new mxPoint(q.x+l*b,q.y+m*b),e.push(q)),q=new mxPoint(q.x+n*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+n*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+l*b,q.y+m*b));e.push(q)};null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Da.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;
T.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.15,0.05),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.85,0.05),
-!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
+!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
0.1),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.75,0.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.25,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
0.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.35),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.65),!1),new mxConnectionConstraint(new mxPoint(1,
-0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
+0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
1),!0),new mxConnectionConstraint(new mxPoint(0.1,0.25),!1),new mxConnectionConstraint(new mxPoint(0.2,0.5),!1),new mxConnectionConstraint(new mxPoint(0.1,0.75),!1),new mxConnectionConstraint(new mxPoint(0.9,0.25),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.9,0.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),
!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.375,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.625,0),!0),new mxConnectionConstraint(new mxPoint(0.125,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0.125,0.75),!1),new mxConnectionConstraint(new mxPoint(0.875,
@@ -2504,14 +2504,14 @@ new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];n.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;Y.prototype.constraints=null;I.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
-0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];G.prototype.constraints=null;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
+0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];H.prototype.constraints=null;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
": "+p.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=e;this.addAction("save",function(){b.saveFile(!1)},null,null,"Ctrl+S").isEnabled=e;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,"Ctrl+Shift+S").isEnabled=e;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,
420,!0,!0);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=e;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print","Ctrl+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo","Ctrl+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",!mxClient.IS_WIN?"Ctrl+Shift+Z":"Ctrl+Y");
this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut","Ctrl+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy","Ctrl+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste","Ctrl+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){var c=d.getBoundingBoxFromGeometry(b);
-if(null!=c){var e=d.view.translate,f=d.view.scale,p=e.y,r=Math.round(d.snap(d.popupMenuHandler.triggerX/f-e.x)),s=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,r-c.x,s-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,"Ctrl+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,"Ctrl+D");this.addAction("turn",
+if(null!=c){var e=d.view.translate,f=d.view.scale,p=e.y,r=Math.round(d.snap(d.popupMenuHandler.triggerX/f-e.x)),u=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,r-c.x,u-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,"Ctrl+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,"Ctrl+D");this.addAction("turn",
function(){d.setSelectionCells(d.turnShapes(d.getSelectionCells()))},null,null,"Ctrl+R");this.addAction("selectVertices",function(){d.selectVertices()},null,null,"Ctrl+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,"Ctrl+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,"Ctrl+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,"Ctrl+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();
try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,"Ctrl+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},
null,null,"Ctrl+Shift+Page Up");this.addAction("enterGroup",function(){d.enterGroup()},null,null,"Ctrl+Shift+Page Down");this.addAction("expand",function(){d.foldCells(!1)},null,null,"Ctrl+Page Down");this.addAction("collapse",function(){d.foldCells(!0)},null,null,"Ctrl+Page Up");this.addAction("toFront",function(){d.orderCells(!1)},null,null,"Ctrl+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,"Ctrl+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container",
@@ -2548,7 +2548,7 @@ c.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(v
a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var e=d.getCellGeometry(c);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(c,e))}}}finally{d.getModel().endUpdate()}}});f=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),
null,null,"Ctrl+,");f=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,"Ctrl+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),e="";null!=c&&(e=c.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,
b,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,b,c);else{var e=d.getSelectionCells();if(null!=a){var k=null;d.getModel().beginUpdate();try{if(0==e.length)var g=d.getFreeInsertPoint(),k=e=[d.insertVertex(d.getDefaultParent(),null,"",g.x,g.y,b,c,"shape\x3dimage;imageAspect\x3d0;aspect\x3dfixed;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;")];d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);
-"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],y=d.getModel().getGeometry(x);null!=y&&(y=y.clone(),y.width=b,y.height=c,d.getModel().setGeometry(x,y))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&
+"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],z=d.getModel().getGeometry(x);null!=z&&(z=z.clone(),z.width=b,z.height=c,d.getModel().setGeometry(x,z))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&
!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=e;f=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,"Ctrl+Shift+L");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));f=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,"Ctrl+Shift+P");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));f=
this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible());
@@ -2612,7 +2612,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
-[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
+[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
"shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=
1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();
EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};
@@ -2621,16 +2621,16 @@ length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",spee
g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),g.innerHTML=f+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)))g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/
2))+"px";this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a});g=!0}return g};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<
24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var g=d(a,4);if(null!=b&&b(f-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(s){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&
0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,g,q,t,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var v=null,x=null;null==
-c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?v="_blank":x=v=d;if(null==a)return"";var y=a;if("mxfile"!=y.nodeName.toLowerCase()){var z=b.zapGremlins(mxUtils.getXml(a)),y=b.compress(z);if(b.decompress(y)!=z)return z;z=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(z,y);y=a.ownerDocument.createElement("mxfile");y.appendChild(z)}u?(y=y.cloneNode(!0),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.setAttribute("userAgent",
-navigator.userAgent),y.setAttribute("version",EditorUi.VERSION),y.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&y.setAttribute("type",a));a=mxUtils.getXml(y);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(y),b,null!=c?c.getTitle():null,v,x);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,x)}return a};
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,g,q,s,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;s=null!=s?s:!0;var v=null,x=null;null==
+c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?v="_blank":x=v=d;if(null==a)return"";var z=a;if("mxfile"!=z.nodeName.toLowerCase()){var y=b.zapGremlins(mxUtils.getXml(a)),z=b.compress(y);if(b.decompress(z)!=y)return y;y=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(y,z);z=a.ownerDocument.createElement("mxfile");z.appendChild(y)}t?(z=z.cloneNode(!0),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.setAttribute("userAgent",
+navigator.userAgent),z.setAttribute("version",EditorUi.VERSION),z.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&z.setAttribute("type",a));a=mxUtils.getXml(z);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(z),b,null!=c?c.getTitle():null,v,x);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,s,x)}return a};
EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&(null!=f&&f.needsUpdate)&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
-f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,q){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var t=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
-var u=f.getGlobalVariable,v=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(v.root)}a=this.createFileData(g,f,t,window.location.href,a,b,c,d,e,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;f=Math.floor(g.x/t-b.view.translate.x);t=Math.floor(g.y/t-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",t)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));
+f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,q){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var s=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=s&&/(\.svg)$/i.test(s.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
+var t=f.getGlobalVariable,v=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(v.root)}a=this.createFileData(g,f,s,window.location.href,a,b,c,d,e,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():
+b.getBoundingBox(b.getSelectionCells()),s=b.view.scale;f=Math.floor(g.x/s-b.view.translate.x);s=Math.floor(g.y/s-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",s)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));
null!=e&&(e=e.replace(/&/g,"\x26amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]\x3e\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d5,IE\x3d9" \x3e\x3c![endif]--\x3e\n':"")+"\x3c!DOCTYPE html\x3e\n\x3chtml"+(null!=e?' xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e':"\x3e")+"\n\x3chead\x3e\n"+(null==e?null!=c?"\x3ctitle\x3e"+mxUtils.htmlEntities(c)+
"\x3c/title\x3e\n":"":"\x3ctitle\x3eDraw.io Diagram\x3c/title\x3e\n")+(null!=e?'\x3cmeta http-equiv\x3d"refresh" content\x3d"0;URL\x3d\''+e+"'\"/\x3e\n":"")+"\x3c/head\x3e\n\x3cbody"+(null==e&&null!=g&&g!=mxConstants.NONE?' style\x3d"background-color:'+g+';"\x3e':"\x3e")+'\n\x3cdiv class\x3d"mxgraph" style\x3d"position:relative;overflow:auto;width:100%;"\x3e\n\x3cdiv style\x3d"width:1px;height:1px;overflow:hidden;"\x3e'+d+"\x3c/div\x3e\n\x3c/div\x3e\n"+(null==e?'\x3cscript type\x3d"text/javascript" src\x3d"'+
q+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+"\n\x3c/body\x3e\n\x3c/html\x3e\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){d="https://www.draw.io/js/viewer.min.js";var f="";null!=b&&null==e&&(f=this.getBasenames().join(";"),0<f.length&&(d="https://www.draw.io/embed2.js?s\x3d"+f));null!=e&&(e=e.replace(/&/g,
@@ -2639,10 +2639,10 @@ q+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;mar
'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+"\n\x3c/body\x3e\n\x3c/html\x3e\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,
!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&(null==this.fileNode&&null!=
b)&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
-/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(q,a,t,
-"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var y=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.addSvgShadow(y);
-this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else"xmlpng"==a&&(q=g+".png"),this.saveRequest(q,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;
-null!=f&&(this.editor.graph.pageVisible=f);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return g}catch(l){this.handleError(l)}}))}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&
+/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),q=g+"."+a;if("xml"==a){var s='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,s,"text/xml")}else if("html"==a)s=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(q,a,s,
+"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var t=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var z=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.addSvgShadow(z);
+this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else"xmlpng"==a&&(q=g+".png"),this.saveRequest(q,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;
+null!=f&&(this.editor.graph.pageVisible=f);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return g}catch(l){this.handleError(l)}}))}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&
null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="\x26from\x3d"+g;break}return new mxXmlRequest(EXPORT_URL,"format\x3d"+b+f+"\x26base64\x3d"+d+"\x26embedXml\x3d"+e+"\x26xml\x3d"+encodeURIComponent(c)+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),
c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";this.editor.graph.setEnabled(!1);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&
(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility=
@@ -2654,21 +2654,21 @@ return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(
a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding=
"8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),
-0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=q.getAttribute("title");null!=c&&(0<c.length&&".scratchpad"!=a.title)&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right=
-"0px";t.style.top="5px";!mxClient.IS_QUIRKS&&8!=document.documentMode&&(t.style.backgroundColor="inherit");q.style.position="relative";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.setAttribute("align","top");u.setAttribute("border","0");u.className="geButton";u.style.marginRight="1px";u.style.marginTop="-1px";t.appendChild(u);var v=null;mxEvent.addListener(u,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=
-LocalLibrary&&a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=u.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",t.insertBefore(C,t.firstChild),q.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),q.style.paddingRight=18*t.childNodes.length+
-"px")})):null==v&&(v=u.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),t.insertBefore(v,t.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=18*t.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*t.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,f){a=
-x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=x.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
-(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;A(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&(null!=x.panningManager&&null!=x.graphHandler.shape)&&
+0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=q.getAttribute("title");null!=c&&(0<c.length&&".scratchpad"!=a.title)&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var s=document.createElement("div");s.style.position="absolute";s.style.right=
+"0px";s.style.top="5px";!mxClient.IS_QUIRKS&&8!=document.documentMode&&(s.style.backgroundColor="inherit");q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.className="geButton";t.style.marginRight="1px";t.style.marginTop="-1px";s.appendChild(t);var v=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.constructor!=
+LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=t.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",s.insertBefore(D,s.firstChild),q.style.paddingRight=18*s.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),q.style.paddingRight=18*s.childNodes.length+
+"px")})):null==v&&(v=t.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),s.insertBefore(v,s.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=18*s.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*s.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=
+x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=x.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);y(d);null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}),A=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
+(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;E(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&(null!=x.panningManager&&null!=x.graphHandler.shape)&&
(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&(null!=x.panningManager&&null!=x.graphHandler)&&(g.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
+null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border=
-"3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,t){if(null!=c&&"image/"==d.substring(0,6)){var u="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),u=[new mxCell("",new mxGeometry(0,0,n,q),u)];u[0].vertex=!0;A(u,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?
-null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);z(a);this.spinner.stop();t=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),u=this.stringToCells(this.editor.graph.decompress(v)),A(u,new mxRectangle(0,0,n,q),a),t=!0}catch(y){}t||
-(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));u=u.cloneNode(!1);u.setAttribute("src",IMAGE_PATH+"/edit.gif");u.setAttribute("title",mxResources.get("edit"));
-t.insertBefore(u,t.firstChild);mxEvent.addListener(u,"click",y);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&y(a)});u=u.cloneNode(!1);u.setAttribute("src",Editor.plusImage);u.setAttribute("title",mxResources.get("add"));t.insertBefore(u,t.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
-mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),t.insertBefore(c,t.firstChild));var C=null;mxEvent.addListener(u,"click",E)}q.appendChild(t);q.style.paddingRight=18*t.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+"3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,s){if(null!=c&&"image/"==d.substring(0,6)){var t="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,n,q),t)];t[0].vertex=!0;E(t,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?
+null:s.substring(0,s.lastIndexOf(".")).replace(/_/g," "))}else{s=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);y(a);this.spinner.stop();s=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(v)),E(t,new mxRectangle(0,0,n,q),a),s=!0}catch(z){}s||
+(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&(null!=e.parentNode&&0<b.length)&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));
+s.insertBefore(t,s.firstChild);mxEvent.addListener(t,"click",z);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&z(a)});t=t.cloneNode(!1);t.setAttribute("src",Editor.plusImage);t.setAttribute("title",mxResources.get("add"));s.insertBefore(t,s.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
+mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),s.insertBefore(c,s.firstChild));var D=null;mxEvent.addListener(t,"click",A)}q.appendChild(s);q.style.paddingRight=18*s.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=
function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,
@@ -2682,105 +2682,105 @@ EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64
c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveData(c,"png",d.substring(d.lastIndexOf(",")+1),"image/png",!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=
function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,
620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(g){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,
-"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?"\x26binary\x3d1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,t=Math.min(q+1024,d),u=Array(t-q),v=0;q<t;++v,
-++q)u[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(u)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG))if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+
+"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?"\x26binary\x3d1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,s=Math.min(q+1024,d),t=Array(s-q),v=0;q<s;++v,
+++q)t[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(t)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG))if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;
a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),
a,f,!0,d,c)}catch(g){this.handleError(g)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,4>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=
-function(a,b,c,d,e,f,g){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var t=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(t);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,a));var u=u+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();
-e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,t,!1,mxUtils.bind(this,function(){f?
-(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(t,v,this.thumbImageCache)):v(t)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a){function b(){f.innerHTML=
+function(a,b,c,d,e,f,g){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var s=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(s);a=this.getCurrentFile();var t=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=t.lastIndexOf(".");0<a&&(t=t.substring(0,a));var t=t+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();
+e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,s,!1,mxUtils.bind(this,function(){f?
+(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(s,v,this.thumbImageCache)):v(s)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a){function b(){f.innerHTML=
'\x3cdiv style\x3d"width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"\x3e\x3c/div\x3e'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="4px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");
d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",f=null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||
-"none",function(a){e=a;b()});mxEvent.consume(a)}));b();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var t=
-this.getCurrentFile(),u=[];d&&(u.push("chrome\x3d0"),u.push("lightbox\x3d1"),"auto"!=a&&u.push("target\x3d"+a),null!=b&&b!=mxConstants.NONE&&u.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&u.push("edit\x3d_blank"),f&&u.push("layers\x3d1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&u.push("page\x3d"+a);break}a="";b=!0;null!=g?a="#U"+encodeURIComponent(g):(t=this.getCurrentFile(),!q&&null!=t&&t.constructor==
-DriveFile?(a="#"+t.getHash(),b=!1):a="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));b&&(null!=t&&null!=t.getTitle())&&u.push("title\x3d"+encodeURIComponent(t.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<u.length?"?"+u.join("\x26"):"")+a};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,q,t,u,v){var x=this.getBasenames(),y={};""!=e&&e!=mxConstants.NONE&&
-(y.highlight=e);"auto"!==d&&(y.target=d);t||(y.lightbox=!1);y.nav=this.editor.graph.foldingEnabled;c=parseInt(c);!isNaN(c)&&100!=c&&(y.zoom=c/100);c=[];g&&(c.push("pages"),y.resize=!0,null!=this.pages&&null!=this.currentPage&&(y.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),y.resize=!0);q&&c.push("layers");0<c.length&&(t&&c.push("lightbox"),y.toolbar=c.join(" "));u&&(y.edit=null!=a?a:"_blank");null!=a?y.url=a:y.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+
-(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(y))+'"\x3e\x3c/div\x3e';x=0<x.length?"s\x3d"+x.join(";"):"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";v(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<x.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+x:"https://www.draw.io/embed2.js?"+x)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
+"none",function(a){e=a;b()});mxEvent.consume(a)}));b();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var s=
+this.getCurrentFile(),t=[];d&&(t.push("chrome\x3d0"),t.push("lightbox\x3d1"),"auto"!=a&&t.push("target\x3d"+a),null!=b&&b!=mxConstants.NONE&&t.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&t.push("edit\x3d_blank"),f&&t.push("layers\x3d1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&t.push("page\x3d"+a);break}a="";b=!0;null!=g?a="#U"+encodeURIComponent(g):(s=this.getCurrentFile(),!q&&null!=s&&s.constructor==
+DriveFile?(a="#"+s.getHash(),b=!1):a="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));b&&(null!=s&&null!=s.getTitle())&&t.push("title\x3d"+encodeURIComponent(s.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<t.length?"?"+t.join("\x26"):"")+a};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,q,s,t,v){var x=this.getBasenames(),z={};""!=e&&e!=mxConstants.NONE&&
+(z.highlight=e);"auto"!==d&&(z.target=d);s||(z.lightbox=!1);z.nav=this.editor.graph.foldingEnabled;c=parseInt(c);!isNaN(c)&&100!=c&&(z.zoom=c/100);c=[];g&&(c.push("pages"),z.resize=!0,null!=this.pages&&null!=this.currentPage&&(z.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),z.resize=!0);q&&c.push("layers");0<c.length&&(s&&c.push("lightbox"),z.toolbar=c.join(" "));t&&(z.edit=null!=a?a:"_blank");null!=a?z.url=a:z.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+
+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(z))+'"\x3e\x3c/div\x3e';x=0<x.length?"s\x3d"+x.join(";"):"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";v(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<x.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+x:"https://www.draw.io/embed2.js?"+x)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
'"\x3e\x3c/script\x3e')};EditorUi.prototype.showGitHubDialog=function(a,b,c){if(null==this.gitHubDialog){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("github"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var e=document.createElement("table"),f=document.createElement("tbody");e.style.marginBottom="16px";var g=mxUtils.bind(this,function(a,b,c){var d=document.createElement("tr"),
-e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),A())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=null,t=null,
-u=this.getCurrentFile();null!=u&&(u.constructor==GitHubFile&&null!=u.meta.drawio)&&(q=u.meta.drawio.org,t=u.meta.drawio.repo);var v=g(mxResources.get("organisation")+":","org",q),x=g(mxResources.get("repository")+":","repo",t),y=g(),z=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var A=mxUtils.bind(this,function(){var b=y.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=z.value;""==c&&(c="master");this.gitHubDialog.fn(v.value,
-x.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,A);this.gitHubDialog.init=function(a,b,c){var d=y.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));y.setAttribute("placeholder",b?"folder/filename.ext":"root");y.value=c||"";v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};
-EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(t);mxUtils.br(g);g.appendChild(q);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));g.appendChild(t);var u=this.getCurrentFile();null==c&&(null!=u&&u.constructor==DriveFile)&&(t=document.createElement("a"),
-t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href","javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),g.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var v=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value="100%";e.appendChild(y);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,A=A=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),C=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";D.style.marginBottom=
-"16px";mxEvent.addListener(C,"change",function(){C.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(q.checked?c:null,x.checked,y.value,v.getTarget(),v.getColor(),z.checked,A.checked,E.checked,C.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");
-mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(g);var q=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",t=document.createElement("div");
-t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var u=document.createElement("div");u.style.whiteSpace="normal";mxUtils.write(u,mxResources.get("linkAccountRequired"));t.appendChild(u);u=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));u.style.marginTop="12px";u.className="geBtn";t.appendChild(u);f.appendChild(t);u=document.createElement("a");u.style.paddingLeft=
-"12px";u.style.color="gray";u.style.fontSize="11px";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("check"));t.appendChild(u);mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),x())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=g(mxResources.get("organisation")+
+":","org"),s=g(mxResources.get("repository")+":","repo"),t=g(),v=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var x=mxUtils.bind(this,function(){var b=t.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=v.value;""==c&&(c="master");this.gitHubDialog.fn(q.value,s.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,x);var z=this;this.gitHubDialog.init=function(a,b,c){var d=z.getCurrentFile();null!=d&&d.constructor==
+GitHubFile&&(""==q.value&&(q.value=d.meta.org||""),""==s.value&&(s.value=d.meta.repo||""));d=t.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));t.setAttribute("placeholder",b?"folder/filename.ext":"root");t.value=c||"";q.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";q.setAttribute("value",
+"url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var s=document.createElement("span");mxUtils.write(s,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(s);mxUtils.br(g);g.appendChild(q);s=document.createElement("span");mxUtils.write(s,mxResources.get("publicDiagramUrl"));g.appendChild(s);var t=this.getCurrentFile();null==c&&(null!=t&&t.constructor==DriveFile)&&(s=document.createElement("a"),
+s.style.paddingLeft="12px",s.style.color="gray",s.setAttribute("href","javascript:void(0);"),mxUtils.write(s,mxResources.get("share")),g.appendChild(s),mxEvent.addListener(s,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var v=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var z=document.createElement("input");
+z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";e.appendChild(z);var y=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),A=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom=
+"16px";mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(q.checked?c:null,x.checked,z.value,v.getTarget(),v.getColor(),y.checked,E.checked,A.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(g);var q=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",s=document.createElement("div");
+s.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));s.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));t.style.marginTop="12px";t.className="geBtn";s.appendChild(t);f.appendChild(s);t=document.createElement("a");t.style.paddingLeft=
+"12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));s.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
300,80,!0,!1);a.init()}))}))}var v=null,x=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",f.appendChild(v),mxUtils.write(f,mxResources.get("height")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom=
-"10px",x.value=d+"px",f.appendChild(x),mxUtils.br(f);var y=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var z=null;if(null==q||q.constructor!=DriveFile||b)z=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var A=this.addCheckbox(f,mxResources.get("lightbox"),!0),E=this.addCheckbox(f,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var C=this.addCheckbox(f,mxResources.get("layers"),!0);C.style.marginLeft=E.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(A,
-"change",function(){A.checked?(C.removeAttribute("disabled"),E.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(y.getTarget(),y.getColor(),null==z?!0:z.checked,A.checked,E.checked,C.checked,null!=v?v.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=v?(v.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-v.select():document.execCommand("selectAll",!1,null)):y.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var q=this.editor.graph,t=246,u=document.createElement("h3");mxUtils.write(u,a);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(u);mxUtils.write(g,mxResources.get("zoom")+
-":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";g.appendChild(v);mxUtils.br(g);var x=this.addCheckbox(g,mxResources.get("transparentBackground"),q.background==mxConstants.NONE||null==q.background),y=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";
-z.setAttribute("type","checkbox");f&&(g.appendChild(z),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),t+=26);q.isSelectionEmpty()?z.setAttribute("disabled","disabled"):(z.setAttribute("checked","checked"),z.defaultChecked=!0);var A=this.addCheckbox(g,mxResources.get("shadow"),q.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&E.setAttribute("disabled","disabled");
-b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),t+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);C.style.marginBottom="16px";a=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.value,x.checked,!y.checked,A.checked,C.checked,E.checked,z.checked)}),null,c,d);this.showDialog(a.container,320,t,!0,!0);v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
-function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(q)}var t=this.addCheckbox(f,mxResources.get("fit"),!0),u=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),x=this.addCheckbox(f,mxResources.get("lightbox"),!0),y=this.addCheckbox(f,mxResources.get("showEditButton"),
-!0);y.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),A=this.addCheckbox(f,mxResources.get("layers"),z,!z);A.style.marginLeft=y.style.marginLeft;A.style.marginBottom="12px";mxEvent.addListener(x,"change",function(){x.checked?(z&&A.removeAttribute("disabled"),y.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(t.checked,u.checked,v.checked,x.checked,y.checked,
-A.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,q){function t(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");var t="";c&&(t=' width\x3d"'+Math.round(u.width)+'" height\x3d"'+Math.round(u.height)+'"');g('\x3cimg src\x3d"'+b+'"'+t+(""!=q?' style\x3d"'+q+'"':"")+l+"/\x3e")}var u=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);t(a)}),null,null,null,mxUtils.bind(this,
-function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),u.width*u.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var v="";c&&(v="\x26w\x3d"+Math.round(2*u.width)+"\x26h\x3d"+Math.round(2*u.height));var x=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));x.send(mxUtils.bind(this,function(){200<=x.getStatus()&&299>=x.getStatus()?t("data:image/png;base64,"+x.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),t=q.getElementsByTagName("a");if(null!=t)for(var u=0;u<t.length;u++){var v=t[u].getAttribute("href");null!=v&&("#"==v.charAt(0)&&"_blank"==t[u].getAttribute("target"))&&t[u].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var x=" ",y="";d&&(x="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",y+="cursor:pointer;");a&&(y+="max-width:100%;");this.convertImages(q,function(a){g('\x3cimg src\x3d"'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=y?' style\x3d"'+y+'"':"")+x+"/\x3e")})}else y="",d&&(q.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}}})(this);"),y+="cursor:pointer;"),a&&(a=parseInt(q.getAttribute("width")),b=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+a+" "+b),y+="max-width:100%;max-height:"+b+"px;",q.removeAttribute("height")),""!=y&&q.setAttribute("style",y),g(mxUtils.getXml(q))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);
+"10px",x.value=d+"px",f.appendChild(x),mxUtils.br(f);var z=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var y=null;if(null==q||q.constructor!=DriveFile||b)y=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var D=this.addCheckbox(f,mxResources.get("layers"),!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(E,
+"change",function(){E.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==y?!0:y.checked,E.checked,A.checked,D.checked,null!=v?v.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=v?(v.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+v.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var q=this.editor.graph,s=246,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(t);mxUtils.write(g,mxResources.get("zoom")+
+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";g.appendChild(v);mxUtils.br(g);var x=this.addCheckbox(g,mxResources.get("transparentBackground"),q.background==mxConstants.NONE||null==q.background),z=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";
+y.setAttribute("type","checkbox");f&&(g.appendChild(y),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),s+=26);q.isSelectionEmpty()?y.setAttribute("disabled","disabled"):(y.setAttribute("checked","checked"),y.defaultChecked=!0);var E=this.addCheckbox(g,mxResources.get("shadow"),q.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&A.setAttribute("disabled","disabled");
+b&&(g.appendChild(A),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),s+=26);var D=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);D.style.marginBottom="16px";a=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.value,x.checked,!z.checked,E.checked,D.checked,A.checked,y.checked)}),null,c,d);this.showDialog(a.container,320,s,!0,!0);v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(q)}var s=this.addCheckbox(f,mxResources.get("fit"),!0),t=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),x=this.addCheckbox(f,mxResources.get("lightbox"),!0),z=this.addCheckbox(f,mxResources.get("showEditButton"),
+!0);z.style.marginLeft="24px";var y=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),y,!y);E.style.marginLeft=z.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(x,"change",function(){x.checked?(y&&E.removeAttribute("disabled"),z.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(s.checked,t.checked,v.checked,x.checked,z.checked,
+E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,q){function s(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");var s="";c&&(s=' width\x3d"'+Math.round(t.width)+'" height\x3d"'+Math.round(t.height)+'"');g('\x3cimg src\x3d"'+b+'"'+s+(""!=q?' style\x3d"'+q+'"':"")+l+"/\x3e")}var t=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);s(a)}),null,null,null,mxUtils.bind(this,
+function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),t.width*t.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var v="";c&&(v="\x26w\x3d"+Math.round(2*t.width)+"\x26h\x3d"+Math.round(2*t.height));var x=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));x.send(mxUtils.bind(this,function(){200<=x.getStatus()&&299>=x.getStatus()?s("data:image/png;base64,"+x.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),s=q.getElementsByTagName("a");if(null!=s)for(var t=0;t<s.length;t++){var v=s[t].getAttribute("href");null!=v&&("#"==v.charAt(0)&&"_blank"==s[t].getAttribute("target"))&&s[t].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var x=" ",z="";d&&(x="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",z+="cursor:pointer;");a&&(z+="max-width:100%;");this.convertImages(q,function(a){g('\x3cimg src\x3d"'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=z?' style\x3d"'+z+'"':"")+x+"/\x3e")})}else z="",d&&(q.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}}})(this);"),z+="cursor:pointer;"),a&&(a=parseInt(q.getAttribute("width")),b=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+a+" "+b),z+="max-width:100%;max-height:"+b+"px;",q.removeAttribute("height")),""!=z&&q.setAttribute("style",z),g(mxUtils.getXml(q))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);
if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=
a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
"")+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,null,f)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x,y,z){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;y=null!=y?y:0;var A=t?null:x.background;A==mxConstants.NONE&&(A=null);null==A&&(A=d);null==A&&!1==t&&(A="#ffffff");this.convertImages(x.getSvg(A,null,null,z,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;
-d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));g=Math.ceil(q*g)+2*y;m=Math.ceil(q*m)+2*y;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.getContext("2d");null!=A&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=A,n.fill());n.scale(q,q);n.drawImage(d,y/q,y/q);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),
+null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,null,f)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,s,t,v,x,z,y){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;z=null!=z?z:0;var E=s?null:x.background;E==mxConstants.NONE&&(E=null);null==E&&(E=d);null==E&&!1==s&&(E="#ffffff");this.convertImages(x.getSvg(E,null,null,y,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;
+d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));g=Math.ceil(q*g)+2*z;m=Math.ceil(q*m)+2*z;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.getContext("2d");null!=E&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=E,n.fill());n.scale(q,q);n.drawImage(d,z/q,z/q);a(e)});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.addSvgShadow(c),
this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};
-return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),u=0;u<m.length;u++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var s=f[m];null==s?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(m[u])});c("image","xlink:href");c("img","src");
+return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),t=0;t<m.length;t++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var u=f[m];null==u?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,u)}})(m[t])});c("image","xlink:href");c("img","src");
0==e&&b(a)};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https://raw.githubusercontent.com/"===a.substring(0,34)||/^https:\/\/.*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
-c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=
-0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),y=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,x,x,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var z=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,z);var A=z.getChildCount(z.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<A;v++){var E=z.getChildAt(z.getRoot(),v);if(1==
-A&&!g.isCellLocked(g.getDefaultParent()))var C=z.getChildren(E),f=f.concat(g.importCells(C,b,c,g.getDefaultParent(),null,a));else E=g.importCells([E],0,0,g.model.getRoot(),null,a)[0],C=g.model.getChildren(E),g.moveCells(C,b,c),f=f.concat(C)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return f};EditorUi.prototype.insertLucidChart=
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),s=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=s&&"mxfile"==s.nodeName&&null!=this.pages){var t=s.getElementsByTagName("diagram");if(1==t.length)s=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(t[0]))).documentElement;else if(1<t.length){g.model.beginUpdate();try{for(var v=
+0;v<t.length;v++){var x=this.updatePageRoot(new DiagramPage(t[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=s&&"mxGraphModel"===s.nodeName){var y=new mxGraphModel;(new mxCodec(s.ownerDocument)).decode(s,y);var E=y.getChildCount(y.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<E;v++){var A=y.getChildAt(y.getRoot(),v);if(1==
+E&&!g.isCellLocked(g.getDefaultParent()))var D=y.getChildren(A),f=f.concat(g.importCells(D,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],D=g.model.getChildren(A),g.moveCells(D,b,c),f=f.concat(D)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return f};EditorUi.prototype.insertLucidChart=
function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,b,c,d)}catch(e){}});!this.pasteLucidChart&&!this.loadingExtensions&&!this.isOffline()?(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e)):window.setTimeout(e,0)};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status)&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,
-19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(u){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status)&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),s=this.importXml(q,b,c,f,!0);if(0<s.length)return s}if("data:image/svg+xml;"==a.substring(0,
+19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),s=this.importXml(q,b,c,f,!0),0<s.length)return s}catch(t){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var q=null,v;for(v in e.Pages)if(t=e.Pages[v],null!=t&&"0"==t.Properties.Order){q=t;break}null!=
+null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var q=null,v;for(v in e.Pages)if(s=e.Pages[v],null!=s&&"0"==s.Properties.Order){q=s;break}null!=
q&&this.insertLucidChart(q,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.updateCellSize(f),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(f.value)&&
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,t,u,v){u=null!=u?u:!0;var x=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,u),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
-1))),u&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(b=this.importXml(a.responseText,
-c,d,u));null!=q&&q(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(y=this.insertTextAt(this.validateFileData(a),c,d,!0,null,u));!x&&null!=q&&q(y);return y};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,s,t,v){t=null!=t?t:!0;var x=!1,z=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(z=this.importXml(b,c,d,t),g=!0)),g||(z=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),t&&z.isGridEnabled()&&(c=z.snap(c),d=z.snap(d)),z=[z.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=s?s:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(b=this.importXml(a.responseText,
+c,d,t));null!=q&&q(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(z=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));!x&&null!=q&&q(z);return z};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,q,t,u,v,x){var y=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var z=this.editor.graph,A=z.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,y,x)});f=null!=f?f:mxUtils.bind(this,function(a){z.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var E=a.length,C=E,D=[],F=mxUtils.bind(this,function(a,b){D[a]=b;if(0==--C){this.spinner.stop();if(null!=q)q(D);else{var c=[];z.getModel().beginUpdate();try{for(var d=0;d<D.length;d++){var e=D[d]();null!=e&&(c=c.concat(e))}}finally{z.getModel().endUpdate()}}f(c)}}),G=0;G<E;G++)mxUtils.bind(this,function(f){var r=a[f],q=new FileReader;
-q.onload=mxUtils.bind(this,function(a){if(null==g||g(r))if("image/"==r.type.substring(0,6))if("image/svg"==r.type.substring(0,9)){var k=a.target.result,q=k.indexOf(","),y=atob(k.substring(q+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],C=x?null:y.getAttribute("content");null!=C&&("\x3c"!=C.charAt(0)&&"%"!=C.charAt(0))&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null!=C&&("\x3cmxfile "===C.substring(0,
-8)||"\x3cmxGraphModel "===C.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*A,c+f*A,0,0,r.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),u=g.getAttribute("viewBox");if(null==u||0==u.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var v=u.split(" ");3<v.length&&(s=parseFloat(v[2]),
-t=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,r.type,b+f*A,c+f*A,Math.max(1,Math.round(s*x)),Math.max(1,Math.round(t*x)),r.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==r.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*A,c+f*A,E.width,E.height,r.name)}));y=
-!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,q){F(f,mxUtils.bind(this,function(){if(null!=
-g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/q));return e(g,r.type,b+f*A,c+f*A,Math.round(k*s),Math.round(q*s),r.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),t,d,v)})))}else e(a.target.result,r.type,b+f*A,c+f*A,240,160,r.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(r.name)?e(null,r.type,b+f*A,c+f*A,240,160,r.name,function(a){F(f,function(){return a})},r):"image"==r.type.substring(0,5)?q.readAsDataURL(r):
-q.readAsText(r)})(G)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
-f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),x=document.createElement("canvas");x.width=u;x.height=v;x.getContext("2d").drawImage(a,0,0,u,v);var y=x.toDataURL();if(y.length<b.length){var z=document.createElement("canvas");z.width=u;z.height=v;var A=z.toDataURL();y!==A&&(b=y,g=u,q=v)}}}catch(E){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=
+6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,q,s,t,v,x){var z=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;s=null!=s?s:!0;var y=this.editor.graph,E=y.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
+this.importFile(a,b,c,d,e,f,g,k,l,z,x)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=a.length,D=A,C=[],F=mxUtils.bind(this,function(a,b){C[a]=b;if(0==--D){this.spinner.stop();if(null!=q)q(C);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var e=C[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),H=0;H<A;H++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;
+r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),y=atob(k.substring(r+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],A=x?null:y.getAttribute("content");null!=A&&("\x3c"!=A.charAt(0)&&"%"!=A.charAt(0))&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null!=A&&("\x3cmxfile "===A.substring(0,
+8)||"\x3cmxGraphModel "===A.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*E,c+f*E,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],u=parseFloat(g.getAttribute("width")),s=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+u+" "+s);else if(isNaN(u)||isNaN(s)){var v=t.split(" ");3<v.length&&(u=parseFloat(v[2]),
+s=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,s));return e(k,q.type,b+f*E,c+f*E,Math.max(1,Math.round(u*x)),Math.max(1,Math.round(s*x)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var C=new Image;C.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*E,c+f*E,C.width,C.height,q.name)}));y=
+!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,r){F(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<t){var u=!s||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*E,c+f*E,Math.round(k*u),Math.round(r*u),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),s,d,v)})))}else e(a.target.result,q.type,b+f*E,c+f*E,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*E,c+f*E,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(H)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var s=Math.max(g/e,q/e);if(1<s){var t=Math.round(g/s),v=Math.round(q/s),x=document.createElement("canvas");x.width=t;x.height=v;x.getContext("2d").drawImage(a,0,0,t,v);var z=x.toDataURL();if(z.length<b.length){var y=document.createElement("canvas");y.width=t;y.height=v;var E=y.toDataURL();z!==E&&(b=z,g=t,q=v)}}}catch(A){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=
function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=q;q+=b;return a.substring(c,q)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var q=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,
-4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((t^4294967295)>>24&255,(t^4294967295)>>
-16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
+4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,q);do{var s=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);s=4294967295;s=this.updateCRC(s,b,0,4);s=this.updateCRC(s,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((s^4294967295)>>24&255,(s^4294967295)>>
+16&255,(s^4294967295)>>8&255,(s^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+s);d=f(a,s);f(a,4)}while(s);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
c);d.src=a};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};
this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,
!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],
0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,
0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&
-!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
-function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var u=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&(null==this.dialog&&null!=a.container)&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),u())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),u())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");
-null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
-"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var s=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:s.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var t=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=t&&(t.parentNode.removeChild(t),t=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==t&&(!mxClient.IS_IE||10<document.documentMode))t=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=t&&(t.parentNode.removeChild(t),t=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&
-(this.insertLucidChart(JSON.parse(d)),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(q){}try{var c=b.getElementsByTagName("span"),t=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(t)&&(f=!0,e=t)}catch(u){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=
+(this.insertLucidChart(JSON.parse(d)),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(q){}try{var c=b.getElementsByTagName("span"),s=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(s)&&(f=!0,e=s)}catch(t){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=
e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};
EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=
@@ -2797,32 +2797,32 @@ c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.
function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility="";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};
EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),
bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function r(a){if(null!=a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==
-a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var u=f.data;if("json"==urlParams.proto){try{u=JSON.parse(u)}catch(v){u=null}if(null==u)return;if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):
-u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("prompt"==u.action){var x=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:u}),"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(x.container,300,80,!0,!1);x.init();return}if("draft"==u.action){x=null;x="data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):
-r(u.xml);x=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),x,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null);this.showDialog(x.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&
-this.actions.get("exit").funct()}));try{x.init()}catch(y){g.postMessage(JSON.stringify({event:"draft",error:y.toString(),message:u}),"*")}return}if("template"==u.action){x=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(x.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));x.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var z=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,z);return}if("export"==u.action){if("png"==
-u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var A=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(A);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),D=C.getGlobalVariable,F=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:D.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(A))));C!=this.editor.graph&&
-C.container.parentNode.removeChild(C.container);E(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(A)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&E(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
-u.xml&&0<u.xml.length&&this.setFileData(u.xml);z=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))x=this.getXmlFileData(),z.xml=mxUtils.getXml(x),z.data=this.getFileData(null,null,!0,null,null,null,x),z.format=u.format;else if("html"==u.format)A=this.editor.getGraphXml(),z.data=this.getHtml(A,this.editor.graph),z.xml=mxUtils.getXml(A),z.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;x=this.editor.graph.background;
-x==mxConstants.NONE&&(x=null);z.xml=this.getFileData(!0);z.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(z),"*")})):this.convertImages(this.editor.graph.getSvg(x),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(z),"*")}));return}x="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(x));z.data=this.createSvgDataUri(x)}g.postMessage(JSON.stringify(z),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
-u.modified),null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit),null!=u.title&&null!=this.buttonContainer&&(x=document.createElement("span"),mxUtils.write(x,u.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(x)),u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=
-u.xml&&"data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):u.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(u)}),"*");return}}u=r(u);c=!0;try{a(u,f)}catch(G){this.handleError(G)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,
-function(a,b){var d=H();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
+a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var t=f.data;if("json"==urlParams.proto){try{t=JSON.parse(t)}catch(v){t=null}if(null==t)return;if("dialog"==t.action){this.showError(null!=t.titleKey?mxResources.get(t.titleKey):t.title,null!=t.messageKey?mxResources.get(t.messageKey):t.message,null!=t.buttonKey?mxResources.get(t.buttonKey):
+t.button);null!=t.modified&&(this.editor.modified=t.modified);return}if("prompt"==t.action){var x=new FilenameDialog(this,t.defaultValue||"",null!=t.okKey?mxResources.get(t.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:t}),"*")},null!=t.titleKey?mxResources.get(t.titleKey):t.title);this.showDialog(x.container,300,80,!0,!1);x.init();return}if("draft"==t.action){x=null;x="data:image/png;base64,"==t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):
+r(t.xml);x=new DraftDialog(this,mxResources.get("draftFound",[t.name||this.defaultFilename]),x,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:t}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:t}),"*")}),t.editKey?mxResources.get(t.editKey):null,t.discardKey?mxResources.get(t.discardKey):null);this.showDialog(x.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&
+this.actions.get("exit").funct()}));try{x.init()}catch(z){g.postMessage(JSON.stringify({event:"draft",error:z.toString(),message:t}),"*")}return}if("template"==t.action){x=new NewDialog(this,!1,null!=t.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=t.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(x.container,620,440,
+!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));x.init();return}if("status"==t.action){null!=t.messageKey?this.editor.setStatus(mxResources.get(t.messageKey)):null!=t.message&&this.editor.setStatus(t.message);null!=t.modified&&(this.editor.modified=t.modified);return}if("spinner"==t.action){var y=null!=t.messageKey?mxResources.get(t.messageKey):t.message;null!=t.show&&!t.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==t.action){if("png"==
+t.format||"xmlpng"==t.format){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin)){var E=null!=t.xml?t.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=t.format;b.xml=encodeURIComponent(E);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var D=this.editor.graph;
+if(null!=this.pages&&this.currentPage!=this.pages[0]){var D=this.createTemporaryGraph(D.getStylesheet()),C=D.getGlobalVariable,F=this.pages[0];D.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:C.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==t.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(E))));D!=this.editor.graph&&
+D.container.parentNode.removeChild(D.container);A(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==t.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(E)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&A(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+t.xml&&0<t.xml.length&&this.setFileData(t.xml);y=this.createLoadMessage("export");if("html2"==t.format||"html"==t.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))x=this.getXmlFileData(),y.xml=mxUtils.getXml(x),y.data=this.getFileData(null,null,!0,null,null,null,x),y.format=t.format;else if("html"==t.format)E=this.editor.getGraphXml(),y.data=this.getHtml(E,this.editor.graph),y.xml=mxUtils.getXml(E),y.format=t.format;else{mxSvgCanvas2D.prototype.foAltText=null;x=this.editor.graph.background;
+x==mxConstants.NONE&&(x=null);y.xml=this.getFileData(!0);y.format="svg";if(t.embedImages||null==t.embedImages){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==t.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(y),"*")})):this.convertImages(this.editor.graph.getSvg(x),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(y),"*")}));return}x="xmlsvg"==t.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(x));y.data=this.createSvgDataUri(x)}g.postMessage(JSON.stringify(y),"*")}return}if("load"==t.action)d=1==t.autosave,this.hideDialog(),null!=t.modified&&null==urlParams.modified&&(urlParams.modified=
+t.modified),null!=t.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=t.saveAndExit),null!=t.title&&null!=this.buttonContainer&&(x=document.createElement("span"),mxUtils.write(x,t.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(x)),t=null!=t.xmlpng?this.extractGraphModelFromPng(t.xmlpng):null!=
+t.xml&&"data:image/png;base64,"==t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):t.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(t)}),"*");return}}t=r(t);c=!0;try{a(t,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var G=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=G();d&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var d=G();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" (Ctrl+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));
a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));
b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",q=40,t=40,u=0,v=this.editor.graph;v.getGraphBounds();for(var x=function(){v.setSelectionCells(Y);v.scrollCellToVisible(v.getSelectionCell())},y=v.getFreeInsertPoint(),
-z=y.x,A=y.y,y=A,E=null,C="auto",D=[],F=null,G=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var K=mxUtils.trim(a.substring(1,N)),R=mxUtils.trim(a.substring(N+1));"label"==K?E=v.sanitizeHtml(R):"style"==K?e=R:"width"==K?f=R:"height"==K?g=R:"ignore"==K?G=R.split(","):"connect"==K?D.push(JSON.parse(R)):"link"==K?F=R:
-"padding"==K?u=parseFloat(R):"edgespacing"==K?q=parseFloat(R):"nodespacing"==K?t=parseFloat(R):"layout"==K&&(C=R)}}}var X=this.editor.csvToArray(b[H]);null==E&&(E="%"+X[0]+"%");if(null!=D)for(var V=0;V<D.length;V++)null==d[D[V].to]&&(d[D[V].to]={});v.model.beginUpdate();try{for(a=H+1;a<b.length;a++){var W=this.editor.csvToArray(b[a]);if(W.length==X.length){var B=new mxCell(E,new mxGeometry(z,y,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");B.vertex=!0;for(var T=0;T<W.length;T++)v.setAttributeForCell(B,
-X[T],W[T]);v.setAttributeForCell(B,"placeholders","1");B.style=v.replacePlaceholders(B,B.style);for(V=0;V<D.length;V++)d[D[V].to][B.getAttribute(D[V].to)]=B;null!=F&&"link"!=F&&(v.setLinkForCell(B,B.getAttribute(F)),v.setAttributeForCell(B,F,null));var M=this.editor.graph.getPreferredSizeForCell(B);B.geometry.width="auto"==f?M.width+u:parseFloat(f);B.geometry.height="auto"==g?M.height+u:parseFloat(g);y+=B.geometry.height+t;c.push(v.addCell(B))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted",
-"cells",c));for(var I=c.slice(),Y=c.slice(),V=0;V<D.length;V++){var L=D[V];for(a=0;a<c.length;a++){var B=c[a],J=B.getAttribute(L.from);if(null!=J){v.setAttributeForCell(B,L.from,null);for(var O=J.split(","),T=0;T<O.length;T++){var S=d[L.to][O[T]];null!=S&&(Y.push(v.insertEdge(null,null,L.label||"",L.invert?S:B,L.invert?B:S,L.style||v.createCurrentEdgeStyle())),mxUtils.remove(L.invert?B:S,I))}}}}if(null!=G)for(a=0;a<c.length;a++){B=c[a];for(T=0;T<G.length;T++)v.setAttributeForCell(B,mxUtils.trim(G[T]),
-null)}var ca=new mxParallelEdgeLayout(v);ca.spacing=q;var ba=function(){ca.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==C){var P=new mxCircleLayout(v);P.resetEdges=!1;var Z=P.isVertexIgnored;P.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(v.getDefaultParent());
-ba()},!0,x);x=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&Y.length==2*c.length-1&&1==I.length){v.view.validate();var aa=new mxCompactTreeLayout(v,"horizontaltree"==C);aa.levelDistance=t;aa.edgeRouting=!1;this.executeLayout(function(){aa.execute(v.getDefaultParent(),0<I.length?I[0]:null)},!0,x);x=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==I.length){v.view.validate();var U=new mxHierarchicalLayout(v,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
-U.intraCellSpacing=t;this.executeLayout(function(){U.execute(v.getDefaultParent(),Y);v.moveCells(Y,z,A)},!0,x);x=null}else if("organic"==C||"auto"==C&&Y.length>c.length){v.view.validate();var Q=new mxFastOrganicLayout(v);Q.forceConstant=3*t;Q.resetEdges=!1;var ga=Q.isVertexIgnored;Q.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=q;this.executeLayout(function(){Q.execute(v.getDefaultParent());ba()},!0,x);x=null}this.hideDialog()}finally{v.model.endUpdate()}null!=
+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",q=40,s=40,t=0,v=this.editor.graph;v.getGraphBounds();for(var x=function(){v.setSelectionCells(Y);v.scrollCellToVisible(v.getSelectionCell())},z=v.getFreeInsertPoint(),
+y=z.x,E=z.y,z=E,A=null,D="auto",C=[],F=null,H=null,G=0;G<b.length&&"#"==b[G].charAt(0);){a=b[G];for(G++;G<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[G].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[G].substring(1)),G++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var K=mxUtils.trim(a.substring(1,N)),R=mxUtils.trim(a.substring(N+1));"label"==K?A=v.sanitizeHtml(R):"style"==K?e=R:"width"==K?f=R:"height"==K?g=R:"ignore"==K?H=R.split(","):"connect"==K?C.push(JSON.parse(R)):"link"==K?F=R:
+"padding"==K?t=parseFloat(R):"edgespacing"==K?q=parseFloat(R):"nodespacing"==K?s=parseFloat(R):"layout"==K&&(D=R)}}}var X=this.editor.csvToArray(b[G]);null==A&&(A="%"+X[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});v.model.beginUpdate();try{for(a=G+1;a<b.length;a++){var W=this.editor.csvToArray(b[a]);if(W.length==X.length){var B=new mxCell(A,new mxGeometry(y,z,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");B.vertex=!0;for(var T=0;T<W.length;T++)v.setAttributeForCell(B,
+X[T],W[T]);v.setAttributeForCell(B,"placeholders","1");B.style=v.replacePlaceholders(B,B.style);for(V=0;V<C.length;V++)d[C[V].to][B.getAttribute(C[V].to)]=B;null!=F&&"link"!=F&&(v.setLinkForCell(B,B.getAttribute(F)),v.setAttributeForCell(B,F,null));var M=this.editor.graph.getPreferredSizeForCell(B);B.geometry.width="auto"==f?M.width+t:parseFloat(f);B.geometry.height="auto"==g?M.height+t:parseFloat(g);z+=B.geometry.height+s;c.push(v.addCell(B))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted",
+"cells",c));for(var I=c.slice(),Y=c.slice(),V=0;V<C.length;V++){var L=C[V];for(a=0;a<c.length;a++){var B=c[a],J=B.getAttribute(L.from);if(null!=J){v.setAttributeForCell(B,L.from,null);for(var O=J.split(","),T=0;T<O.length;T++){var S=d[L.to][O[T]];null!=S&&(Y.push(v.insertEdge(null,null,L.label||"",L.invert?S:B,L.invert?B:S,L.style||v.createCurrentEdgeStyle())),mxUtils.remove(L.invert?B:S,I))}}}}if(null!=H)for(a=0;a<c.length;a++){B=c[a];for(T=0;T<H.length;T++)v.setAttributeForCell(B,mxUtils.trim(H[T]),
+null)}var ca=new mxParallelEdgeLayout(v);ca.spacing=q;var ba=function(){ca.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==D){var P=new mxCircleLayout(v);P.resetEdges=!1;var Z=P.isVertexIgnored;P.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(v.getDefaultParent());
+ba()},!0,x);x=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&Y.length==2*c.length-1&&1==I.length){v.view.validate();var aa=new mxCompactTreeLayout(v,"horizontaltree"==D);aa.levelDistance=s;aa.edgeRouting=!1;this.executeLayout(function(){aa.execute(v.getDefaultParent(),0<I.length?I[0]:null)},!0,x);x=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==I.length){v.view.validate();var U=new mxHierarchicalLayout(v,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+U.intraCellSpacing=s;this.executeLayout(function(){U.execute(v.getDefaultParent(),Y);v.moveCells(Y,y,E)},!0,x);x=null}else if("organic"==D||"auto"==D&&Y.length>c.length){v.view.validate();var Q=new mxFastOrganicLayout(v);Q.forceConstant=3*s;Q.resetEdges=!1;var ga=Q.isVertexIgnored;Q.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=q;this.executeLayout(function(){Q.execute(v.getDefaultParent());ba()},!0,x);x=null}this.hideDialog()}finally{v.model.endUpdate()}null!=
x&&x()}}catch(ea){this.handleError(ea)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-
2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&
@@ -2836,8 +2836,8 @@ this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isOfflineApp()){if((mxClient.I
function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);
this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||
null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),
-"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var q=a.getFileData(!0,null,null,null,null,!0),t=g.getGraphBounds(),u=Math.floor(t.width*e/g.view.scale),v=Math.floor(t.height*e/g.view.scale);q.length<=MAX_REQUEST_SIZE&&u*v<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format\x3d"+c+"\x26base64\x3d"+(b||"0")+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+"\x26bg\x3d"+(null!=d?
-d:"none")+"\x26w\x3d"+u+"\x26h\x3d"+v+"\x26border\x3d"+f+"\x26xml\x3d"+encodeURIComponent(q))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}
+"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var q=a.getFileData(!0,null,null,null,null,!0),s=g.getGraphBounds(),t=Math.floor(s.width*e/g.view.scale),v=Math.floor(s.height*e/g.view.scale);q.length<=MAX_REQUEST_SIZE&&t*v<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format\x3d"+c+"\x26base64\x3d"+(b||"0")+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+"\x26bg\x3d"+(null!=d?
+d:"none")+"\x26w\x3d"+t+"\x26h\x3d"+v+"\x26border\x3d"+f+"\x26xml\x3d"+encodeURIComponent(q))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}
RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);
@@ -2904,17 +2904,17 @@ function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cur
c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.backgroundColor="#eee";c.style.height=this.toolbarHeight+"px";this.toolbar=c;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(c.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(c,30);var d=null,e=null,f=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&(Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l)&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,r=null,s=0;s<m.length;s++){var q=m[s];if("pages"==q){var t=[],r=b.ownerDocument.createElement("div");
-r.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(r,70);var u=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
-"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
-"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display});this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var y=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=
-p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=z.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
-p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");y.addListener(mxEvent.CHANGE,function(){z.style.display=1<y.getChildCount(y.root)?"inline-block":"none"});z.style.display=1<y.getChildCount(y.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
+k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&(Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l)&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,r=null,u=0;u<m.length;u++){var q=m[u];if("pages"==q){var s=[],r=b.ownerDocument.createElement("div");
+r.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(r,70);var t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,s.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+s.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(s[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
+"Previous Page");t.style.borderRightStyle="none";t.style.paddingLeft="0px";t.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,s.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+s.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(s[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
+"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)s=[];this.xmlNode!=x&&(s=this.xmlNode.getElementsByTagName("diagram"),r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+s.length),x=this.xmlNode);r.style.display=1<s.length?"inline-block":"none";t.style.display=r.style.display;v.style.display=r.style.display});this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var z=this.graph.getModel(),y=a(mxUtils.bind(this,function(a){if(null!=
+p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
+p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(q=this.graphConfig["toolbar-buttons"][q],null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
-this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var A=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
-b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
+b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(a){null!=b&&b.destroy()},mxUtils.bind(this,function(a){null==b&&(this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(a)||0==this.toolbarItems.length))&&this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"\x26layers\x3d1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26close\x3d1\x26edit\x3d_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26edit\x3d_blank"+a)}else this.showLocalLightbox()};
@@ -2933,5 +2933,5 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,c){if(null!=GraphViewe
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(b,c){if(b.resizedAttached){if(b.resizedAttached){b.resizedAttached.add(c);return}}else b.resizedAttached=new e,b.resizedAttached.add(c);b.resizeSensor=document.createElement("div");
b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='\x3cdiv class\x3d"resize-sensor-expand" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"resize-sensor-shrink" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"\x3e\x3c/div\x3e\x3c/div\x3e';
b.appendChild(b.resizeSensor);if("static"==(b.currentStyle?b.currentStyle.position:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue("position"):b.style.position))b.style.position="relative";var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),
-l=!1),a(m))};a(m);var x,y,z,A,E=function(){if((z=b.offsetWidth)!=x||(A=b.offsetHeight)!=y)l=!0,x=z,y=A;k()},C=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",E);C(g,"scroll",E)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
+l=!1),a(m))};a(m);var x,z,y,E,A=function(){if((y=b.offsetWidth)!=x||(E=b.offsetHeight)!=z)l=!0,x=y,z=E;k()},D=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",A);D(g,"scroll",A)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
0,m=c.length;k<m;k++)f(c[k],g);else f(c,g);this.detach=function(){if(l)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})(); \ No newline at end of file
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index 2fe6ca3e..dd53c1ba 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -7549,7 +7549,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return t.apply(this,arguments)}})();
-(function(){EditorUi.VERSION="6.1.0.0";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
+(function(){EditorUi.VERSION="6.1.0.1";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};
b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=
function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),
@@ -7636,10 +7636,10 @@ u.getTitle()&&v.push("title\x3d"+encodeURIComponent(u.getTitle()));return(mxClie
null!=this.currentPage&&(A.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),A.resize=!0);q&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),A.toolbar=c.join(" "));v&&(A.edit=null!=a?a:"_blank");null!=a?A.url=a:A.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(A))+'"\x3e\x3c/div\x3e';z=0<z.length?"s\x3d"+z.join(";"):
"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";x(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<z.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+z:"https://www.draw.io/embed2.js?"+z)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'"\x3e\x3c/script\x3e')};EditorUi.prototype.showGitHubDialog=function(a,b,c){if(null==this.gitHubDialog){var d=document.createElement("div");d.style.whiteSpace="nowrap";
var e=document.createElement("h3");mxUtils.write(e,mxResources.get("github"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var e=document.createElement("table"),f=document.createElement("tbody");e.style.marginBottom="16px";var g=mxUtils.bind(this,function(a,b,c){var d=document.createElement("tr"),e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type",
-"text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),D())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=null,u=null,v=this.getCurrentFile();null!=v&&v.constructor==GitHubFile&&null!=v.meta.drawio&&(q=v.meta.drawio.org,u=v.meta.drawio.repo);var x=g(mxResources.get("organisation")+
-":","org",q),z=g(mxResources.get("repository")+":","repo",u),A=g(),y=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var D=mxUtils.bind(this,function(){var b=A.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=y.value;""==c&&(c="master");this.gitHubDialog.fn(x.value,z.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,D);this.gitHubDialog.init=function(a,b,c){var d=A.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,
-mxResources.get(b?"path":"folder"));A.setAttribute("placeholder",b?"folder/filename.ext":"root");A.value=c||"";x.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
-mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value",
+"text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),z())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=g(mxResources.get("organisation")+":","org"),u=g(mxResources.get("repository")+":","repo"),v=g(),x=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);
+var z=mxUtils.bind(this,function(){var b=v.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=x.value;""==c&&(c="master");this.gitHubDialog.fn(q.value,u.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,z);var A=this;this.gitHubDialog.init=function(a,b,c){var d=A.getCurrentFile();null!=d&&d.constructor==GitHubFile&&(""==q.value&&(q.value=d.meta.org||""),""==u.value&&(u.value=d.meta.repo||""));d=v.parentNode.previousSibling;d.innerHTML=
+"";mxUtils.write(d,mxResources.get(b?"path":"folder"));v.setAttribute("placeholder",b?"folder/filename.ext":"root");v.value=c||"";q.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value",
"copy");g.appendChild(f);var u=document.createElement("span");mxUtils.write(u,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(u);mxUtils.br(g);g.appendChild(q);u=document.createElement("span");mxUtils.write(u,mxResources.get("publicDiagramUrl"));g.appendChild(u);var v=this.getCurrentFile();null==c&&null!=v&&v.constructor==DriveFile&&(u=document.createElement("a"),u.style.paddingLeft="12px",u.style.color="gray",u.setAttribute("href","javascript:void(0);"),mxUtils.write(u,mxResources.get("share")),
g.appendChild(u),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(v.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var x=this.addLinkSection(e),z=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.style.marginRight=
"12px";A.value="100%";e.appendChild(A);var y=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,D=D=this.addCheckbox(e,mxResources.get("allPages"),g,!g),B=this.addCheckbox(e,mxResources.get("layers"),!0),C=this.addCheckbox(e,mxResources.get("lightbox"),!0),F=this.addCheckbox(e,mxResources.get("showEditButton"),!0);F.style.marginLeft="24px";F.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?F.removeAttribute("disabled"):F.setAttribute("disabled",
@@ -7886,9 +7886,9 @@ this.extractGraphModelFromPng(b)),c(b))}),f,/(\.png)($|\?)/i.test(a))};
App.prototype.createFile=function(a,c,f,d,b,e,g){d=null!=d?d:this.mode;if(null!=a&&this.spinner.spin(document.body,mxResources.get("inserting"))){c=null!=c?c:this.emptyDiagramXml;var k=mxUtils.bind(this,function(){this.spinner.stop()}),l=mxUtils.bind(this,function(a){k();null==a&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=a&&this.handleError(a)});d==App.MODE_GOOGLE&&null!=this.drive?(g=null!=this.stateArg?this.stateArg.folderId:g,this.drive.insertFile(a,c,g,mxUtils.bind(this,
function(a){k();this.fileCreated(a,f,e,b)}),l)):d==App.MODE_GITHUB&&null!=this.gitHub?this.pickFolder(d,mxUtils.bind(this,function(d){this.gitHub.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l,!1,d)})):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(a,c,mxUtils.bind(this,function(a){k();this.fileCreated(a,f,e,b)}),l,
!1,g):d==App.MODE_BROWSER?(k(),d=mxUtils.bind(this,function(){var d=new StorageFile(this,c,a);d.saveFile(a,!1,mxUtils.bind(this,function(){this.fileCreated(d,f,e,b)}),l)}),null==localStorage.getItem(a)?d():this.confirm(mxResources.get("replaceIt",[a]),d,mxUtils.bind(this,function(){null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))):(k(),this.fileCreated(new LocalFile(this,c,a),f,e,b))}};
-App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0<c.length&&(b+="?libs\x3d"+c);b=this.getUrl(b);a.getMode()!=App.MODE_DEVICE&&(b+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var e=a.getData();a.setData(this.createFileData(0<e.length?this.editor.extractGraphModel(mxUtils.parseXml(e).documentElement,!0):null,null,a,window.location.protocol+"//"+window.location.hostname+b));var g=mxUtils.bind(this,function(){this.spinner.stop()}),
-k=mxUtils.bind(this,function(){g();var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);null!=c&&this.sidebar.showEntries(c);null!=d&&d()});!f&&null!=this.getCurrentFile()&&null!=this.mode?(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle())),window.openWindow(b,null,e)):e()});a.constructor==LocalFile||a.constructor==DriveFile?k():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){k()}),
-mxUtils.bind(this,function(a){g();this.handleError(a)}))}};
+App.prototype.fileCreated=function(a,c,f,d){var b=window.location.pathname;null!=c&&0<c.length&&(b+="?libs\x3d"+c);b=this.getUrl(b);a.getMode()!=App.MODE_DEVICE&&(b+="#"+a.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var e=window.location.protocol+"//"+window.location.hostname+b,g=this.getFileData(!0),k=a.getData();this.setFileData(k);a.setData(this.createFileData(this.getXmlFileData(),null,a,e));this.setFileData(g);var l=mxUtils.bind(this,function(){this.spinner.stop()}),
+m=mxUtils.bind(this,function(){l();var e=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(a);null!=c&&this.sidebar.showEntries(c);null!=d&&d()});!f&&null!=this.getCurrentFile()&&null!=this.mode?(a.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a.getData(),a.getTitle())),window.openWindow(b,null,e)):e()});a.constructor==LocalFile||a.constructor==DriveFile?m():a.saveFile(a.getTitle(),!1,mxUtils.bind(this,function(){m()}),
+mxUtils.bind(this,function(a){l();this.handleError(a)}))}};
App.prototype.loadFile=function(a,c,f){this.hideDialog();f=mxUtils.bind(this,function(){if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==a.charAt(0))if(this.spinner.stop(),isLocalStorage)try{a=decodeURIComponent(a.substring(1));var d=localStorage.getItem(a);if(null!=d)this.fileLoaded(new StorageFile(this,d,a));else throw{message:mxResources.get("fileNotFound")};}catch(b){this.handleError(b,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();
window.location.hash=null!=a?a.getHash():""}))}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var a=this.getCurrentFile();window.location.hash=null!=a?a.getHash():""}));else if(null!=e)this.spinner.stop(),this.fileLoaded(e);else if("R"==a.charAt(0)){this.spinner.stop();d=decodeURIComponent(a.substring(1));"\x3c"!=d.charAt(0)&&(d=this.editor.graph.decompress(d));var e=new LocalFile(this,d,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename);e.getHash=function(){return a};this.fileLoaded(e);this.setMode(null)}else if("U"==a.charAt(0)){var f=decodeURIComponent(a.substring(1));this.loadTemplate(f,mxUtils.bind(this,function(b){this.spinner.stop();if(null!=b&&0<b.length){var d=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var e=f,n=f.lastIndexOf("."),p=e.lastIndexOf("/");if(n>p&&0<p&&(e=e.substring(p+1,n),n=f.substring(n),".png"==n&&(n=".xml"),".svg"===n||
@@ -7910,7 +7910,7 @@ App.prototype.pickFolder=function(a,c,f){f=null!=f?f:!0;var d=this.spinner.pause
(e=a.data.folders[0].id,e=e.substring(e.lastIndexOf(".")+1),c(e))})):f&&a==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(a){d();c(a)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(a,c,f,d,b,e){b==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(c,d?this.base64ToBlob(a,f):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)})):b==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(c,a,e,mxUtils.bind(this,function(a){this.spinner.stop()}),
mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),f,d,!1):b==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(c,d?this.base64ToBlob(a,f):a,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e):b==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(c,a,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!1,e,d)};
+function(){this.spinner.stop()}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),!0,e,d)};
App.prototype.descriptorChanged=function(){var a=this.getCurrentFile();if(null!=a){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var c=null!=a.getTitle()?a.getTitle():this.defaultFilename;mxUtils.write(this.fname,c);this.fname.setAttribute("title",c+" - "+mxResources.get("rename"))}this.editor.graph.setEnabled(a.isEditable());null==urlParams.rev&&(this.updateDocumentTitle(),a=a.getHash(),0<a.length?window.location.hash=a:0<window.location.hash.length&&(window.location.hash=
""))}};App.prototype.toggleChat=function(){var a=this.getCurrentFile();if(null!=a){if(null==a.chatWindow){var c=document.body.offsetWidth-300;a.chatWindow=new ChatWindow(this,mxResources.get("chatWindowTitle"),document.getElementById("geChat"),c,80,250,350,a.realtime);a.chatWindow.window.setVisible(!1)}a.chatWindow.window.setVisible(!a.chatWindow.window.isVisible())}};App.prototype.status=function(a){this.editor.setStatus(a)};
App.prototype.showAuthDialog=function(a,c,f){var d=this.spinner.pause();this.showDialog((new AuthDialog(this,a,c,mxUtils.bind(this,function(a){try{null!=f&&f(a,function(){d()})}catch(c){this.editor.setStatus(c.message)}}))).container,300,c?180:140,!0,!0,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
diff --git a/war/js/diagramly/App.js b/war/js/diagramly/App.js
index 4811ef1b..66fa68a4 100644
--- a/war/js/diagramly/App.js
+++ b/war/js/diagramly/App.js
@@ -3051,10 +3051,16 @@ App.prototype.fileCreated = function(file, libs, replace, done)
// to save the file again since it needs the newly created file ID for redirecting in HTML
if (this.spinner.spin(document.body, mxResources.get('inserting')))
{
+ var redirect = window.location.protocol + '//' + window.location.hostname + url;
+ var prev = this.getFileData(true);
var data = file.getData();
- file.setData(this.createFileData((data.length > 0) ?
- this.editor.extractGraphModel(mxUtils.parseXml(data).documentElement, true) : null,
- null, file, window.location.protocol + '//' + window.location.hostname + url));
+
+ // Updates display to fetch graphical output for graphics file formats (eg. svg)
+ this.setFileData(data);
+ file.setData(this.createFileData(this.getXmlFileData(), null, file, redirect));
+
+ // Restores display for current diagram
+ this.setFileData(prev);
var complete = mxUtils.bind(this, function()
{
@@ -3837,6 +3843,7 @@ App.prototype.exportFile = function(data, filename, mimeType, base64Encoded, mod
{
if (this.gitHub != null && this.spinner.spin(document.body, mxResources.get('saving')))
{
+ // Must insert file as library to force the file to be written
this.gitHub.insertFile(filename, data, mxUtils.bind(this, function()
{
this.spinner.stop();
@@ -3844,7 +3851,7 @@ App.prototype.exportFile = function(data, filename, mimeType, base64Encoded, mod
{
this.spinner.stop();
this.handleError(resp);
- }), false, folderId, base64Encoded);
+ }), true, folderId, base64Encoded);
}
}
};
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 16a64296..113f2ee4 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -3225,20 +3225,9 @@
return input;
});
-
- var org = null;
- var repo = null;
-
- var file = this.getCurrentFile();
-
- if (file != null && file.constructor == GitHubFile && file.meta.drawio != null)
- {
- org = file.meta.drawio.org;
- repo = file.meta.drawio.repo;
- }
-
- var orgInput = addRow(mxResources.get('organisation') + ':', 'org', org);
- var repoInput = addRow(mxResources.get('repository') + ':', 'repo', repo);
+
+ var orgInput = addRow(mxResources.get('organisation') + ':', 'org');
+ var repoInput = addRow(mxResources.get('repository') + ':', 'repo');
var pathInput = addRow();
var refInput = addRow(mxResources.get('ref') + ':', 'master');
@@ -3271,9 +3260,25 @@
});
this.gitHubDialog = new CustomDialog(this, div, invokeFn);
+ var ui = this;
this.gitHubDialog.init = function(thisFn, fPath, dPath)
{
+ var file = ui.getCurrentFile();
+
+ if (file != null && file.constructor == GitHubFile)
+ {
+ if (orgInput.value == '')
+ {
+ orgInput.value = file.meta.org || '';
+ }
+
+ if (repoInput.value == '')
+ {
+ repoInput.value = file.meta.repo || '';
+ }
+ }
+
var td = pathInput.parentNode.previousSibling;
td.innerHTML = '';
mxUtils.write(td, mxResources.get((fPath) ? 'path' : 'folder'));
diff --git a/war/js/diagramly/GitHubClient.js b/war/js/diagramly/GitHubClient.js
index b6893ff8..c3c8c852 100644
--- a/war/js/diagramly/GitHubClient.js
+++ b/war/js/diagramly/GitHubClient.js
@@ -344,7 +344,8 @@ GitHubClient.prototype.createGitHubFile = function(org, repo, ref, req, asLibrar
{
var data = JSON.parse(req.getText());
var meta = {'org': org, 'repo': repo, 'ref': ref, 'name': data.name,
- 'path': data.path, 'sha': data.sha, 'download_url': data.download_url};
+ 'path': data.path, 'sha': data.sha, 'html_url': data.html_url,
+ 'download_url': data.download_url};
var content = data.content;
if (data.encoding === 'base64')
@@ -403,8 +404,8 @@ GitHubClient.prototype.insertFile = function(filename, data, success, error, asL
// Does not insert file here as there is another writeFile implicit via fileCreated
if (!asLibrary)
{
- success(new GitHubFile(this.ui, data, {'org': org, 'repo': repo,
- 'ref': ref, 'name': filename, 'path': path}));
+ success(new GitHubFile(this.ui, data, {'org': org, 'repo': repo, 'ref': ref,
+ 'name': filename, 'path': path, 'sha': sha, isNew: true}));
}
else
{
@@ -532,7 +533,7 @@ GitHubClient.prototype.saveFile = function(file, success, error)
var ref = file.meta.ref;
var path = file.meta.path;
- this.showCommitDialog(file.meta.name, file.meta.sha == null, mxUtils.bind(this, function(message)
+ this.showCommitDialog(file.meta.name, file.meta.sha == null || file.meta.isNew, mxUtils.bind(this, function(message)
{
var data = (window.btoa) ? btoa(file.getData()) : Base64.encode(file.getData());
@@ -540,8 +541,8 @@ GitHubClient.prototype.saveFile = function(file, success, error)
{
this.writeFile(org, repo, ref, path, message, data, sha, mxUtils.bind(this, function(req)
{
- var data = JSON.parse(req.getText());
- success(data.content.sha);
+ delete file.meta.isNew;
+ success(JSON.parse(req.getText()));
}), mxUtils.bind(this, function(err)
{
// Handles special conflict case where overwrite needs an update of the sha
diff --git a/war/js/diagramly/GitHubFile.js b/war/js/diagramly/GitHubFile.js
index 8f8c0ccb..b5f0595e 100644
--- a/war/js/diagramly/GitHubFile.js
+++ b/war/js/diagramly/GitHubFile.js
@@ -157,7 +157,7 @@ GitHubFile.prototype.saveFile = function(title, revision, success, error)
var modified = this.isModified();
this.setModified(false);
- this.ui.gitHub.saveFile(this, mxUtils.bind(this, function(sha)
+ this.ui.gitHub.saveFile(this, mxUtils.bind(this, function(commit)
{
this.savingFile = false;
this.isModified = prevModified;
@@ -167,8 +167,8 @@ GitHubFile.prototype.saveFile = function(title, revision, success, error)
success();
}
- // No sha means save was cancelled
- if (sha == null)
+ // No commit means save was cancelled
+ if (commit == null)
{
this.setModified(modified || this.isModified());
@@ -179,7 +179,10 @@ GitHubFile.prototype.saveFile = function(title, revision, success, error)
}
else
{
- this.meta.sha = sha;
+ this.meta.sha = commit.content.sha;
+ this.meta.html_url = commit.content.html_url;
+ this.meta.download_url = commit.content.download_url;
+
this.contentChanged();
}
}),
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index 2c6e72ab..003b2513 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+w.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.1.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.1.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 74c40b4b..8b2c93da 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -184,7 +184,7 @@ f)+"\n"+s+"}":"{"+w.join(",")+"}";f=s;return r}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=mxLoadResources=!1,mxLanguage="en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.1.0.0",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"6.1.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index 71dea300..d2df8085 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -4,10 +4,10 @@ var mxBasePath="https://www.draw.io/mxgraph/",mxLoadStylesheets=!1;
c[d])}return a}function g(a){this.opts=f(a||{},g.defaults,r)}function k(){function c(b,d){return a("\x3c"+b+' xmlns\x3d"urn:schemas-microsoft.com:vml" class\x3d"spin-vml"\x3e',d)}p.addRule(".spin-vml","behavior:url(#default#VML)");g.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:m+" "+m,coordorigin:-l+" "+-l}),{width:m,height:m})}function k(a,g,m){b(n,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~g}),b(e(c("roundrect",{arcsize:d.corners}),{width:l,height:d.width,left:d.radius,
top:-d.width>>1,filter:m}),c("fill",{color:"string"==typeof d.color?d.color:d.color[a%d.color.length],opacity:d.opacity}),c("stroke",{opacity:0}))))}var g,l=d.length+d.width,m=2*l;g=2*-(d.width+d.length)+"px";var n=e(f(),{position:"absolute",top:g,left:g});if(d.shadow)for(g=1;g<=d.lines;g++)k(g,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius\x3d2,makeshadow\x3d1,shadowopacity\x3d.3)");for(g=1;g<=d.lines;g++)k(g);return b(a,n)};g.prototype.opacity=function(a,b,c,d){a=a.firstChild;d=d.shadow&&
d.lines||0;a&&b+d<a.childNodes.length&&(a=a.childNodes[b+d],a=a&&a.firstChild,a=a&&a.firstChild,a&&(a.opacity=c))}}var l,m=["webkit","Moz","ms","O"],n={},p=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),r={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:0.25,fps:20,zIndex:2E9,className:"spinner",top:"50%",left:"50%",position:"absolute"};g.defaults={};f(g.prototype,
-{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width;if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!l){var k,g=0,m=(d.lines-1)*(1-d.direction)/2,n=d.fps,p=n/d.speed,r=(1-d.opacity)/(p*d.trail/100),s=p/d.lines;!function G(){g++;for(var a=0;a<d.lines;a++)k=Math.max(1-(g+(d.lines-a)*s)%p*r,d.opacity),c.opacity(f,
-a*d.direction+m,k,d);c.timeout=c.el&&setTimeout(G,~~(1E3/n))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function k(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*m+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var g,
+{spin:function(b){this.stop();var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width;if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!l){var k,g=0,m=(d.lines-1)*(1-d.direction)/2,n=d.fps,p=n/d.speed,r=(1-d.opacity)/(p*d.trail/100),u=p/d.lines;!function H(){g++;for(var a=0;a<d.lines;a++)k=Math.max(1-(g+(d.lines-a)*u)%p*r,d.opacity),c.opacity(f,
+a*d.direction+m,k,d);c.timeout=c.el&&setTimeout(H,~~(1E3/n))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function k(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*m+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var g,
m=0,n=(f.lines-1)*(1-f.direction)/2;m<f.lines;m++)g=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:l&&c(f.opacity,f.trail,n+m*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(g,e(k("#000","0 0 4px #000"),{top:"2px"})),b(d,b(g,k("string"==typeof f.color?f.color:f.color[m%f.color.length],"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});
-var s=e(a("group"),{behavior:"url(#default#VML)"});return!d(s,"transform")&&s.adj?k():l=d(s,"animation"),g});
+var u=e(a("group"),{behavior:"url(#default#VML)"});return!d(u,"transform")&&u.adj?k():l=d(u,"animation"),g});
(function(){var a=void 0,b=!0,c=null,d=!1,e=["aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato transparent turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),"all-scroll col-resize crosshair default e-resize hand help move n-resize ne-resize no-drop not-allowed nw-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait".split(" "),
"armenian decimal decimal-leading-zero disc georgian lower-alpha lower-greek lower-latin lower-roman square upper-alpha upper-latin upper-roman".split(" "),"100 200 300 400 500 600 700 800 900 bold bolder lighter".split(" "),"block-level inline-level table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group".split(" "),"condensed expanded extra-condensed extra-expanded narrower semi-condensed semi-expanded ultra-condensed ultra-expanded wider".split(" "),
"inherit inline inline-block inline-box inline-flex inline-grid inline-list-item inline-stack inline-table run-in".split(" "),"behind center-left center-right far-left far-right left-side leftwards right-side rightwards".split(" "),"large larger small smaller x-large x-small xx-large xx-small".split(" "),"dashed dotted double groove outset ridge solid".split(" "),"ease ease-in ease-in-out ease-out linear step-end step-start".split(" "),"at closest-corner closest-side ellipse farthest-corner farthest-side".split(" "),
@@ -36,32 +36,32 @@ cssLitGroup:[e[36],e[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[e[0]
"rect()":{cssPropBits:5,cssLitGroup:[e[48],e[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[e[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius","rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius",
"scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay","translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"},g;for(g in f)"string"===typeof f[g]&&Object.hasOwnProperty.call(f,g)&&(f[g]=f[f[g]]);"undefined"!==typeof window&&(window.cssSchema=f);var k,l;(function(){function a(b){var c=
parseInt(b.substring(1),16);return 65535<c?(c-=65536,String.fromCharCode(55296+(c>>10),56320+(c&1023))):c==c?String.fromCharCode(c):" ">b[1]?"":b[1]}function b(a,c){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,c)+'"'}function c(a){return e[a]||(e[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function d(a){return f[a]||(f[a]=("\u0010">a?"%0":"%")+a.charCodeAt(0).toString(16))}var e={"\\":"\\\\"},f={"\\":"%5c"},g=RegExp("\\uFEFF|U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?|url[(][\\t\\n\\f ]*(?:\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)[\\t\\n\\f ]*[)]|(?!url[(])-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*[(]|(?:@?-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))|#)(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*|\"(?:'|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*\"|'(?:\"|[^'\"\\n\\f\\\\]|\\\\[\\s\\S])*'|[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)(?:%|-?(?:[a-zA-Z_]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))(?:[a-zA-Z0-9_-]|[\\u0080-\\ud7ff\\ue000-\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]|\\\\(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff]))*)?|\x3c!--|--\x3e|[\\t\\n\\f ]+|/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)|[~|^$*]\x3d|[^\"'\\\\/]|/(?![/*])",
-"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(b){return b.replace(m,a)};k=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",k=0,m=a.length;k<m;++k){var p=l(a[k]),r=p.length,s=p.charCodeAt(0),p=34==s||39==s?b(p.substring(1,r-1),c):47==s&&1<r||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
-p||32>=s?" ":/url\(/i.test(p)?"url("+b(p.replace(n,""),d)+")":p;if(f!=p||" "!=p)a[e++]=f=p}a.length=e;return a}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function a(b){b=(""+b).match(n);return!b?c:new k(g(b[1]),g(b[2]),g(b[3]),g(b[4]),g(b[5]),g(b[6]),g(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):c}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a===
+"gi"),m=RegExp("\\\\(?:(?:[0-9a-fA-F]{1,6}[\\t\\n\\f ]?|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|[\\ud800-\\udbff][\\udc00-\\udfff])|[\\n\\f])","g"),n=RegExp("^url\\([\\t\\n\\f ]*[\"']?|[\"']?[\\t\\n\\f ]*\\)$","gi");l=function(b){return b.replace(m,a)};k=function(a){a=(""+a).replace(/\r\n?/g,"\n").match(g)||[];for(var e=0,f=" ",k=0,m=a.length;k<m;++k){var p=l(a[k]),r=p.length,u=p.charCodeAt(0),p=34==u||39==u?b(p.substring(1,r-1),c):47==u&&1<r||"\\"==p||"--\x3e"==p||"\x3c!--"==p||"\ufeff"==
+p||32>=u?" ":/url\(/i.test(p)?"url("+b(p.replace(n,""),d)+")":p;if(f!=p||" "!=p)a[e++]=f=p}a.length=e;return a}})();"undefined"!==typeof window&&(window.lexCss=k,window.decodeCss=l);var m=function(){function a(b){b=(""+b).match(n);return!b?c:new k(g(b[1]),g(b[2]),g(b[3]),g(b[4]),g(b[5]),g(b[6]),g(b[7]))}function b(a,e){return"string"==typeof a?encodeURI(a).replace(e,d):c}function d(a){a=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(a>>4&15)+"0123456789ABCDEF".charAt(a&15)}function e(a){if(a===
c)return c;a=a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/");for(var b=l,d;(d=a.replace(b,"$1"))!=a;a=d);return a}function f(a,b){var c=a.T(),d=b.K();d?c.ga(b.j):d=b.X();d?c.da(b.n):d=b.Y();d?c.ea(b.k):d=b.$();var k=b.g,g=e(k);if(d)c.ca(b.V()),g=g&&g.replace(m,"");else if(d=!!k){if(47!==g.charCodeAt(0))var g=e(c.g||"").replace(m,""),l=g.lastIndexOf("/")+1,g=e((l?g.substring(0,l):"")+e(k)).replace(m,"")}else g=g&&g.replace(m,""),g!==k&&c.G(g);d?c.G(g):d=b.aa();d?c.O(b.l):d=b.Z();d&&c.fa(b.o);
return c}function k(a,b,c,d,e,f,g){this.j=a;this.n=b;this.k=c;this.h=d;this.g=e;this.l=f;this.o=g}function g(a){return"string"==typeof a&&0<a.length?a:c}var l=RegExp(/(\/|^)(?:[^./][^/]*|\.{2,}(?:[^./][^/]*)|\.{3,}[^/]*)\/\.\.(?:\/|$)/),m=/^(?:\.\.\/)*(?:\.\.$)?/;k.prototype.toString=function(){var a=[];c!==this.j&&a.push(this.j,":");c!==this.k&&(a.push("//"),c!==this.n&&a.push(this.n,"@"),a.push(this.k),c!==this.h&&a.push(":",this.h.toString()));c!==this.g&&a.push(this.g);c!==this.l&&a.push("?",
this.l);c!==this.o&&a.push("#",this.o);return a.join("")};k.prototype.T=function(){return new k(this.j,this.n,this.k,this.h,this.g,this.l,this.o)};k.prototype.W=function(){return this.j&&decodeURIComponent(this.j).toLowerCase()};k.prototype.ga=function(a){this.j=a?a:c};k.prototype.K=function(){return c!==this.j};k.prototype.da=function(a){this.n=a?a:c};k.prototype.X=function(){return c!==this.n};k.prototype.ea=function(a){this.k=a?a:c;this.G(this.g)};k.prototype.Y=function(){return c!==this.k};k.prototype.V=
function(){return this.h&&decodeURIComponent(this.h)};k.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=c};k.prototype.$=function(){return c!==this.h};k.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};k.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=c};k.prototype.O=function(a){this.l=a?a:c};k.prototype.aa=function(){return c!==this.l};k.prototype.ba=function(a){if("object"===typeof a&&
!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="\x26",e&&b.push("\x3d",encodeURIComponent(e.toString()));this.l=b.join("")};k.prototype.fa=function(a){this.o=a?a:c};k.prototype.Z=function(){return c!==this.o};var n=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,
p=/[#\/\?@]/g,r=/[\#\?]/g;k.parse=a;k.create=function(a,e,f,g,l,m,n){a=new k(b(a,p),b(e,p),"string"==typeof f?encodeURIComponent(f):c,0<g?g.toString():c,b(l,r),c,"string"==typeof n?encodeURIComponent(n):c);m&&("string"===typeof m?a.O(m.replace(/[^?&=0-9A-Za-z_\-~.%]/g,d)):a.ba(m));return a};k.N=f;k.ma=e;k.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},N:function(b,c){return b?f(a(b),a(c)).toString():""+c}};return k}();"undefined"!==typeof window&&(window.URI=
-m);var n=a,p=a,r=a,s=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(E,k)+'")':'url("about:blank")'}function k(a){return C[a]}function g(a,b){return a?m.ha.N(a,b):b}function t(a,b,d){if(!d)return c;var e=(""+a).match(D);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function A(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var E=/[\n\f\r\"\'()*<>]/g,C={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
-"\x3c":"%3c","\x3e":"%3e"},D=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function R(b,c,d,k,m){b=A(b);var n=f[b];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,r=p&80,s=p&1536,q=NaN,G=0,u=0;G<c.length;++G){var D=c[G].toLowerCase(),x=D.charCodeAt(0),F,H,C,E,Q,ga;if(32===x)D="";else if(34===x)D=16===r?d?e(t(g(k,l(c[G].substring(1,D.length-1))),b,d)):"":p&8&&!(r&r-1)?D:"";else if("inherit"!==D){if(Q=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
-{};for(var $=Q.length;0<=--$;)for(var ha=Q[$],ka=ha.length;0<=--ka;)ea[ha[ka]]=a;ea=n.cssLitMap=ea}Q=ea}else Q=a;if(!(ga=Q,ga[A(D)]===a))if(35===x&&/^#(?:[0-9a-f]{3}){1,2}$/.test(D))D=p&2?D:"";else if(48<=x&&57>=x)D=p&1?D:"";else if(F=D.charCodeAt(1),H=D.charCodeAt(2),C=48<=F&&57>=F,E=48<=H&&57>=H,43===x&&(C||46===F&&E))D=p&1?(C?"":"0")+D.substring(1):"";else if(45===x&&(C||46===F&&E))D=p&4?(C?"-":"-0")+D.substring(1):p&1?"0":"";else if(46===x&&C)D=p&1?"0"+D:"";else if('url("'===D.substring(0,5))D=
-d&&p&16?e(t(g(k,c[G].substring(5,D.length-2)),b,d)):"";else if("("===D.charAt(D.length-1))a:{Q=c;ea=G;D=1;$=ea+1;for(x=Q.length;$<x&&D;)ha=Q[$++],D+=")"===ha?-1:/^[^"']*\($/.test(ha);if(!D){D=Q[ea].toLowerCase();x=A(D);Q=Q.splice(ea,$-ea,"");ea=n.cssFns;$=0;for(ha=ea.length;$<ha;++$)if(ea[$].substring(0,x.length)==x){Q[0]=Q[Q.length-1]="";R(ea[$],Q,d,k);D=D+Q.join(" ")+")";break a}}D=""}else D=s&&/^-?[a-z_][\w\-]*$/.test(D)&&!/__$/.test(D)?m&&512===s?c[G]+m:1024===s&&f[D]&&"number"===typeof f[D].oa?
-D:"":/^\w+$/.test(D)&&64===r&&p&8?q+1===u?(c[q]=c[q].substring(0,c[q].length-1)+" "+D+'"',""):(q=u,'"'+D+'"'):""}D&&(c[u++]=D)}1===u&&'url("about:blank")'===c[0]&&(u=0);c.length=u}}}();var G=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
-H={};H["\x3e"]=H["+"]=H["~"]=H;p=function(a,e,f){function k(p,r){function s(c,f,k){var g,n,p,r,t,D=b;g="";if(c<f)if(t=a[c],"*"===t)++c,g=t;else if(/^[a-zA-Z]/.test(t)&&(n=m(t.toLowerCase(),[])))"tagName"in n&&(t=n.tagName),++c,g=t;for(r=p=n="";D&&c<f;++c)if(t=a[c],"#"===t.charAt(0))/^#_|__$|[^\w#:\-]/.test(t)?D=d:n+=t+l;else if("."===t)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(t=a[c])&&!/^_|__$/.test(t)?n+="."+t:D=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();t=u.m[g+"::"+v];t!==+t&&(t=u.m["*::"+
-v]);var x;e.ia?(x=e.ia(g,v),"string"!==typeof x&&(D=d,x=v),D&&t!==+t&&(t=u.d.NONE)):(x=v,t!==+t&&(D=d));var F=v="",y=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],F=a[c++],/^[0-9A-Za-z:_\-]+$/.test(F)?F='"'+F+'"':"]"===F&&(F='""',--c),/^"([^\"\\]|\\.)*"$/.test(F)||(D=d),(y="i"===a[c])&&++c);"]"!==a[c]&&(++c,D=d);switch(t){case u.d.CLASSES:case u.d.LOCAL_NAME:case u.d.NONE:break;case u.d.GLOBAL_NAME:case u.d.ID:case u.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=F&&!y?F='"'+F.substring(1,F.length-
-1)+l+'"':"|\x3d"===v||""===v||(D=d);break;case u.d.URI:case u.d.URI_FRAGMENT:""!==v&&(D=d);break;default:D=d}D&&(p+="["+x.replace(/[^\w-]/g,"\\$\x26")+v+F+(y?" i]":"]"))}else if(c<f&&":"===a[c])if(t=a[++c],G.test(t))r+=":"+t;else break;else break;c!==f&&(D=d);D&&(c=(g+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+k)&&q.push(c);return D}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var q=[],t=p,D=b,v=p;D&&v<r;++v){var x=a[v];if(H[x]===H||" "===x)s(t,v,x)?t=v+1:D=d}s(t,r,"")||(D=d);return D?(q.length&&(t=
-q.join(""),g!==c&&(t="."+g+" "+t),n.push(t)),b):!f||f(a.slice(p,r))}var g=e.na,l=e.L,m=e.Aa,n=[],p=0,r,s=0,q;for(r=0;r<a.length;++r)if(q=a[r],"("==q||"["==q?(++s,b):")"==q||"]"==q?(s&&--s,b):!(" "==a[r]&&(s||H[a[r-1]]===H||H[a[r+1]]===H)))a[p++]=a[r];a.length=p;p=a.length;for(r=s=0;r<p;++r)if(","===a[r]){if(!k(s,r))return c;s=r+1}return!k(s,p)?c:n};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
-"i");s=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,k=/^\s*url\s*[(]([^)]*)[)]\s*$/,g;return(g=/^\s*["]([^"]*)["]\s*$/.exec(a))||(g=b.exec(a))||(g=d.exec(a))||(g=f.exec(a))||(g=k.exec(a))?g[1]:c}function f(k,l,m,r,G,u,D){function v(){C=
-H.length&&H[H.length-1]===c}var x=a,F=D||[0],H=[],C=d;q(l,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(a,b){if(C)a=c;else if("@media"===a)x.push("@media"," ",s(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(x.push(a," ",d+m.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof u){var l=s(b.slice(1));if("not all"!==l){++F[0];var n=[];x.push(n);var p=t(g(k,e(b[0])),function(a){var b=
-f(p,a.qa,m,r,G,u,F);--F[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;n[0]=a;u(a,!!F[0])},G)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");C=!a;H.push(a)},endAtrule:function(){H.pop();C||x.push(";");v()},startBlock:function(){C||x.push("{")},endBlock:function(){C||(x.push("}"),C=b)},startRuleset:function(d){if(!C){var e=a;"@keyframes"===H[H.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
-C=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,m),!d||!d.length?C=b:e=d.join(", "));C||x.push(e,"{")}H.push(c)},endRuleset:function(){H.pop();C||x.push("}");v()},declaration:function(a,c){if(!C){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);n(a,c,r,k,m.L);c.length&&x.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!F[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
-typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=s);var q,t;(function(){function a(b,d,e,f,k){for(var g=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(k||";"===b[d])){k=g+1;var l=d;k<e&&" "===b[k]&&++k;l>k&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[g].toLowerCase(),b.slice(k,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,k,g){++f;for(g.startBlock&&g.startBlock();f<k;){var l=
+m);var n=a,p=a,r=a,u=a;(function(){function e(a){return"string"===typeof a?'url("'+a.replace(A,k)+'")':'url("about:blank")'}function k(a){return D[a]}function g(a,b){return a?m.ha.N(a,b):b}function s(a,b,d){if(!d)return c;var e=(""+a).match(C);return e&&(!e[1]||F.test(e[1]))?d(a,b):c}function E(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,"")}var A=/[\n\f\r\"\'()*<>]/g,D={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a",
+"\x3c":"%3c","\x3e":"%3e"},C=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;n=function(){var a={};return function R(b,c,d,k,m){b=E(b);var n=f[b];if(!n||"object"!==typeof n)c.length=0;else{for(var p=n.cssPropBits,r=p&80,u=p&1536,q=NaN,H=0,t=0;H<c.length;++H){var C=c[H].toLowerCase(),x=C.charCodeAt(0),F,G,D,A,Q,ga;if(32===x)C="";else if(34===x)C=16===r?d?e(s(g(k,l(c[H].substring(1,C.length-1))),b,d)):"":p&8&&!(r&r-1)?C:"";else if("inherit"!==C){if(Q=n.cssLitGroup){var ea;if(!(ea=n.cssLitMap)){ea=
+{};for(var $=Q.length;0<=--$;)for(var ha=Q[$],ka=ha.length;0<=--ka;)ea[ha[ka]]=a;ea=n.cssLitMap=ea}Q=ea}else Q=a;if(!(ga=Q,ga[E(C)]===a))if(35===x&&/^#(?:[0-9a-f]{3}){1,2}$/.test(C))C=p&2?C:"";else if(48<=x&&57>=x)C=p&1?C:"";else if(F=C.charCodeAt(1),G=C.charCodeAt(2),D=48<=F&&57>=F,A=48<=G&&57>=G,43===x&&(D||46===F&&A))C=p&1?(D?"":"0")+C.substring(1):"";else if(45===x&&(D||46===F&&A))C=p&4?(D?"-":"-0")+C.substring(1):p&1?"0":"";else if(46===x&&D)C=p&1?"0"+C:"";else if('url("'===C.substring(0,5))C=
+d&&p&16?e(s(g(k,c[H].substring(5,C.length-2)),b,d)):"";else if("("===C.charAt(C.length-1))a:{Q=c;ea=H;C=1;$=ea+1;for(x=Q.length;$<x&&C;)ha=Q[$++],C+=")"===ha?-1:/^[^"']*\($/.test(ha);if(!C){C=Q[ea].toLowerCase();x=E(C);Q=Q.splice(ea,$-ea,"");ea=n.cssFns;$=0;for(ha=ea.length;$<ha;++$)if(ea[$].substring(0,x.length)==x){Q[0]=Q[Q.length-1]="";R(ea[$],Q,d,k);C=C+Q.join(" ")+")";break a}}C=""}else C=u&&/^-?[a-z_][\w\-]*$/.test(C)&&!/__$/.test(C)?m&&512===u?c[H]+m:1024===u&&f[C]&&"number"===typeof f[C].oa?
+C:"":/^\w+$/.test(C)&&64===r&&p&8?q+1===t?(c[q]=c[q].substring(0,c[q].length-1)+" "+C+'"',""):(q=t,'"'+C+'"'):""}C&&(c[t++]=C)}1===t&&'url("about:blank")'===c[0]&&(t=0);c.length=t}}}();var H=RegExp("^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$"),
+G={};G["\x3e"]=G["+"]=G["~"]=G;p=function(a,e,f){function k(p,r){function u(c,f,k){var g,n,p,r,s,C=b;g="";if(c<f)if(s=a[c],"*"===s)++c,g=s;else if(/^[a-zA-Z]/.test(s)&&(n=m(s.toLowerCase(),[])))"tagName"in n&&(s=n.tagName),++c,g=s;for(r=p=n="";C&&c<f;++c)if(s=a[c],"#"===s.charAt(0))/^#_|__$|[^\w#:\-]/.test(s)?C=d:n+=s+l;else if("."===s)++c<f&&/^[0-9A-Za-z:_\-]+$/.test(s=a[c])&&!/^_|__$/.test(s)?n+="."+s:C=d;else if(c+1<f&&"["===a[c]){++c;var v=a[c++].toLowerCase();s=t.m[g+"::"+v];s!==+s&&(s=t.m["*::"+
+v]);var x;e.ia?(x=e.ia(g,v),"string"!==typeof x&&(C=d,x=v),C&&s!==+s&&(s=t.d.NONE)):(x=v,s!==+s&&(C=d));var F=v="",y=d;/^[~^$*|]?=$/.test(a[c])&&(v=a[c++],F=a[c++],/^[0-9A-Za-z:_\-]+$/.test(F)?F='"'+F+'"':"]"===F&&(F='""',--c),/^"([^\"\\]|\\.)*"$/.test(F)||(C=d),(y="i"===a[c])&&++c);"]"!==a[c]&&(++c,C=d);switch(s){case t.d.CLASSES:case t.d.LOCAL_NAME:case t.d.NONE:break;case t.d.GLOBAL_NAME:case t.d.ID:case t.d.IDREF:("\x3d"===v||"~\x3d"===v||"$\x3d"===v)&&'""'!=F&&!y?F='"'+F.substring(1,F.length-
+1)+l+'"':"|\x3d"===v||""===v||(C=d);break;case t.d.URI:case t.d.URI_FRAGMENT:""!==v&&(C=d);break;default:C=d}C&&(p+="["+x.replace(/[^\w-]/g,"\\$\x26")+v+F+(y?" i]":"]"))}else if(c<f&&":"===a[c])if(s=a[++c],H.test(s))r+=":"+s;else break;else break;c!==f&&(C=d);C&&(c=(g+n).replace(/[^ .*#\w-]/g,"\\$\x26")+p+r+k)&&q.push(c);return C}" "===a[p]&&++p;r-1!==p&&" "===a[r]&&--r;for(var q=[],s=p,C=b,v=p;C&&v<r;++v){var x=a[v];if(G[x]===G||" "===x)u(s,v,x)?s=v+1:C=d}u(s,r,"")||(C=d);return C?(q.length&&(s=
+q.join(""),g!==c&&(s="."+g+" "+s),n.push(s)),b):!f||f(a.slice(p,r))}var g=e.na,l=e.L,m=e.Aa,n=[],p=0,r,u=0,q;for(r=0;r<a.length;++r)if(q=a[r],"("==q||"["==q?(++u,b):")"==q||"]"==q?(u&&--u,b):!(" "==a[r]&&(u||G[a[r-1]]===G||G[a[r+1]]===G)))a[p++]=a[r];a.length=p;p=a.length;for(r=u=0;r<p;++r)if(","===a[r]){if(!k(u,r))return c;u=r+1}return!k(u,p)?c:n};(function(){var a=/^\w/,b=RegExp("^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))(?: and ?\\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\\))*))*$",
+"i");u=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var k=c[f];" "!=k&&(c[e++]=k)}c.length=e;c=c.join(" ");return!c.length?"":!b.test(c)?"not all":a.test(c)?c:"not all , "+c}})();(function(){function e(a){var b=/^\s*[']([^']*)[']\s*$/,d=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,k=/^\s*url\s*[(]([^)]*)[)]\s*$/,g;return(g=/^\s*["]([^"]*)["]\s*$/.exec(a))||(g=b.exec(a))||(g=d.exec(a))||(g=f.exec(a))||(g=k.exec(a))?g[1]:c}function f(k,l,m,r,H,t,C){function v(){G=
+D.length&&D[D.length-1]===c}var x=a,F=C||[0],D=[],G=d;q(l,{startStylesheet:function(){x=[]},endStylesheet:function(){},startAtrule:function(a,b){if(G)a=c;else if("@media"===a)x.push("@media"," ",u(b));else if("@keyframes"===a||"@-webkit-keyframes"===a){var d=b[0];1===b.length&&!/__$|[^\w\-]/.test(d)?(x.push(a," ",d+m.L),a="@keyframes"):a=c}else if("@import"===a&&0<b.length)if(a=c,"function"===typeof t){var l=u(b.slice(1));if("not all"!==l){++F[0];var n=[];x.push(n);var p=s(g(k,e(b[0])),function(a){var b=
+f(p,a.qa,m,r,H,t,F);--F[0];a=l?{toString:function(){return"@media "+l+" {"+b.result+"}"}}:b.result;n[0]=a;t(a,!!F[0])},H)}}else window.console&&window.console.log("@import "+b.join(" ")+" elided");G=!a;D.push(a)},endAtrule:function(){D.pop();G||x.push(";");v()},startBlock:function(){G||x.push("{")},endBlock:function(){G||(x.push("}"),G=b)},startRuleset:function(d){if(!G){var e=a;"@keyframes"===D[D.length-1]?(e=d.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
+G=!e,e&&(e=e[0].replace(/ +/g,""))):(d=p(d,m),!d||!d.length?G=b:e=d.join(", "));G||x.push(e,"{")}D.push(c)},endRuleset:function(){D.pop();G||x.push("}");v()},declaration:function(a,c){if(!G){var e=d,f=c.length;2<=f&&"!"===c[f-2]&&"important"===c[f-1].toLowerCase()&&(e=b,c.length-=2);n(a,c,r,k,m.L);c.length&&x.push(a,":",c.join(" "),e?" !important;":";")}}});return{result:{toString:function(){return x.join("")}},va:!!F[0]}}r=function(b,c,d,e){return f(b,c,d,e,a,a).result.toString()}})()})();"undefined"!==
+typeof window&&(window.sanitizeCssProperty=n,window.sanitizeCssSelectorList=p,window.sanitizeStylesheet=r,window.sanitizeMediaQuery=u);var q,s;(function(){function a(b,d,e,f,k){for(var g=d++;d<e&&"{"!==b[d]&&";"!==b[d];)++d;if(d<e&&(k||";"===b[d])){k=g+1;var l=d;k<e&&" "===b[k]&&++k;l>k&&" "===b[l-1]&&--l;f.startAtrule&&f.startAtrule(b[g].toLowerCase(),b.slice(k,l));d="{"===b[d]?c(b,d,e,f):d+1;f.endAtrule&&f.endAtrule()}return d}function c(b,f,k,g){++f;for(g.startBlock&&g.startBlock();f<k;){var l=
b[f].charAt(0);if("}"==l){++f;break}f=" "===l||";"===l?f+1:"@"===l?a(b,f,k,g,d):"{"===l?c(b,f,k,g):e(b,f,k,g)}g.endBlock&&g.endBlock();return f}function e(a,c,d,k){var g=c,m=f(a,c,d,b);if(0>m)return m=~m,m===g?m+1:m;var n=a[m];if("{"!==n)return m===g?m+1:m;c=m+1;m>g&&" "===a[m-1]&&--m;for(k.startRuleset&&k.startRuleset(a.slice(g,m));c<d;){n=a[c];if("}"===n){++c;break}c=" "===n?c+1:l(a,c,d,k)}k.endRuleset&&k.endRuleset();return c}function f(a,b,c,d){for(var e,k=[],g=-1;b<c;++b)if(e=a[b].charAt(0),
-"["===e||"("===e)k[++g]=e;else if("]"===e&&"["===k[g]||")"===e&&"("===k[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=g&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!m.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var n=f(a,b,c,d);if(0>n)n=~n;else{for(var p=[],r=0,s=b;s<n;++s)b=a[s]," "!==b&&(p[r++]=b);if(n<c){do{b=a[n];
-if(";"===b||"}"===b)break;r=0}while(++n<c);";"===b&&++n}r&&e.declaration&&e.declaration(k.toLowerCase(),p)}return n}q=function(c,d){var f=k(c);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?a(f,g,l,d,b):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var m=/^-?[a-z]/i;t=function(a,b){for(var c=k(a),d=0,e=c.length;d<e;)d=" "!==c[d]?l(c,d,e,b):d+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
-t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};u.atype=u.d;u.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
+"["===e||"("===e)k[++g]=e;else if("]"===e&&"["===k[g]||")"===e&&"("===k[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;0<=g&&(b=~(b+1));return b}function g(a,b,c){for(;b<c&&";"!==a[b]&&"}"!==a[b];)++b;return b<c&&";"===a[b]?b+1:b}function l(a,b,c,e){var k=a[b++];if(!m.test(k))return g(a,b,c);b<c&&" "===a[b]&&++b;if(b==c||":"!==a[b])return g(a,b,c);++b;b<c&&" "===a[b]&&++b;var n=f(a,b,c,d);if(0>n)n=~n;else{for(var p=[],r=0,u=b;u<n;++u)b=a[u]," "!==b&&(p[r++]=b);if(n<c){do{b=a[n];
+if(";"===b||"}"===b)break;r=0}while(++n<c);";"===b&&++n}r&&e.declaration&&e.declaration(k.toLowerCase(),p)}return n}q=function(c,d){var f=k(c);d.startStylesheet&&d.startStylesheet();for(var g=0,l=f.length;g<l;)g=" "===f[g]?g+1:g<l?"@"===f[g].charAt(0)?a(f,g,l,d,b):e(f,g,l,d):g;d.endStylesheet&&d.endStylesheet()};var m=/^-?[a-z]/i;s=function(a,b){for(var c=k(a),d=0,e=c.length;d<e;)d=" "!==c[d]?l(c,d,e,b):d+1}})();"undefined"!==typeof window&&(window.parseCssStylesheet=q,window.parseCssDeclarations=
+s);var t={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13}};t.atype=t.d;t.m={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,
"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,"*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::tabindex":0,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,
"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"audio::src":1,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,
"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,
@@ -71,45 +71,45 @@ t);var u={d:{NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,
"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,
"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,
"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,
-"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};u.ATTRIBS=u.m;u.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};u.eflags=
-u.c;u.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
-kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};u.ELEMENTS=u.f;u.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
+"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0};t.ATTRIBS=t.m;t.c={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256};t.eflags=
+t.c;t.f={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:4,img:2,input:2,ins:0,isindex:274,
+kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2};t.ELEMENTS=t.f;t.Q={a:"HTMLAnchorElement",abbr:"HTMLElement",
acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",
col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",
frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",
li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
-time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};u.ELEMENT_DOM_INTERFACES=u.Q;u.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};u.ueffects=u.P;u.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-u.URIEFFECTS=u.J;u.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};u.ltypes=u.M;u.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};u.LOADERTYPES=u.I;"undefined"!==typeof window&&(window.html4=u);e=function(e){function f(a,b){var c;if(M.hasOwnProperty(b))c=M[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(Y))?String.fromCharCode(parseInt(d[1],
+time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};t.ELEMENT_DOM_INTERFACES=t.Q;t.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};t.ueffects=t.P;t.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
+t.URIEFFECTS=t.J;t.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};t.ltypes=t.M;t.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};t.LOADERTYPES=t.I;"undefined"!==typeof window&&(window.html4=t);e=function(e){function f(a,b){var c;if(M.hasOwnProperty(b))c=M[b];else{var d=b.match(I);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(Y))?String.fromCharCode(parseInt(d[1],
16)):J&&L.test(b)?(J.innerHTML="\x26"+b+";",d=J.textContent,M[b]=d):"\x26"+b+";"}return c}function k(a){return a.replace(S,f)}function g(a){return(""+a).replace(ba,"\x26amp;").replace(Z,"\x26lt;").replace(aa,"\x26gt;").replace(U,"\x26#34;")}function l(a){return a.replace(P,"\x26amp;$1").replace(Z,"\x26lt;").replace(aa,"\x26gt;")}function n(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,
-e){var f,k=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ga)f=f.split(k);else{for(var g=[],l=0,m;(m=k.exec(f))!==c;)g.push(f.substring(l,m.index)),g.push(m[0]),l=m.index+m[0].length;g.push(f.substring(l));f=g}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,k){try{a.H&&0==d&&a.H(k);for(var g,l,m,n=c.length;d<n;){var t=c[d++],u=c[d];switch(t){case "\x26":ca.test(u)?(a.e&&a.e("\x26"+u,k,$,p(a,c,d,f,k)),d++):a.e&&a.e("\x26amp;",k,$,p(a,c,d,f,k));break;case "\x3c/":if(g=
-/^([-\w:]+)[^\'\"]*/.exec(u))if(g[0].length===u.length&&"\x3e"===c[d+1])d+=2,m=g[1].toLowerCase(),a.t&&a.t(m,k,$,p(a,c,d,f,k));else{var B=c,D=d,x=a,Q=k,y=$,z=f,T=q(B,D);T?(x.t&&x.t(T.name,Q,y,p(x,B,D,z,Q)),d=T.next):d=B.length}else a.e&&a.e("\x26lt;/",k,$,p(a,c,d,f,k));break;case "\x3c":if(g=/^([-\w:]+)\s*\/?/.exec(u))if(g[0].length===u.length&&"\x3e"===c[d+1]){d+=2;m=g[1].toLowerCase();a.w&&a.w(m,[],k,$,p(a,c,d,f,k));var H=e.f[m];H&ea&&(d=s(c,{name:m,next:d,c:H},a,k,$,f))}else{var B=c,D=a,x=k,Q=
-$,y=f,M=q(B,d);M?(D.w&&D.w(M.name,M.R,x,Q,p(D,B,M.next,y,x)),d=M.c&ea?s(B,M,D,x,Q,y):M.next):d=B.length}else a.e&&a.e("\x26lt;",k,$,p(a,c,d,f,k));break;case "\x3c!--":if(!f.C){for(l=d+1;l<n&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<n){if(a.A){var A=c.slice(d,l).join("");a.A(A.substr(0,A.length-2),k,$,p(a,c,l+1,f,k))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",k,$,p(a,c,d,f,k));break;case "\x3c!":if(/^\w/.test(u)){if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",
-k,$,p(a,c,d,f,k))}else a.e&&a.e("\x26lt;!",k,$,p(a,c,d,f,k));break;case "\x3c?":if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",k,$,p(a,c,d,f,k));break;case "\x3e":a.e&&a.e("\x26gt;",k,$,p(a,c,d,f,k));break;case "":break;default:a.e&&a.e(t,k,$,p(a,c,d,f,k))}}a.B&&a.B(k)}catch(E){if(E!==$)throw E;}}function s(a,b,c,d,f,k){var g=a.length;ha.hasOwnProperty(b.name)||(ha[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var m=ha[b.name],n=b.next,r=b.next+1;r<g&&!("\x3c/"===
+e){var f,k=/(<\/|<\!--|<[!?]|[&<>])/g;f=a+"";if(ga)f=f.split(k);else{for(var g=[],l=0,m;(m=k.exec(f))!==c;)g.push(f.substring(l,m.index)),g.push(m[0]),l=m.index+m[0].length;g.push(f.substring(l));f=g}r(b,f,0,{r:d,C:d},e)}}function p(a,b,c,d,e){return function(){r(a,b,c,d,e)}}function r(a,c,d,f,k){try{a.H&&0==d&&a.H(k);for(var g,l,m,n=c.length;d<n;){var s=c[d++],t=c[d];switch(s){case "\x26":ca.test(t)?(a.e&&a.e("\x26"+t,k,$,p(a,c,d,f,k)),d++):a.e&&a.e("\x26amp;",k,$,p(a,c,d,f,k));break;case "\x3c/":if(g=
+/^([-\w:]+)[^\'\"]*/.exec(t))if(g[0].length===t.length&&"\x3e"===c[d+1])d+=2,m=g[1].toLowerCase(),a.t&&a.t(m,k,$,p(a,c,d,f,k));else{var B=c,C=d,x=a,Q=k,y=$,z=f,T=q(B,C);T?(x.t&&x.t(T.name,Q,y,p(x,B,C,z,Q)),d=T.next):d=B.length}else a.e&&a.e("\x26lt;/",k,$,p(a,c,d,f,k));break;case "\x3c":if(g=/^([-\w:]+)\s*\/?/.exec(t))if(g[0].length===t.length&&"\x3e"===c[d+1]){d+=2;m=g[1].toLowerCase();a.w&&a.w(m,[],k,$,p(a,c,d,f,k));var G=e.f[m];G&ea&&(d=u(c,{name:m,next:d,c:G},a,k,$,f))}else{var B=c,C=a,x=k,Q=
+$,y=f,M=q(B,d);M?(C.w&&C.w(M.name,M.R,x,Q,p(C,B,M.next,y,x)),d=M.c&ea?u(B,M,C,x,Q,y):M.next):d=B.length}else a.e&&a.e("\x26lt;",k,$,p(a,c,d,f,k));break;case "\x3c!--":if(!f.C){for(l=d+1;l<n&&!("\x3e"===c[l]&&/--$/.test(c[l-1]));l++);if(l<n){if(a.A){var E=c.slice(d,l).join("");a.A(E.substr(0,E.length-2),k,$,p(a,c,l+1,f,k))}d=l+1}else f.C=b}f.C&&a.e&&a.e("\x26lt;!--",k,$,p(a,c,d,f,k));break;case "\x3c!":if(/^\w/.test(t)){if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;!",
+k,$,p(a,c,d,f,k))}else a.e&&a.e("\x26lt;!",k,$,p(a,c,d,f,k));break;case "\x3c?":if(!f.r){for(l=d+1;l<n&&"\x3e"!==c[l];l++);l<n?d=l+1:f.r=b}f.r&&a.e&&a.e("\x26lt;?",k,$,p(a,c,d,f,k));break;case "\x3e":a.e&&a.e("\x26gt;",k,$,p(a,c,d,f,k));break;case "":break;default:a.e&&a.e(s,k,$,p(a,c,d,f,k))}}a.B&&a.B(k)}catch(A){if(A!==$)throw A;}}function u(a,b,c,d,f,k){var g=a.length;ha.hasOwnProperty(b.name)||(ha[b.name]=RegExp("^"+b.name+"(?:[\\s\\/]|$)","i"));for(var m=ha[b.name],n=b.next,r=b.next+1;r<g&&!("\x3c/"===
a[r-1]&&m.test(a[r]));r++);r<g&&(r-=1);g=a.slice(n,r).join("");if(b.c&e.c.CDATA)c.z&&c.z(g,d,f,p(c,a,r,k,d));else if(b.c&e.c.RCDATA)c.F&&c.F(l(g),d,f,p(c,a,r,k,d));else throw Error("bug");return r}function q(a,c){var f=/^([-\w:]+)/.exec(a[c]),g={};g.name=f[1].toLowerCase();g.c=e.f[g.name];for(var l=a[c].substr(f[0].length),m=c+1,n=a.length;m<n&&"\x3e"!==a[m];m++)l+=a[m];if(!(n<=m)){for(var p=[];""!==l;)if(f=Q.exec(l))if(f[4]&&!f[5]||f[6]&&!f[7]){for(var f=f[4]||f[6],r=d,l=[l,a[m++]];m<n;m++){if(r){if("\x3e"===
-a[m])break}else 0<=a[m].indexOf(f)&&(r=b);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var r=f[1].toLowerCase(),s;if(f[2]){s=f[3];var t=s.charCodeAt(0);if(34===t||39===t)s=s.substr(1,s.length-2);s=k(s.replace(O,""))}else s="";p.push(r,s);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");g.R=p;g.next=m+1;return g}}function t(b){function f(a,b){l||b.push(a)}var k,l;return n({startDoc:function(){k=[];l=d},startTag:function(d,f,m){if(!l&&e.f.hasOwnProperty(d)){var n=e.f[d];if(!(n&e.c.FOLDABLE)){var p=
-b(d,f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=n);if(n&e.c.OPTIONAL_ENDTAG){var s=k[k.length-1];s&&s.D===d&&(s.v!==r||d!==r)&&m.push("\x3c/",s.v,"\x3e")}n&e.c.EMPTY||k.push({D:d,v:r});m.push("\x3c",r);d=0;for(s=f.length;d<s;d+=2){var q=f[d],t=f[d+1];t!==c&&t!==a&&m.push(" ",q,'\x3d"',g(t),'"')}m.push("\x3e");n&e.c.EMPTY&&!(p&e.c.EMPTY)&&
+a[m])break}else 0<=a[m].indexOf(f)&&(r=b);l.push(a[m])}if(n<=m)break;l=l.join("")}else{var r=f[1].toLowerCase(),u;if(f[2]){u=f[3];var s=u.charCodeAt(0);if(34===s||39===s)u=u.substr(1,u.length-2);u=k(u.replace(O,""))}else u="";p.push(r,u);l=l.substr(f[0].length)}else l=l.replace(/^[\s\S][^a-z\s]*/,"");g.R=p;g.next=m+1;return g}}function s(b){function f(a,b){l||b.push(a)}var k,l;return n({startDoc:function(){k=[];l=d},startTag:function(d,f,m){if(!l&&e.f.hasOwnProperty(d)){var n=e.f[d];if(!(n&e.c.FOLDABLE)){var p=
+b(d,f);if(p){if("object"!==typeof p)throw Error("tagPolicy did not return object (old API?)");if("attribs"in p)f=p.attribs;else throw Error("tagPolicy gave no attribs");var r;"tagName"in p?(r=p.tagName,p=e.f[r]):(r=d,p=n);if(n&e.c.OPTIONAL_ENDTAG){var u=k[k.length-1];u&&u.D===d&&(u.v!==r||d!==r)&&m.push("\x3c/",u.v,"\x3e")}n&e.c.EMPTY||k.push({D:d,v:r});m.push("\x3c",r);d=0;for(u=f.length;d<u;d+=2){var q=f[d],s=f[d+1];s!==c&&s!==a&&m.push(" ",q,'\x3d"',g(s),'"')}m.push("\x3e");n&e.c.EMPTY&&!(p&e.c.EMPTY)&&
m.push("\x3c/",r,"\x3e")}else l=!(n&e.c.EMPTY)}}},endTag:function(a,b){if(l)l=d;else if(e.f.hasOwnProperty(a)){var c=e.f[a];if(!(c&(e.c.EMPTY|e.c.FOLDABLE))){if(c&e.c.OPTIONAL_ENDTAG)for(c=k.length;0<=--c;){var f=k[c].D;if(f===a)break;if(!(e.f[f]&e.c.OPTIONAL_ENDTAG))return}else for(c=k.length;0<=--c&&k[c].D!==a;);if(!(0>c)){for(f=k.length;--f>c;){var g=k[f].v;e.f[g]&e.c.OPTIONAL_ENDTAG||b.push("\x3c/",g,"\x3e")}c<k.length&&(a=k[c].v);k.length=c;b.push("\x3c/",a,"\x3e")}}}},pcdata:f,rcdata:f,cdata:f,
-endDoc:function(a){for(;k.length;k.length--)a.push("\x3c/",k[k.length-1].v,"\x3e")}})}function u(a,b,d,e,f){if(!f)return c;try{var k=m.parse(""+a);if(k&&(!k.K()||ka.test(k.W()))){var g=f(k,b,d,e);return g?g.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function R(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
-c;if(a.hasOwnProperty(b))return a[b]}function X(b,d,f,k,g){for(var l=0;l<d.length;l+=2){var m=d[l],n=d[l+1],p=n,r=c,s;if((s=b+"::"+m,e.m.hasOwnProperty(s))||(s="*::"+m,e.m.hasOwnProperty(s)))r=e.m[s];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:n=c;g&&K(g,b,m,p,n);break;case e.d.STYLE:if("undefined"===typeof B){n=c;g&&K(g,b,m,p,n);break}var q=[];B(n,{declaration:function(a,b){var d=a.toLowerCase();T(d,b,f?function(a){return u(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&q.push(d+
-": "+b.join(" "))}});n=0<q.length?q.join(" ; "):c;g&&K(g,b,m,p,n);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:n=k?k(n):n;g&&K(g,b,m,p,n);break;case e.d.URI:n=u(n,R(e.J,b,m),R(e.I,b,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:b},f);g&&K(g,b,m,p,n);break;case e.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=k?k(n):n,n!==c&&n!==a&&(n="#"+n)):n=c;g&&K(g,b,m,p,n);break;default:n=c,g&&K(g,b,m,p,n)}else n=c,g&&K(g,b,m,p,n);d[l+1]=n}return d}
-function V(b,c,d){return function(f,k){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:X(f,k,b,c,d)}}}function W(a,b){var c=[];t(b)(a,c);return c.join("")}var B,T;"undefined"!==typeof window&&(B=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,Y=/^#x([0-9A-Fa-f]+)$/,L=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
-c,O=/\0/g,S=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ba=/&/g,P=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,aa=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,$={},ha={},ka=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=g;da.ra=da.makeHtmlSanitizer=t;da.sa=da.makeSaxParser=n;da.ta=da.makeTagPolicy=V;da.wa=da.normalizeRCData=l;da.xa=
-da.sanitize=function(a,b,c,d){return W(a,V(b,c,d))};da.ya=da.sanitizeAttribs=X;da.za=da.sanitizeWithPolicy=W;da.Ba=da.unescapeEntities=k;return da}(u);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();
+endDoc:function(a){for(;k.length;k.length--)a.push("\x3c/",k[k.length-1].v,"\x3e")}})}function t(a,b,d,e,f){if(!f)return c;try{var k=m.parse(""+a);if(k&&(!k.K()||ka.test(k.W()))){var g=f(k,b,d,e);return g?g.toString():c}}catch(l){}return c}function K(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function R(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+
+c;if(a.hasOwnProperty(b))return a[b]}function X(b,d,f,k,g){for(var l=0;l<d.length;l+=2){var m=d[l],n=d[l+1],p=n,r=c,u;if((u=b+"::"+m,e.m.hasOwnProperty(u))||(u="*::"+m,e.m.hasOwnProperty(u)))r=e.m[u];if(r!==c)switch(r){case e.d.NONE:break;case e.d.SCRIPT:n=c;g&&K(g,b,m,p,n);break;case e.d.STYLE:if("undefined"===typeof B){n=c;g&&K(g,b,m,p,n);break}var q=[];B(n,{declaration:function(a,b){var d=a.toLowerCase();T(d,b,f?function(a){return t(a,e.P.ja,e.M.ka,{TYPE:"CSS",CSS_PROP:d},f)}:c);b.length&&q.push(d+
+": "+b.join(" "))}});n=0<q.length?q.join(" ; "):c;g&&K(g,b,m,p,n);break;case e.d.ID:case e.d.IDREF:case e.d.IDREFS:case e.d.GLOBAL_NAME:case e.d.LOCAL_NAME:case e.d.CLASSES:n=k?k(n):n;g&&K(g,b,m,p,n);break;case e.d.URI:n=t(n,R(e.J,b,m),R(e.I,b,m),{TYPE:"MARKUP",XML_ATTR:m,XML_TAG:b},f);g&&K(g,b,m,p,n);break;case e.d.URI_FRAGMENT:n&&"#"===n.charAt(0)?(n=n.substring(1),n=k?k(n):n,n!==c&&n!==a&&(n="#"+n)):n=c;g&&K(g,b,m,p,n);break;default:n=c,g&&K(g,b,m,p,n)}else n=c,g&&K(g,b,m,p,n);d[l+1]=n}return d}
+function V(b,c,d){return function(f,k){if(e.f[f]&e.c.UNSAFE)d&&K(d,f,a,a,a);else return{attribs:X(f,k,b,c,d)}}}function W(a,b){var c=[];s(b)(a,c);return c.join("")}var B,T;"undefined"!==typeof window&&(B=window.parseCssDeclarations,T=window.sanitizeCssProperty);var M={lt:"\x3c",LT:"\x3c",gt:"\x3e",GT:"\x3e",amp:"\x26",AMP:"\x26",quot:'"',apos:"'",nbsp:"\u00a0"},I=/^#(\d+)$/,Y=/^#x([0-9A-Fa-f]+)$/,L=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):
+c,O=/\0/g,S=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,ca=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,ba=/&/g,P=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,Z=/[<]/g,aa=/>/g,U=/\"/g,Q=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,ga=3==="a,b".split(/(,)/).length,ea=e.c.CDATA|e.c.RCDATA,$={},ha={},ka=/^(?:https?|mailto|data)$/i,da={};da.pa=da.escapeAttrib=g;da.ra=da.makeHtmlSanitizer=s;da.sa=da.makeSaxParser=n;da.ta=da.makeTagPolicy=V;da.wa=da.normalizeRCData=l;da.xa=
+da.sanitize=function(a,b,c,d){return W(a,V(b,c,d))};da.ya=da.sanitizeAttribs=X;da.za=da.sanitizeWithPolicy=W;da.Ba=da.unescapeEntities=k;return da}(t);g=e.sanitize;"undefined"!==typeof window&&(window.html=e,window.html_sanitize=g)})();
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\x3d",encode:function(a,b){var c="",d,e,f,g,k,l,m=0;for(null!=b&&b||(a=Base64._utf8_encode(a));m<a.length;)d=a.charCodeAt(m++),e=a.charCodeAt(m++),f=a.charCodeAt(m++),g=d>>2,d=(d&3)<<4|e>>4,k=(e&15)<<2|f>>6,l=f&63,isNaN(e)?k=l=64:isNaN(f)&&(l=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(k)+this._keyStr.charAt(l);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,k,l=0;for(a=
a.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):
(127<d&&2048>d?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};
!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(k,m){if(!d[k]){if(!c[k]){var n="function"==typeof require&&require;if(!m&&n)return n(k,!0);if(g)return g(k,!0);n=Error("Cannot find module '"+k+"'");throw n.code="MODULE_NOT_FOUND",n;}n=d[k]={exports:{}};
-c[k][0].call(n.exports,function(b){var d=c[k][1][b];return f(d?d:b)},n,n.exports,b,c,d,e)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<e.length;k++)f(e[k]);return f}({1:[function(b,c,d){function e(b){if(!(this instanceof e))return new e(b);b=this.options=k.assign({level:s,method:t,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg=
+c[k][0].call(n.exports,function(b){var d=c[k][1][b];return f(d?d:b)},n,n.exports,b,c,d,e)}return d[k].exports}for(var g="function"==typeof require&&require,k=0;k<e.length;k++)f(e[k]);return f}({1:[function(b,c,d){function e(b){if(!(this instanceof e))return new e(b);b=this.options=k.assign({level:u,method:s,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg=
"";this.ended=!1;this.chunks=[];this.strm=new n;this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==r)throw Error(m[c]);if(b.header&&g.deflateSetHeader(this.strm,b.header),b.dictionary){var d;if(d="string"==typeof b.dictionary?l.string2buf(b.dictionary):"[object ArrayBuffer]"===p.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary,c=g.deflateSetDictionary(this.strm,d),c!==r)throw Error(m[c]);this._dict_set=!0}}function f(b,c){var d=
-new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/deflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/messages"),n=b("./zlib/zstream"),p=Object.prototype.toString,r=0,s=-1,q=0,t=8;e.prototype.push=function(b,c){var d,e,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;e=c===~~c?c:!0===c?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
+new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/deflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/messages"),n=b("./zlib/zstream"),p=Object.prototype.toString,r=0,u=-1,q=0,s=8;e.prototype.push=function(b,c){var d,e,f=this.strm,m=this.options.chunkSize;if(this.ended)return!1;e=c===~~c?c:!0===c?4:0;"string"==typeof b?f.input=l.string2buf(b):"[object ArrayBuffer]"===p.call(b)?f.input=new Uint8Array(b):f.input=b;f.next_in=0;f.avail_in=f.input.length;do{if(0===
f.avail_out&&(f.output=new k.Buf8(m),f.next_out=0,f.avail_out=m),d=g.deflate(f,e),1!==d&&d!==r)return this.onEnd(d),this.ended=!0,!1;0!==f.avail_out&&(0!==f.avail_in||4!==e&&2!==e)||("string"===this.options.to?this.onData(l.buf2binstring(k.shrinkBuf(f.output,f.next_out))):this.onData(k.shrinkBuf(f.output,f.next_out)))}while((0<f.avail_in||0===f.avail_out)&&1!==d);return 4===e?(d=g.deflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===r):2!==e||(this.onEnd(r),f.avail_out=0,!0)};e.prototype.onData=
function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===r&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Deflate=e;d.deflate=f;d.deflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.gzip=function(b,c){return c=c||{},c.gzip=!0,f(b,c)}},{"./utils/common":3,"./utils/strings":4,"./zlib/deflate":8,"./zlib/messages":13,"./zlib/zstream":15}],2:[function(b,c,d){function e(b){if(!(this instanceof
e))return new e(b);var c=this.options=k.assign({chunkSize:16384,windowBits:0,to:""},b||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||b&&b.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&0===(15&c.windowBits)&&(c.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new p;this.strm.avail_out=0;b=g.inflateInit2(this.strm,c.windowBits);if(b!==m.Z_OK)throw Error(n[b]);
-this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),s=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,r,E=this.strm,C=this.options.chunkSize,D=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
-"string"==typeof b?E.input=l.binstring2buf(b):"[object ArrayBuffer]"===s.call(b)?E.input=new Uint8Array(b):E.input=b;E.next_in=0;E.avail_in=E.input.length;do{if(0===E.avail_out&&(E.output=new k.Buf8(C),E.next_out=0,E.avail_out=C),d=g.inflate(E,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&D&&(r="string"==typeof D?l.string2buf(D):"[object ArrayBuffer]"===s.call(D)?new Uint8Array(D):D,d=g.inflateSetDictionary(this.strm,r)),d===m.Z_BUF_ERROR&&!0===F&&(d=m.Z_OK,F=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
-this.ended=!0,!1;E.next_out&&(0!==E.avail_out&&d!==m.Z_STREAM_END&&(0!==E.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(E.output,E.next_out),n=E.next_out-f,p=l.buf2string(E.output,f),E.next_out=n,E.avail_out=C-n,n&&k.arraySet(E.output,E.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(E.output,E.next_out))));0===E.avail_in&&0===E.avail_out&&(F=!0)}while((0<E.avail_in||0===E.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
-e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),E.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
+this.header=new r;g.inflateGetHeader(this.strm,this.header)}function f(b,c){var d=new e(c);if(d.push(b,!0),d.err)throw d.msg;return d.result}var g=b("./zlib/inflate"),k=b("./utils/common"),l=b("./utils/strings"),m=b("./zlib/constants"),n=b("./zlib/messages"),p=b("./zlib/zstream"),r=b("./zlib/gzheader"),u=Object.prototype.toString;e.prototype.push=function(b,c){var d,e,f,n,p,r,A=this.strm,D=this.options.chunkSize,C=this.options.dictionary,F=!1;if(this.ended)return!1;e=c===~~c?c:!0===c?m.Z_FINISH:m.Z_NO_FLUSH;
+"string"==typeof b?A.input=l.binstring2buf(b):"[object ArrayBuffer]"===u.call(b)?A.input=new Uint8Array(b):A.input=b;A.next_in=0;A.avail_in=A.input.length;do{if(0===A.avail_out&&(A.output=new k.Buf8(D),A.next_out=0,A.avail_out=D),d=g.inflate(A,m.Z_NO_FLUSH),d===m.Z_NEED_DICT&&C&&(r="string"==typeof C?l.string2buf(C):"[object ArrayBuffer]"===u.call(C)?new Uint8Array(C):C,d=g.inflateSetDictionary(this.strm,r)),d===m.Z_BUF_ERROR&&!0===F&&(d=m.Z_OK,F=!1),d!==m.Z_STREAM_END&&d!==m.Z_OK)return this.onEnd(d),
+this.ended=!0,!1;A.next_out&&(0!==A.avail_out&&d!==m.Z_STREAM_END&&(0!==A.avail_in||e!==m.Z_FINISH&&e!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(f=l.utf8border(A.output,A.next_out),n=A.next_out-f,p=l.buf2string(A.output,f),A.next_out=n,A.avail_out=D-n,n&&k.arraySet(A.output,A.output,f,n,0),this.onData(p)):this.onData(k.shrinkBuf(A.output,A.next_out))));0===A.avail_in&&0===A.avail_out&&(F=!0)}while((0<A.avail_in||0===A.avail_out)&&d!==m.Z_STREAM_END);return d===m.Z_STREAM_END&&(e=m.Z_FINISH),
+e===m.Z_FINISH?(d=g.inflateEnd(this.strm),this.onEnd(d),this.ended=!0,d===m.Z_OK):e!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),A.avail_out=0,!0)};e.prototype.onData=function(b){this.chunks.push(b)};e.prototype.onEnd=function(b){b===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=k.flattenChunks(this.chunks));this.chunks=[];this.err=b;this.msg=this.strm.msg};d.Inflate=e;d.inflate=f;d.inflateRaw=function(b,c){return c=c||{},c.raw=!0,f(b,c)};d.ungzip=f},{"./utils/common":3,
"./utils/strings":4,"./zlib/constants":6,"./zlib/gzheader":9,"./zlib/inflate":11,"./zlib/messages":13,"./zlib/zstream":15}],3:[function(b,c,d){b="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;d.assign=function(b){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var d=c.shift();if(d){if("object"!=typeof d)throw new TypeError(d+"must be non-object");for(var e in d)d.hasOwnProperty(e)&&(b[e]=d[e])}}return b};d.shrinkBuf=function(b,c){return b.length===
c?b:b.subarray?b.subarray(0,c):(b.length=c,b)};var e={arraySet:function(b,c,d,e,f){if(c.subarray&&b.subarray)return void b.set(c.subarray(d,d+e),f);for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){var c,d,e,f,p;c=e=0;for(d=b.length;c<d;c++)e+=b[c].length;p=new Uint8Array(e);c=e=0;for(d=b.length;c<d;c++)f=b[c],p.set(f,e),e+=f.length;return p}},f={arraySet:function(b,c,d,e,f){for(var p=0;p<e;p++)b[f+p]=c[d+p]},flattenChunks:function(b){return[].concat.apply([],b)}};d.setTyped=function(b){b?
(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,e)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,f))};d.setTyped(b)},{}],4:[function(b,c,d){function e(b,c){if(65537>c&&(b.subarray&&k||!b.subarray&&g))return String.fromCharCode.apply(null,f.shrinkBuf(b,c));for(var d="",e=0;e<c;e++)d+=String.fromCharCode(b[e]);return d}var f=b("./common"),g=!0,k=!0;try{String.fromCharCode.apply(null,[0])}catch(l){g=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(m){k=!1}var n=
@@ -117,76 +117,76 @@ new f.Buf8(256);for(b=0;256>b;b++)n[b]=252<=b?6:248<=b?5:240<=b?4:224<=b?3:192<=
d?(c[g++]=192|d>>>6,c[g++]=128|63&d):65536>d?(c[g++]=224|d>>>12,c[g++]=128|d>>>6&63,c[g++]=128|63&d):(c[g++]=240|d>>>18,c[g++]=128|d>>>12&63,c[g++]=128|d>>>6&63,c[g++]=128|63&d);return c};d.buf2binstring=function(b){return e(b,b.length)};d.binstring2buf=function(b){for(var c=new f.Buf8(b.length),d=0,e=c.length;d<e;d++)c[d]=b.charCodeAt(d);return c};d.buf2string=function(b,c){var d,f,k,g,l=c||b.length,m=Array(2*l);for(d=f=0;d<l;)if(k=b[d++],128>k)m[f++]=k;else if(g=n[k],4<g)m[f++]=65533,d+=g-1;else{for(k&=
2===g?31:3===g?15:7;1<g&&d<l;)k=k<<6|63&b[d++],g--;1<g?m[f++]=65533:65536>k?m[f++]=k:(k-=65536,m[f++]=55296|k>>10&1023,m[f++]=56320|1023&k)}return e(m,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+n[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,k){var l=65535&b|0;b=b>>>16&65535|0;for(var m=0;0!==d;){m=2E3<d?2E3:d;d-=m;do l=l+c[k++]|0,b=b+l|0;while(--m);l%=65521;b%=65521}return l|
b<<16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;
-for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=D[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(z.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
-0))}function k(b,c){A._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,r=b.prev,s=b.strstart+O,q=n[k+g-1],t=n[k+g];b.prev_length>=b.good_match&&
-(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===t&&n[d+g-1]===q&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;d++;do;while(n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<s);if(e=O-(s-k),k=s-O,e>g){if(b.match_start=c,g=e,e>=l)break;q=n[k+g-1];t=n[k+g]}}while((c=r[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
-k+(k-S)){z.arraySet(b.window,b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,z.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=E(c.adler,e,l,g):2===c.state.wrap&&(c.adler=C(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),
+for(var e=0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,l){d=l+d;for(b^=-1;l<d;l++)b=b>>>8^e[255&(b^c[l])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(y.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=
+0))}function k(b,c){E._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function l(b,c){b.pending_buf[b.pending++]=c}function m(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function n(b,c){var d,e,f=b.max_chain_length,k=b.strstart,g=b.prev_length,l=b.nice_match,m=b.strstart>b.w_size-S?b.strstart-(b.w_size-S):0,n=b.window,p=b.w_mask,r=b.prev,u=b.strstart+O,q=n[k+g-1],s=n[k+g];b.prev_length>=b.good_match&&
+(f>>=2);l>b.lookahead&&(l=b.lookahead);do if(d=c,n[d+g]===s&&n[d+g-1]===q&&n[d]===n[k]&&n[++d]===n[k+1]){k+=2;d++;do;while(n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&n[++k]===n[++d]&&k<u);if(e=O-(u-k),k=u-O,e>g){if(b.match_start=c,g=e,e>=l)break;q=n[k+g-1];s=n[k+g]}}while((c=r[c&p])>m&&0!==--f);return g<=b.lookahead?g:b.lookahead}function p(b){var c,d,e,f,k=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=
+k+(k-S)){y.arraySet(b.window,b.window,k,k,0);b.match_start-=k;b.strstart-=k;b.block_start-=k;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=k?e-k:0;while(--d);c=d=k;do e=b.prev[--c],b.prev[c]=e>=k?e-k:0;while(--d);f+=k}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var g=b.strstart+b.lookahead,l=c.avail_in;if(d=(l>f&&(l=f),0===l?0:(c.avail_in-=l,y.arraySet(e,c.input,c.next_in,l,g),1===c.state.wrap?c.adler=A(c.adler,e,l,g):2===c.state.wrap&&(c.adler=D(c.adler,e,l,g)),c.next_in+=l,c.total_in+=l,l)),
b.lookahead+=d,b.lookahead+b.insert>=J){f=b.strstart-b.insert;b.ins_h=b.window[f];for(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+J-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<J)););}}while(b.lookahead<S&&0!==b.strm.avail_in)}function r(b,c){for(var d,e;;){if(b.lookahead<S){if(p(b),b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<
-b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d)),b.match_length>=J)if(e=A._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
-b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=A._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function s(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),
+b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d)),b.match_length>=J)if(e=E._tr_tally(b,b.strstart-b.match_start,b.match_length-J),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=J){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=
+b.strstart;while(0!==--b.match_length);b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=E._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<J-1?b.strstart:J-1,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function u(b,c){for(var d,e,f;;){if(b.lookahead<S){if(p(b),
b.lookahead<S&&c===F)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=J&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=J-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-S&&(b.match_length=n(b,d),5>=b.match_length&&(b.strategy===R||b.match_length===J&&4096<b.strstart-b.match_start)&&(b.match_length=J-1)),b.prev_length>=
-J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=A._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=A._tr_tally(b,0,
-b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(A._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=
+J&&b.match_length<=b.prev_length){f=b.strstart+b.lookahead-J;e=E._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-J);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+J-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=J-1,b.strstart++,e&&(k(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=E._tr_tally(b,0,
+b.window[b.strstart-1]),e&&k(b,!1),b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(E._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<J-1?b.strstart:J-1,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):b.last_lit&&(k(b,!1),0===b.strm.avail_out)?P:Z}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function s(){this.strm=null;this.status=
0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=W;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=
-this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new z.Buf16(2*Y);this.dyn_dtree=new z.Buf16(2*(2*M+1));this.bl_tree=new z.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new z.Buf16(L+1);this.heap=new z.Buf16(2*T+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new z.Buf16(2*T+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
-this.lit_bufsize=this.l_buf=0}function u(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:ba,b.adler=2===c.wrap?0:1,c.last_flush=F,A._tr_init(c),H):e(b,N)}function v(b){var c=u(b);c===H&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=
-0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>B||d!==W||8>f||15<f||0>c||9<c||0>g||g>X)return e(b,N);8===f&&(f=9);var m=new t;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new z.Buf8(2*
-m.w_size),m.head=new z.Buf16(m.hash_size),m.prev=new z.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new z.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,v(b)}var y,z=b("../utils/common"),A=b("./trees"),E=b("./adler32"),C=b("./crc32"),D=b("./messages"),F=0,G=4,H=0,N=-2,K=-1,R=1,X=4,V=2,W=8,B=9,T=286,M=30,I=19,Y=2*T+1,L=15,J=3,O=258,S=O+J+1,ca=42,ba=113,P=1,Z=2,aa=3,U=4;y=[new q(0,0,0,0,function(b,c){var d=
-65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===G?(k(b,!0),0===b.strm.avail_out?aa:U):(b.strstart>b.block_start&&k(b,!1),P)}),new q(4,4,8,
-4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,s),new q(8,16,32,32,s),new q(8,16,128,128,s),new q(8,32,128,256,s),new q(32,128,258,1024,s),new q(32,258,258,4096,s)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=u;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,H):N};d.deflate=function(b,c){var d,n,r,s;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||
-666===n.status&&c!==G)return e(b,0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ca)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
-l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(b.adler=C(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(r=W+(n.w_bits-8<<4)<<8,s=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,r|=s<<6,0!==n.strstart&&(r|=32),n.status=ba,m(n,r+(31-r%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&
-n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&
-(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r)),g(b),
-r=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>r&&(b.adler=C(b.adler,n.pending_buf,n.pending-r,r));0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=
--1,H}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==G)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var q;if(2===n.strategy)a:{for(var t;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){q=P;break a}break}if(n.match_length=0,t=A._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,t&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&
-(k(n,!1),0===n.strm.avail_out)?P:Z)}else if(3===n.strategy)a:{var B,u;for(t=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===F){q=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(u=n.strstart-1,B=t[u],B===t[++u]&&B===t[++u]&&B===t[++u])){d=n.strstart+O;do;while(B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&B===t[++u]&&u<d);n.match_length=O-(d-u);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
-J?(q=A._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(q=A._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),q&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===G?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Z)}else q=y[n.level].func(n,c);if(q!==aa&&q!==U||(n.status=666),q===P||q===aa)return 0===b.avail_out&&(n.last_flush=-1),H;if(q===Z&&(1===c?A._tr_align(n):5!==c&&(A._tr_stored_block(n,
-0,0,!1),3===c&&(f(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,H}return c!==G?H:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?H:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
-c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==ba&&666!==c?e(b,N):(b.state=null,c===ba?e(b,-3):H)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ca||d.lookahead))return N;1===g&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new z.Buf8(d.w_size),z.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=
-0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,H};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
-"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,k,l,m,n,p,r,s,q,t,u,v,x,y,z,A,E,C,D,F,G,H,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);m=b.next_out;K=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);r=d.dmax;s=d.wsize;q=d.whave;t=d.wnext;u=d.window;v=d.hold;x=d.bits;y=d.lencode;
-z=d.distcode;A=(1<<d.lenbits)-1;E=(1<<d.distbits)-1;a:do{15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);C=y[v&A];b:for(;;){if(D=C>>>24,v>>>=D,x-=D,D=C>>>16&255,0===D)K[m++]=65535&C;else{if(!(16&D)){if(0===(64&D)){C=y[(65535&C)+(v&(1<<D)-1)];continue b}if(32&D){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&C;(D&=15)&&(x<D&&(v+=N[k++]<<x,x+=8),F+=v&(1<<D)-1,v>>>=D,x-=D);15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);C=z[v&E];c:for(;;){if(D=C>>>24,v>>>=D,x-=D,D=C>>>16&255,
-!(16&D)){if(0===(64&D)){C=z[(65535&C)+(v&(1<<D)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(G=65535&C,D&=15,x<D&&(v+=N[k++]<<x,x+=8,x<D&&(v+=N[k++]<<x,x+=8)),G+=v&(1<<D)-1,G>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=D,x-=D,D=m-n,G>D){if(D=G-D,D>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(C=0,H=u,0===t){if(C+=s-D,D<F){F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}}else if(t<D){if(C+=s+t-D,D-=t,D<F){F-=D;do K[m++]=u[C++];while(--D);
-if(C=0,t<F){D=t;F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}}}else if(C+=t-D,D<F){F-=D;do K[m++]=u[C++];while(--D);C=m-G;H=K}for(;2<F;)K[m++]=H[C++],K[m++]=H[C++],K[m++]=H[C++],F-=3;F&&(K[m++]=H[C++],1<F&&(K[m++]=H[C++]))}else{C=m-G;do K[m++]=K[C++],K[m++]=K[C++],K[m++]=K[C++],F-=3;while(2<F);F&&(K[m++]=K[C++],1<F&&(K[m++]=K[C++]))}break}}break}}while(k<l&&m<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=m;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=v&(1<<x)-1;d.bits=x}},
-{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new s.Buf16(320);this.work=
-new s.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=z,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new s.Buf32(A),c.distcode=c.distdyn=new s.Buf32(E),c.sane=1,c.back=-1,x):y}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function l(b,c){var d,e;return b&&b.state?(e=b.state,
-0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):y}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):y}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new s.Buf8(b.wsize)),e>=b.wsize?(s.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),s.arraySet(b.window,c,d-
-e,f,b.wnext),e-=f,e?(s.arraySet(b.window,c,d-e,e,0),b.wnext=e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,s=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),u=b("./inffast"),v=b("./inftrees"),x=0,y=-2,z=1,A=852,E=592,C=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,E,A,B,T,M,I,Y,L,J,O,S,ca,ba,P,Z,aa,U=0,Q=new s.Buf8(4),ga=[16,
-17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;T=m;M=E;Z=x;a:for(;;)switch(d.mode){case z:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);B=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),
+this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new y.Buf16(2*Y);this.dyn_dtree=new y.Buf16(2*(2*M+1));this.bl_tree=new y.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new y.Buf16(L+1);this.heap=new y.Buf16(2*T+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new y.Buf16(2*T+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=
+this.lit_bufsize=this.l_buf=0}function t(b){var c;return b&&b.state?(b.total_in=b.total_out=0,b.data_type=V,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ca:ba,b.adler=2===c.wrap?0:1,c.last_flush=F,E._tr_init(c),G):e(b,N)}function v(b){var c=t(b);c===G&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=
+0,b.lookahead=0,b.insert=0,b.match_length=b.prev_length=J-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,k,g){if(!b)return N;var l=1;if(c===K&&(c=6),0>f?(l=0,f=-f):15<f&&(l=2,f-=16),1>k||k>B||d!==W||8>f||15<f||0>c||9<c||0>g||g>X)return e(b,N);8===f&&(f=9);var m=new s;return b.state=m,m.strm=b,m.wrap=l,m.gzhead=null,m.w_bits=f,m.w_size=1<<m.w_bits,m.w_mask=m.w_size-1,m.hash_bits=k+7,m.hash_size=1<<m.hash_bits,m.hash_mask=m.hash_size-1,m.hash_shift=~~((m.hash_bits+J-1)/J),m.window=new y.Buf8(2*
+m.w_size),m.head=new y.Buf16(m.hash_size),m.prev=new y.Buf16(m.w_size),m.lit_bufsize=1<<k+6,m.pending_buf_size=4*m.lit_bufsize,m.pending_buf=new y.Buf8(m.pending_buf_size),m.d_buf=1*m.lit_bufsize,m.l_buf=3*m.lit_bufsize,m.level=c,m.strategy=g,m.method=d,v(b)}var z,y=b("../utils/common"),E=b("./trees"),A=b("./adler32"),D=b("./crc32"),C=b("./messages"),F=0,H=4,G=0,N=-2,K=-1,R=1,X=4,V=2,W=8,B=9,T=286,M=30,I=19,Y=2*T+1,L=15,J=3,O=258,S=O+J+1,ca=42,ba=113,P=1,Z=2,aa=3,U=4;z=[new q(0,0,0,0,function(b,c){var d=
+65535;for(d>b.pending_buf_size-5&&(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(p(b),0===b.lookahead&&c===F)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,k(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-S&&(k(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===H?(k(b,!0),0===b.strm.avail_out?aa:U):(b.strstart>b.block_start&&k(b,!1),P)}),new q(4,4,8,
+4,r),new q(4,5,16,8,r),new q(4,6,32,32,r),new q(4,4,16,16,u),new q(8,16,32,32,u),new q(8,16,128,128,u),new q(8,32,128,256,u),new q(32,128,258,1024,u),new q(32,258,258,4096,u)];d.deflateInit=function(b,c){return x(b,c,W,15,8,0)};d.deflateInit2=x;d.deflateReset=v;d.deflateResetKeep=t;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?N:(b.state.gzhead=c,G):N};d.deflate=function(b,c){var d,n,r,u;if(!b||!b.state||5<c||0>c)return b?e(b,N):N;if(n=b.state,!b.output||!b.input&&0!==b.avail_in||
+666===n.status&&c!==H)return e(b,0===b.avail_out?-5:N);if(n.strm=b,d=n.last_flush,n.last_flush=c,n.status===ca)2===n.wrap?(b.adler=0,l(n,31),l(n,139),l(n,8),n.gzhead?(l(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),l(n,255&n.gzhead.time),l(n,n.gzhead.time>>8&255),l(n,n.gzhead.time>>16&255),l(n,n.gzhead.time>>24&255),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(l(n,255&n.gzhead.extra.length),
+l(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(b.adler=D(b.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(l(n,0),l(n,0),l(n,0),l(n,0),l(n,0),l(n,9===n.level?2:2<=n.strategy||2>n.level?4:0),l(n,3),n.status=ba)):(r=W+(n.w_bits-8<<4)<<8,u=2<=n.strategy||2>n.level?0:6>n.level?1:6===n.level?2:3,r|=u<<6,0!==n.strstart&&(r|=32),n.status=ba,m(n,r+(31-r%31)),0!==n.strstart&&(m(n,b.adler>>>16),m(n,65535&b.adler)),b.adler=1);if(69===n.status)if(n.gzhead.extra){for(r=n.pending;n.gzindex<(65535&
+n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending!==n.pending_buf_size));)l(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&
+(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),g(b),r=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0;l(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));0===u&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){r=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r)),g(b),
+r=n.pending,n.pending===n.pending_buf_size)){u=1;break}u=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0;l(n,u)}while(0!==u);n.gzhead.hcrc&&n.pending>r&&(b.adler=D(b.adler,n.pending_buf,n.pending-r,r));0===u&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&g(b),n.pending+2<=n.pending_buf_size&&(l(n,255&b.adler),l(n,b.adler>>8&255),b.adler=0,n.status=ba)):n.status=ba),0!==n.pending){if(g(b),0===b.avail_out)return n.last_flush=
+-1,G}else if(0===b.avail_in&&(c<<1)-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==H)return e(b,-5);if(666===n.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==n.lookahead||c!==F&&666!==n.status){var q;if(2===n.strategy)a:{for(var s;;){if(0===n.lookahead&&(p(n),0===n.lookahead)){if(c===F){q=P;break a}break}if(n.match_length=0,s=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++,s&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&
+(k(n,!1),0===n.strm.avail_out)?P:Z)}else if(3===n.strategy)a:{var B,t;for(s=n.window;;){if(n.lookahead<=O){if(p(n),n.lookahead<=O&&c===F){q=P;break a}if(0===n.lookahead)break}if(n.match_length=0,n.lookahead>=J&&0<n.strstart&&(t=n.strstart-1,B=s[t],B===s[++t]&&B===s[++t]&&B===s[++t])){d=n.strstart+O;do;while(B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&B===s[++t]&&t<d);n.match_length=O-(d-t);n.match_length>n.lookahead&&(n.match_length=n.lookahead)}if(n.match_length>=
+J?(q=E._tr_tally(n,1,n.match_length-J),n.lookahead-=n.match_length,n.strstart+=n.match_length,n.match_length=0):(q=E._tr_tally(n,0,n.window[n.strstart]),n.lookahead--,n.strstart++),q&&(k(n,!1),0===n.strm.avail_out)){q=P;break a}}q=(n.insert=0,c===H?(k(n,!0),0===n.strm.avail_out?aa:U):n.last_lit&&(k(n,!1),0===n.strm.avail_out)?P:Z)}else q=z[n.level].func(n,c);if(q!==aa&&q!==U||(n.status=666),q===P||q===aa)return 0===b.avail_out&&(n.last_flush=-1),G;if(q===Z&&(1===c?E._tr_align(n):5!==c&&(E._tr_stored_block(n,
+0,0,!1),3===c&&(f(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),g(b),0===b.avail_out))return n.last_flush=-1,G}return c!==H?G:0>=n.wrap?1:(2===n.wrap?(l(n,255&b.adler),l(n,b.adler>>8&255),l(n,b.adler>>16&255),l(n,b.adler>>24&255),l(n,255&b.total_in),l(n,b.total_in>>8&255),l(n,b.total_in>>16&255),l(n,b.total_in>>24&255)):(m(n,b.adler>>>16),m(n,65535&b.adler)),g(b),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?G:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,
+c!==ca&&69!==c&&73!==c&&91!==c&&103!==c&&c!==ba&&666!==c?e(b,N):(b.state=null,c===ba?e(b,-3):G)):N};d.deflateSetDictionary=function(b,c){var d,e,k,g,l,m,n;e=c.length;if(!b||!b.state||(d=b.state,g=d.wrap,2===g||1===g&&d.status!==ca||d.lookahead))return N;1===g&&(b.adler=A(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===g&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),l=new y.Buf8(d.w_size),y.arraySet(l,c,e-d.w_size,d.w_size,0),c=l,e=d.w_size);l=b.avail_in;m=b.next_in;n=b.input;b.avail_in=e;b.next_in=
+0;b.input=c;for(p(d);d.lookahead>=J;){e=d.strstart;k=d.lookahead-(J-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+J-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--k);d.strstart=e;d.lookahead=J-1;p(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=J-1,d.match_available=0,b.next_in=m,b.input=n,b.avail_in=l,d.wrap=g,G};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,
+"./crc32":7,"./messages":13,"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,k,l,m,n,p,r,u,q,s,t,v,x,z,y,E,A,D,C,F,H,G,N,K;d=b.state;k=b.next_in;N=b.input;l=k+(b.avail_in-5);m=b.next_out;K=b.output;n=m-(c-b.avail_out);p=m+(b.avail_out-257);r=d.dmax;u=d.wsize;q=d.whave;s=d.wnext;t=d.window;v=d.hold;x=d.bits;z=d.lencode;
+y=d.distcode;E=(1<<d.lenbits)-1;A=(1<<d.distbits)-1;a:do{15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);D=z[v&E];b:for(;;){if(C=D>>>24,v>>>=C,x-=C,C=D>>>16&255,0===C)K[m++]=65535&D;else{if(!(16&C)){if(0===(64&C)){D=z[(65535&D)+(v&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}F=65535&D;(C&=15)&&(x<C&&(v+=N[k++]<<x,x+=8),F+=v&(1<<C)-1,v>>>=C,x-=C);15>x&&(v+=N[k++]<<x,x+=8,v+=N[k++]<<x,x+=8);D=y[v&A];c:for(;;){if(C=D>>>24,v>>>=C,x-=C,C=D>>>16&255,
+!(16&C)){if(0===(64&C)){D=y[(65535&D)+(v&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(H=65535&D,C&=15,x<C&&(v+=N[k++]<<x,x+=8,x<C&&(v+=N[k++]<<x,x+=8)),H+=v&(1<<C)-1,H>r){b.msg="invalid distance too far back";d.mode=30;break a}if(v>>>=C,x-=C,C=m-n,H>C){if(C=H-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(D=0,G=t,0===s){if(D+=u-C,C<F){F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}}else if(s<C){if(D+=u+s-C,C-=s,C<F){F-=C;do K[m++]=t[D++];while(--C);
+if(D=0,s<F){C=s;F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}}}else if(D+=s-C,C<F){F-=C;do K[m++]=t[D++];while(--C);D=m-H;G=K}for(;2<F;)K[m++]=G[D++],K[m++]=G[D++],K[m++]=G[D++],F-=3;F&&(K[m++]=G[D++],1<F&&(K[m++]=G[D++]))}else{D=m-H;do K[m++]=K[D++],K[m++]=K[D++],K[m++]=K[D++],F-=3;while(2<F);F&&(K[m++]=K[D++],1<F&&(K[m++]=K[D++]))}break}}break}}while(k<l&&m<p);F=x>>3;k-=F;x-=F<<3;b.next_in=k;b.next_out=m;b.avail_in=k<l?5+(l-k):5-(k-l);b.avail_out=m<p?257+(p-m):257-(m-p);d.hold=v&(1<<x)-1;d.bits=x}},
+{}],11:[function(b,c,d){function e(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new u.Buf16(320);this.work=
+new u.Buf16(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=y,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new u.Buf32(E),c.distcode=c.distdyn=new u.Buf32(A),c.sane=1,c.back=-1,x):z}function k(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function l(b,c){var d,e;return b&&b.state?(e=b.state,
+0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,k(b))):z}function m(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=l(b,c),d!==x&&(b.state=null),d):z}function n(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new u.Buf8(b.wsize)),e>=b.wsize?(u.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),u.arraySet(b.window,c,d-
+e,f,b.wnext),e-=f,e?(u.arraySet(b.window,c,d-e,e,0),b.wnext=e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var p,r,u=b("../utils/common"),q=b("./adler32"),s=b("./crc32"),t=b("./inffast"),v=b("./inftrees"),x=0,z=-2,y=1,E=852,A=592,D=!0;d.inflateReset=k;d.inflateReset2=l;d.inflateResetKeep=g;d.inflateInit=function(b){return m(b,15)};d.inflateInit2=m;d.inflate=function(b,c){var d,f,k,g,l,m,E,A,B,T,M,I,Y,L,J,O,S,ca,ba,P,Z,aa,U=0,Q=new u.Buf8(4),ga=[16,
+17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;T=m;M=E;Z=x;a:for(;;)switch(d.mode){case y:if(0===d.wrap){d.mode=13;break}for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=s(d.check,Q,2,0);B=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),
!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,B-=4,P=(15&A)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&A?10:12;B=A=0;break;case 2:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";
-d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0;d.mode=3;case 3:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=t(d.check,Q,4,0));B=A=0;d.mode=4;case 4:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0;d.mode=
-5;case 5:if(1024&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));B=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>m&&(I=m),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),s.arraySet(d.head.extra,f,g,I,P)),512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
-7;case 7:if(2048&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=t(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=
+d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0;d.mode=3;case 3:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=s(d.check,Q,4,0));B=A=0;d.mode=4;case 4:for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0;d.mode=
+5;case 5:if(1024&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=s(d.check,Q,2,0));B=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>m&&(I=m),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),u.arraySet(d.head.extra,f,g,I,P)),512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,d.length-=I),d.length))break a;d.length=0;d.mode=
+7;case 7:if(2048&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===m)break a;I=0;do P=f[g+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<m);if(512&d.flags&&(d.check=s(d.check,f,I,g)),m-=I,g+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=
9;case 9:if(512&d.flags){for(;16>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}B=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}b.adler=d.check=e(A);B=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=
-7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}switch(d.last=1&A,A>>>=1,B-=1,3&A){case 0:d.mode=14;break;case 1:L=d;if(C){p=new s.Buf32(512);r=new s.Buf32(32);for(O=0;144>O;)L.lens[O++]=8;for(;256>O;)L.lens[O++]=9;for(;280>O;)L.lens[O++]=7;for(;288>O;)L.lens[O++]=8;v(1,L.lens,0,288,p,0,L.work,{bits:9});for(O=0;32>O;)L.lens[O++]=5;v(2,L.lens,0,32,r,0,L.work,{bits:5});C=!1}L.lencode=p;L.lenbits=9;L.distcode=r;L.distbits=5;if(d.mode=20,6===c){A>>>=2;B-=2;break a}break;case 2:d.mode=
-17;break;case 3:b.msg="invalid block type",d.mode=30}A>>>=2;B-=2;break;case 14:A>>>=7&B;for(B-=7&B;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>m&&(I=m),I>E&&(I=E),0===I)break a;s.arraySet(k,f,g,I,l);m-=I;g+=I;E-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(d.nlen=
+7&B;B-=7&B;d.mode=27;break}for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}switch(d.last=1&A,A>>>=1,B-=1,3&A){case 0:d.mode=14;break;case 1:L=d;if(D){p=new u.Buf32(512);r=new u.Buf32(32);for(O=0;144>O;)L.lens[O++]=8;for(;256>O;)L.lens[O++]=9;for(;280>O;)L.lens[O++]=7;for(;288>O;)L.lens[O++]=8;v(1,L.lens,0,288,p,0,L.work,{bits:9});for(O=0;32>O;)L.lens[O++]=5;v(2,L.lens,0,32,r,0,L.work,{bits:5});D=!1}L.lencode=p;L.lenbits=9;L.distcode=r;L.distbits=5;if(d.mode=20,6===c){A>>>=2;B-=2;break a}break;case 2:d.mode=
+17;break;case 3:b.msg="invalid block type",d.mode=30}A>>>=2;B-=2;break;case 14:A>>>=7&B;for(B-=7&B;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,B=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>m&&(I=m),I>E&&(I=E),0===I)break a;u.arraySet(k,f,g,I,l);m-=I;g+=I;E-=I;l+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(d.nlen=
(31&A)+257,A>>>=5,B-=5,d.ndist=(31&A)+1,A>>>=5,B-=5,d.ncode=(15&A)+4,A>>>=4,B-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.lens[ga[d.have++]]=7&A;A>>>=3;B-=3}for(;19>d.have;)d.lens[ga[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,aa={bits:d.lenbits},Z=v(0,d.lens,0,19,d.lencode,0,d.work,aa),d.lenbits=aa.bits,Z){b.msg="invalid code lengths set";d.mode=30;break}d.have=
0;d.mode=19;case 19:for(;d.have<d.nlen+d.ndist;){for(;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(16>O)A>>>=J,B-=J,d.lens[d.have++]=O;else{if(16===O){for(L=J+2;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A>>>=J,B-=J,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];I=3+(3&A);A>>>=2;B-=2}else if(17===O){for(L=J+3;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=J;B-=J;P=0;I=3+(7&A);A>>>=3;B-=3}else{for(L=
J+7;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=J;B-=J;P=0;I=11+(127&A);A>>>=7;B-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,aa={bits:d.lenbits},Z=v(1,d.lens,0,d.nlen,d.lencode,0,d.work,aa),d.lenbits=aa.bits,Z){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,aa={bits:d.distbits},
-Z=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,aa),d.distbits=aa.bits,Z){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=E){b.next_out=l;b.avail_out=E;b.next_in=g;b.avail_in=m;d.hold=A;d.bits=B;u(b,M);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<
+Z=v(2,d.lens,d.nlen,d.ndist,d.distcode,0,d.work,aa),d.distbits=aa.bits,Z){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=m&&258<=E){b.next_out=l;b.avail_out=E;b.next_in=g;b.avail_in=m;d.hold=A;d.bits=B;t(b,M);l=b.next_out;k=b.output;E=b.avail_out;g=b.next_in;f=b.input;m=b.avail_in;A=d.hold;B=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;U=d.lencode[A&(1<<d.lenbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<
B;B+=8}if(L&&0===(240&L)){S=J;ca=L;for(ba=O;U=d.lencode[ba+((A&(1<<S+ca)-1)>>S)],J=U>>>24,L=U>>>16&255,O=65535&U,!(S+J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=S;B-=S;d.back+=S}if(A>>>=J,B-=J,d.back+=J,d.length=O,0===L){d.mode=26;break}if(32&L){d.back=-1;d.mode=12;break}if(64&L){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&L;d.mode=22;case 22:if(d.extra){for(L=d.extra;B<L;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;B-=d.extra;d.back+=
d.extra}d.was=d.length;d.mode=23;case 23:for(;U=d.distcode[A&(1<<d.distbits)-1],J=U>>>24,L=U>>>16&255,O=65535&U,!(J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(0===(240&L)){S=J;ca=L;for(ba=O;U=d.distcode[ba+((A&(1<<S+ca)-1)>>S)],J=U>>>24,L=U>>>16&255,O=65535&U,!(S+J<=B);){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}A>>>=S;B-=S;d.back+=S}if(A>>>=J,B-=J,d.back+=J,64&L){b.msg="invalid distance code";d.mode=30;break}d.offset=O;d.extra=15&L;d.mode=24;case 24:if(d.extra){for(L=d.extra;B<L;){if(0===m)break a;
m--;A+=f[g++]<<B;B+=8}d.offset+=A&(1<<d.extra)-1;A>>>=d.extra;B-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===E)break a;if(I=M-E,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,Y=d.wsize-I):Y=d.wnext-I;I>d.length&&(I=d.length);L=d.window}else L=k,Y=l-d.offset,I=d.length;I>E&&(I=E);E-=I;d.length-=I;do k[l++]=L[Y++];while(--I);0===d.length&&(d.mode=
-21);break;case 26:if(0===E)break a;k[l++]=d.length;E--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===m)break a;m--;A|=f[g++]<<B;B+=8}if(M-=E,b.total_out+=M,d.total+=M,M&&(b.adler=d.check=d.flags?t(d.check,k,M,l-M):q(d.check,k,M,l-M)),M=E,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}B=A=0}d.mode=
-29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return y}return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,(d.wsize||M!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,M-b.avail_out)?(d.mode=31,-4):(T-=b.avail_in,M-=b.avail_out,b.total_in+=T,b.total_out+=M,d.total+=M,d.wrap&&M&&(b.adler=d.check=d.flags?t(d.check,k,M,b.next_out-M):q(d.check,k,M,b.next_out-M)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===
-d.mode?256:0),(0===T&&0===M||4===c)&&Z===x&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
+21);break;case 26:if(0===E)break a;k[l++]=d.length;E--;d.mode=21;break;case 27:if(d.wrap){for(;32>B;){if(0===m)break a;m--;A|=f[g++]<<B;B+=8}if(M-=E,b.total_out+=M,d.total+=M,M&&(b.adler=d.check=d.flags?s(d.check,k,M,l-M):q(d.check,k,M,l-M)),M=E,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}B=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>B;){if(0===m)break a;m--;A+=f[g++]<<B;B+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}B=A=0}d.mode=
+29;case 29:Z=1;break a;case 30:Z=-3;break a;case 31:return-4;default:return z}return b.next_out=l,b.avail_out=E,b.next_in=g,b.avail_in=m,d.hold=A,d.bits=B,(d.wsize||M!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&n(b,b.output,b.next_out,M-b.avail_out)?(d.mode=31,-4):(T-=b.avail_in,M-=b.avail_out,b.total_in+=T,b.total_out+=M,d.total+=M,d.wrap&&M&&(b.adler=d.check=d.flags?s(d.check,k,M,b.next_out-M):q(d.check,k,M,b.next_out-M)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===
+d.mode?256:0),(0===T&&0===M||4===c)&&Z===x&&(Z=-5),Z)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,x)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:n(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):z};d.inflateInfo="pako inflate (from Nodeca project)"},
{"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],k=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],l=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,r,s,q,t,u){var v,x,y,z,A,E,C,D;z=u.bits;for(var F=0,G=0,H=0,N=0,K=0,R=0,X=0,V=0,W=0,B=null,T=0,M=new e.Buf16(16),R=new e.Buf16(16),I=null,Y=0,F=0;15>=F;F++)M[F]=0;for(G=0;G<r;G++)M[c[d+G]]++;K=z;for(N=15;1<=N&&0===M[N];N--);if(K>N&&(K=N),0===N)return s[q++]=20971520,s[q++]=20971520,u.bits=1,0;for(H=1;H<N&&0===M[H];H++);K<H&&(K=H);for(F=v=1;15>=F;F++)if(v<<=1,v-=M[F],0>v)return-1;if(0<v&&(0===b||1!==N))return-1;R[1]=0;for(F=1;15>F;F++)R[F+
-1]=R[F]+M[F];for(G=0;G<r;G++)0!==c[d+G]&&(t[R[c[d+G]]++]=G);if(0===b?(B=I=t,A=19):1===b?(B=f,T-=257,I=g,Y-=257,A=256):(B=k,I=l,A=-1),W=0,G=0,F=H,z=q,R=K,X=0,y=-1,V=1<<K,r=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;E=F-X;t[G]<A?(C=0,D=t[G]):t[G]>A?(C=I[Y+t[G]],D=B[T+t[G]]):(C=96,D=0);v=1<<F-X;H=x=1<<R;do x-=v,s[z+(W>>X)+x]=E<<24|C<<16|D|0;while(0!==x);for(v=1<<F-1;W&v;)v>>=1;if(0!==v?(W&=v-1,W+=v):W=0,G++,0===--M[F]){if(F===N)break;F=c[d+t[G]]}if(F>K&&(W&r)!==y){0===X&&(X=K);z+=H;R=
-F-X;for(v=1<<R;R+X<N&&(v-=M[R+X],!(0>=v));)R++,v<<=1;if(V+=1<<R,1===b&&852<V||2===b&&592<V)return 1;y=W&r;s[y]=K<<24|R<<16|z-q|0}}return 0!==W&&(s[z+W]=F-X<<24|4194304),u.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,r,u,q,s,t){var v,x,z,y,E,A,D,C;y=t.bits;for(var F=0,H=0,G=0,N=0,K=0,R=0,X=0,V=0,W=0,B=null,T=0,M=new e.Buf16(16),R=new e.Buf16(16),I=null,Y=0,F=0;15>=F;F++)M[F]=0;for(H=0;H<r;H++)M[c[d+H]]++;K=y;for(N=15;1<=N&&0===M[N];N--);if(K>N&&(K=N),0===N)return u[q++]=20971520,u[q++]=20971520,t.bits=1,0;for(G=1;G<N&&0===M[G];G++);K<G&&(K=G);for(F=v=1;15>=F;F++)if(v<<=1,v-=M[F],0>v)return-1;if(0<v&&(0===b||1!==N))return-1;R[1]=0;for(F=1;15>F;F++)R[F+
+1]=R[F]+M[F];for(H=0;H<r;H++)0!==c[d+H]&&(s[R[c[d+H]]++]=H);if(0===b?(B=I=s,E=19):1===b?(B=f,T-=257,I=g,Y-=257,E=256):(B=k,I=l,E=-1),W=0,H=0,F=G,y=q,R=K,X=0,z=-1,V=1<<K,r=V-1,1===b&&852<V||2===b&&592<V)return 1;for(var L=0;;){L++;A=F-X;s[H]<E?(D=0,C=s[H]):s[H]>E?(D=I[Y+s[H]],C=B[T+s[H]]):(D=96,C=0);v=1<<F-X;G=x=1<<R;do x-=v,u[y+(W>>X)+x]=A<<24|D<<16|C|0;while(0!==x);for(v=1<<F-1;W&v;)v>>=1;if(0!==v?(W&=v-1,W+=v):W=0,H++,0===--M[F]){if(F===N)break;F=c[d+s[H]]}if(F>K&&(W&r)!==z){0===X&&(X=K);y+=G;R=
+F-X;for(v=1<<R;R+X<N&&(v-=M[R+X],!(0>=v));)R++,v<<=1;if(V+=1<<R,1===b&&852<V||2===b&&592<V)return 1;z=W&r;u[z]=K<<24|R<<16|y-q|0}}return 0!==W&&(u[y+W]=F-X<<24|4194304),t.bits=K,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end","0":"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,
f){this.static_tree=b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function k(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function l(b,c,d){b.bi_valid>V-d?(b.bi_buf|=c<<b.bi_valid&65535,k(b,b.bi_buf),b.bi_buf=c>>V-b.bi_valid,b.bi_valid+=d-V):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function m(b,c,d){l(b,d[2*c],d[2*c+1])}function n(b,c){var d=0;do d|=
-1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(X+1),k=0;for(e=1;e<=X;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function r(b){var c;for(c=0;c<H;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function s(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=
-2*c,k=2*d;return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function u(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+G+1,c),g=I[k],0!==g&&(f-=P[k],l(b,f,g)),e--,k=256>e?ca[e]:ca[256+(e>>>7)],m(b,k,d),g=Y[k],
-0!==g&&(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,W,c)}function v(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=R;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)t(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,k,1),
-e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,t(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,r,g=c.dyn_tree,l=c.max_code,s=c.stat_desc.static_tree,q=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,u=c.stat_desc.extra_base,v=c.stat_desc.max_length,x=0;for(e=0;e<=X;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<R;d++)f=b.heap[d],e=g[2*
-g[2*f+1]+1]+1,e>v&&(e=v,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=u&&(n=B[f-u]),r=g[2*f],b.opt_len+=r*(e+n),q&&(b.static_len+=r*(s[2*f+1]+n)));if(0!==x){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;x-=2}while(0<x);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=
-d;e++)f=g,g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*B]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*M]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function y(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,r=4;0===g&&(p=138,r=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<r){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,B,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b,
-n-11,7));n=0;k=f;0===g?(p=138,r=3):f===g?(p=6,r=3):(p=7,r=4)}}function z(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return C;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return D;for(c=32;c<G;c++)if(0!==b.dyn_ltree[2*c])return D;return C}function A(b,c,d,e){l(b,(F<<1)+(e?1:0),3);s(b);k(b,d);k(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),C=0,D=1,F=0,G=256,H=G+1+29,N=30,K=19,R=2*H+1,X=15,V=16,W=256,
-B=16,T=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(H+2));e(O);var S=Array(2*N);e(S);var ca=Array(512);e(ca);var ba=Array(256);e(ba);var P=Array(29);e(P);var Z=Array(N);e(Z);var aa,U,Q,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(X+1);for(e=d=0;28>e;e++){P[e]=d;for(c=0;c<1<<I[e];c++)ba[d++]=
-e}ba[d-1]=e;for(e=d=0;16>e;e++){Z[e]=d;for(c=0;c<1<<Y[e];c++)ca[d++]=e}for(d>>=7;e<N;e++){Z[e]=d<<7;for(c=0;c<1<<Y[e]-7;c++)ca[256+d++]=e}for(c=0;c<=X;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,H+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);aa=new f(O,I,G+1,H,X);U=new f(S,Y,0,N,X);Q=new f([],L,0,K,7);ga=!0}b.l_desc=new g(b.dyn_ltree,aa);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,
-Q);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=A;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=z(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(g=K-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)A(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),u(b,O,S);
-else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);u(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&s(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+G+1)]++,b.dyn_dtree[2*(256>
+1&b,b>>>=1,d<<=1;while(0<--c);return d>>>1}function p(b,c,d){var e,f=Array(X+1),k=0;for(e=1;e<=X;e++)f[e]=k=k+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=n(f[e]++,e))}function r(b){var c;for(c=0;c<G;c++)b.dyn_ltree[2*c]=0;for(c=0;c<N;c++)b.dyn_dtree[2*c]=0;for(c=0;c<K;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*W]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function u(b){8<b.bi_valid?k(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=
+2*c,k=2*d;return b[f]<b[k]||b[f]===b[k]&&e[c]<=e[d]}function s(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function t(b,c,d){var e,f,k,g,n=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*n]<<8|b.pending_buf[b.d_buf+2*n+1],f=b.pending_buf[b.l_buf+n],n++,0===e?m(b,f,c):(k=ba[f],m(b,k+H+1,c),g=I[k],0!==g&&(f-=P[k],l(b,f,g)),e--,k=256>e?ca[e]:ca[256+(e>>>7)],m(b,k,d),g=Y[k],
+0!==g&&(e-=Z[k],l(b,e,g)));while(n<b.last_lit)}m(b,W,c)}function v(b,c){var d,e,f,k=c.dyn_tree;e=c.stat_desc.static_tree;var g=c.stat_desc.has_stree,l=c.stat_desc.elems,m=-1;b.heap_len=0;b.heap_max=R;for(d=0;d<l;d++)0!==k[2*d]?(b.heap[++b.heap_len]=m=d,b.depth[d]=0):k[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>m?++m:0,k[2*f]=1,b.depth[f]=0,b.opt_len--,g&&(b.static_len-=e[2*f+1]);c.max_code=m;for(d=b.heap_len>>1;1<=d;d--)s(b,k,d);f=l;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],s(b,k,1),
+e=b.heap[1],b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,k[2*f]=k[2*d]+k[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,k[2*d+1]=k[2*e+1]=f,b.heap[1]=f++,s(b,k,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var n,r,g=c.dyn_tree,l=c.max_code,u=c.stat_desc.static_tree,q=c.stat_desc.has_stree,B=c.stat_desc.extra_bits,t=c.stat_desc.extra_base,v=c.stat_desc.max_length,x=0;for(e=0;e<=X;e++)b.bl_count[e]=0;g[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<R;d++)f=b.heap[d],e=g[2*
+g[2*f+1]+1]+1,e>v&&(e=v,x++),g[2*f+1]=e,f>l||(b.bl_count[e]++,n=0,f>=t&&(n=B[f-t]),r=g[2*f],b.opt_len+=r*(e+n),q&&(b.static_len+=r*(u[2*f+1]+n)));if(0!==x){do{for(e=v-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[v]--;x-=2}while(0<x);for(e=v;0!==e;e--)for(f=b.bl_count[e];0!==f;)n=b.heap[--d],n>l||(g[2*n+1]!==e&&(b.opt_len+=(e-g[2*n+1])*g[2*n],g[2*n+1]=e),f--)}p(k,m,b.bl_count)}function x(b,c,d){var e,f,k=-1,g=c[1],l=0,m=7,n=4;0===g&&(m=138,n=3);c[2*(d+1)+1]=65535;for(e=0;e<=
+d;e++)f=g,g=c[2*(e+1)+1],++l<m&&f===g||(l<n?b.bl_tree[2*f]+=l:0!==f?(f!==k&&b.bl_tree[2*f]++,b.bl_tree[2*B]++):10>=l?b.bl_tree[2*T]++:b.bl_tree[2*M]++,l=0,k=f,0===g?(m=138,n=3):f===g?(m=6,n=3):(m=7,n=4))}function z(b,c,d){var e,f,k=-1,g=c[1],n=0,p=7,r=4;0===g&&(p=138,r=3);for(e=0;e<=d;e++)if(f=g,g=c[2*(e+1)+1],!(++n<p&&f===g)){if(n<r){do m(b,f,b.bl_tree);while(0!==--n)}else 0!==f?(f!==k&&(m(b,f,b.bl_tree),n--),m(b,B,b.bl_tree),l(b,n-3,2)):10>=n?(m(b,T,b.bl_tree),l(b,n-3,3)):(m(b,M,b.bl_tree),l(b,
+n-11,7));n=0;k=f;0===g?(p=138,r=3):f===g?(p=6,r=3):(p=7,r=4)}}function y(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return D;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<H;c++)if(0!==b.dyn_ltree[2*c])return C;return D}function E(b,c,d,e){l(b,(F<<1)+(e?1:0),3);u(b);k(b,d);k(b,~d);A.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var A=b("../utils/common"),D=0,C=1,F=0,H=256,G=H+1+29,N=30,K=19,R=2*G+1,X=15,V=16,W=256,
+B=16,T=17,M=18,I=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O=Array(2*(G+2));e(O);var S=Array(2*N);e(S);var ca=Array(512);e(ca);var ba=Array(256);e(ba);var P=Array(29);e(P);var Z=Array(N);e(Z);var aa,U,Q,ga=!1;d._tr_init=function(b){if(!ga){var c,d,e,k=Array(X+1);for(e=d=0;28>e;e++){P[e]=d;for(c=0;c<1<<I[e];c++)ba[d++]=
+e}ba[d-1]=e;for(e=d=0;16>e;e++){Z[e]=d;for(c=0;c<1<<Y[e];c++)ca[d++]=e}for(d>>=7;e<N;e++){Z[e]=d<<7;for(c=0;c<1<<Y[e]-7;c++)ca[256+d++]=e}for(c=0;c<=X;c++)k[c]=0;for(c=0;143>=c;)O[2*c+1]=8,c++,k[8]++;for(;255>=c;)O[2*c+1]=9,c++,k[9]++;for(;279>=c;)O[2*c+1]=7,c++,k[7]++;for(;287>=c;)O[2*c+1]=8,c++,k[8]++;p(O,G+1,k);for(c=0;c<N;c++)S[2*c+1]=5,S[2*c]=n(c,5);aa=new f(O,I,H+1,G,X);U=new f(S,Y,0,N,X);Q=new f([],L,0,K,7);ga=!0}b.l_desc=new g(b.dyn_ltree,aa);b.d_desc=new g(b.dyn_dtree,U);b.bl_desc=new g(b.bl_tree,
+Q);b.bi_buf=0;b.bi_valid=0;r(b)};d._tr_stored_block=E;d._tr_flush_block=function(b,c,d,e){var f,k,g=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=y(b));v(b,b.l_desc);v(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);v(b,b.bl_desc);for(g=K-1;3<=g&&0===b.bl_tree[2*J[g]+1];g--);g=(b.opt_len+=3*(g+1)+14,g);f=b.opt_len+3+7>>>3;k=b.static_len+3+7>>>3;k<=f&&(f=k)}else f=k=d+5;if(d+4<=f&&-1!==c)E(b,c,d,e);else if(4===b.strategy||k===f)l(b,2+(e?1:0),3),t(b,O,S);
+else{l(b,4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;g+=1;l(b,c-257,5);l(b,d-1,5);l(b,g-4,4);for(f=0;f<g;f++)l(b,b.bl_tree[2*J[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);t(b,b.dyn_ltree,b.dyn_dtree)}r(b);e&&u(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ba[d]+H+1)]++,b.dyn_dtree[2*(256>
c?ca[c]:ca[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){l(b,2,3);m(b,W,O);16===b.bi_valid?(k(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,
c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";
window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev?"iconSearch":"https://www.draw.io/iconSearch";window.TEMPLATE_PATH=window.TEMPLATE_PATH||"/templates";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
@@ -231,7 +231,7 @@ mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=M
mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};mxRectangle.prototype.rotate90=function(){var a=(this.width-this.height)/2;this.x+=a;this.y-=a;a=this.width;this.width=this.height;this.height=a};mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
mxRectangle.fromRectangle=function(a){return new mxRectangle(a.x,a.y,a.width,a.height)};
var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,k=0;k<b.length;k++){var l=b[k];if(l instanceof mxGeometryChange||l instanceof mxTerminalChange||l instanceof mxValueChange||l instanceof mxChildChange||l instanceof mxStyleChange){var m=a.getView().getState(l.cell||l.child,!1);if(null!=m)if(g=!0,l.constructor!=mxGeometryChange||a.model.isEdge(l.cell))mxUtils.setOpacity(m.shape.node,100*d/10);else{var n=a.getView().scale,p=(l.geometry.x-l.previous.x)*n,r=(l.geometry.y-
-l.previous.y)*n,s=(l.geometry.width-l.previous.width)*n,n=(l.geometry.height-l.previous.height)*n;0==d?(m.x-=p,m.y-=r,m.width-=s,m.height-=n):(m.x+=p/10,m.y+=r/10,m.width+=s/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+l.previous.y)*n,u=(l.geometry.width-l.previous.width)*n,n=(l.geometry.height-l.previous.height)*n;0==d?(m.x-=p,m.y-=r,m.width-=u,m.height-=n):(m.x+=p/10,m.y+=r/10,m.width+=u/10,m.height+=n/10);a.cellRenderer.redraw(m);mxEffects.cascadeOpacity(a,l.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var k=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(k,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(k,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),parseCssNumber:function(a){"thin"==
a?a="2":"medium"==a?a="4":"thick"==a&&(a="6");a=parseFloat(a);isNaN(a)&&(a=0);return a},setPrefixedStyle:function(){var a=null;mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&9<=document.documentMode&&10>document.documentMode&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==
@@ -254,9 +254,9 @@ f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(a,c){mxUti
null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,(!mxUtils.isNaN(a[d])||!mxUtils.isNaN(b[d]))&&a[d]!=b[d])return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=
[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" \x3d [null]\n";else if("function"==typeof a[c])b+=c+" \x3d\x3e [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" \x3d\x3e ["+d+"]\n");else b+=c+
-" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*m+r*n;var m=-1*r*m+p*n,n=e*e,s=m*m,q=c*c,t=d*d,u=n/q+s/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((q*t-q*s-t*n)/(q*s+t*n)));n=f*c*m/d;s=-1*f*d*
-e/c;k=p*n-r*s+k/2;l=r*n+p*s+l/2;q=Math.atan2((m-s)/d,(e-n)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-m-s)/d,(-e-n)/c)-Math.atan2((m-s)/d,(e-n)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),s=-m*(n*x+d*v),q=-m*(c*x-p*v),r=[],y=0;y<g;++y){f+=e;var v=Math.cos(f),x=Math.sin(f),t=n*v-d*x+k,u=c*v+p*x+l,z=-m*(n*x+d*v),
-v=-m*(c*x-p*v),x=6*y;r[x]=Number(s+a);r[x+1]=Number(q+b);r[x+2]=Number(t-z+a);r[x+3]=Number(u-v+b);r[x+4]=Number(t+a);r[x+5]=Number(u+b);s=t+z;q=u+v}return r},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,
+" \x3d "+a[c]+"\n"}catch(e){b+=c+"\x3d"+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return r;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),r=Math.sin(e*Math.PI/180);e=p*m+r*n;var m=-1*r*m+p*n,n=e*e,u=m*m,q=c*c,s=d*d,t=n/q+u/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((q*s-q*u-s*n)/(q*u+s*n)));n=f*c*m/d;u=-1*f*d*
+e/c;k=p*n-r*u+k/2;l=r*n+p*u+l/2;q=Math.atan2((m-u)/d,(e-n)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-m-u)/d,(-e-n)/c)-Math.atan2((m-u)/d,(e-n)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=r;d*=r;for(var v=Math.cos(f),x=Math.sin(f),u=-m*(n*x+d*v),q=-m*(c*x-p*v),r=[],z=0;z<g;++z){f+=e;var v=Math.cos(f),x=Math.sin(f),s=n*v-d*x+k,t=c*v+p*x+l,y=-m*(n*x+d*v),
+v=-m*(c*x-p*v),x=6*z;r[x]=Number(u+a);r[x+1]=Number(q+b);r[x+2]=Number(s-y+a);r[x+3]=Number(t-v+b);r[x+4]=Number(s+a);r[x+5]=Number(t+b);u=s+y;q=t+v}return r},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,
d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;
c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=
mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;
@@ -485,8 +485,8 @@ mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){e=this.converter.convert
mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
-mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var s=this.createElement("text");s.setAttribute("x",this.format(a));s.setAttribute("y",this.format(b));s.setAttribute("w",this.format(c));s.setAttribute("h",this.format(d));s.setAttribute("str",e);null!=f&&s.setAttribute("align",f);null!=g&&s.setAttribute("valign",g);s.setAttribute("wrap",k?"1":"0");null==l&&(l="");s.setAttribute("format",l);null!=m&&s.setAttribute("overflow",
-m);null!=n&&s.setAttribute("clip",n?"1":"0");null!=p&&s.setAttribute("rotation",p);null!=r&&s.setAttribute("dir",r);this.root.appendChild(s)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var u=this.createElement("text");u.setAttribute("x",this.format(a));u.setAttribute("y",this.format(b));u.setAttribute("w",this.format(c));u.setAttribute("h",this.format(d));u.setAttribute("str",e);null!=f&&u.setAttribute("align",f);null!=g&&u.setAttribute("valign",g);u.setAttribute("wrap",k?"1":"0");null==l&&(l="");u.setAttribute("format",l);null!=m&&u.setAttribute("overflow",
+m);null!=n&&u.setAttribute("clip",n?"1":"0");null!=p&&u.setAttribute("rotation",p);null!=r&&u.setAttribute("dir",r);this.root.appendChild(u)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}})();mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;
mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1;mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;
@@ -523,23 +523,23 @@ mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;d="display:in
mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(a=this.convertHtml(a),"fill"!=e&&"width"!=e?a='\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;text-align:inherit;text-decoration:inherit;'+
b+'"\x3e'+a+"\x3c/div\x3e":d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"'+d+'"\x3e'+a+"\x3c/div\x3e").documentElement};
mxSvgCanvas2D.prototype.invalidateCachedOffsetSize=function(a){delete a.firstChild.mxCachedOffsetWidth;delete a.firstChild.mxCachedFinalOffsetWidth;delete a.firstChild.mxCachedFinalOffsetHeight};
-mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var s=this.state;a+=s.dx;b+=s.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(c)+"px"):"fill"==k?(r.style.width=Math.round(c+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(c+1)+"px",0<d&&(r.style.maxHeight=Math.round(d)+
-"px"));g&&0<c&&(r.style.width=Math.round(c+1)+"px");var q=0,t=0,t=r;null!=t.firstChild&&"DIV"==t.firstChild.nodeName&&(t=t.firstChild);q=(null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:t.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,c)),r.style.width=q+"px");q=(null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:t.offsetWidth)+2;t=(null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:t.offsetHeight)-2;l&&(t=Math.min(t,d),q=Math.min(q,c));"width"==k?d=t:"fill"!=k&&(c=q,d=t);l=
-g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(e+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=m&&(e+="rotate("+m+","+-g+","+
+mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,k,l,m,n){if(null!=n&&null!=n.firstChild&&null!=n.firstChild.firstChild&&null!=n.firstChild.firstChild.firstChild){n=n.firstChild;var p=n.firstChild,r=p.firstChild;m=null!=m?m:0;var u=this.state;a+=u.dx;b+=u.dy;l?(r.style.maxHeight=Math.round(d)+"px",r.style.maxWidth=Math.round(c)+"px"):"fill"==k?(r.style.width=Math.round(c+1)+"px",r.style.height=Math.round(d+1)+"px"):"width"==k&&(r.style.width=Math.round(c+1)+"px",0<d&&(r.style.maxHeight=Math.round(d)+
+"px"));g&&0<c&&(r.style.width=Math.round(c+1)+"px");var q=0,s=0,s=r;null!=s.firstChild&&"DIV"==s.firstChild.nodeName&&(s=s.firstChild);q=(null!=n.mxCachedOffsetWidth?n.mxCachedOffsetWidth:s.offsetWidth)+2;g&&"fill"!=k&&(l&&(q=Math.min(q,c)),r.style.width=q+"px");q=(null!=n.mxCachedFinalOffsetWidth?n.mxCachedFinalOffsetWidth:s.offsetWidth)+2;s=(null!=n.mxCachedFinalOffsetHeight?n.mxCachedFinalOffsetHeight:s.offsetHeight)-2;l&&(s=Math.min(s,d),q=Math.min(q,c));"width"==k?d=s:"fill"!=k&&(c=q,d=s);l=
+g=0;e==mxConstants.ALIGN_CENTER?g-=c/2:e==mxConstants.ALIGN_RIGHT&&(g-=c);a+=g;f==mxConstants.ALIGN_MIDDLE?l-=d/2:f==mxConstants.ALIGN_BOTTOM&&(l-=d);"fill"!=k&&mxClient.IS_FF&&mxClient.IS_WIN&&(l-=2);b+=l;e=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(e+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=m&&(e+="rotate("+m+","+-g+","+
-l+")");n.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);p.setAttribute("width",Math.round(Math.max(1,c)));p.setAttribute("height",Math.round(Math.max(1,d)))}};
-mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var s=this.state;a+=s.dx;b+=s.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>s.alpha&&t.setAttribute("opacity",s.alpha);var u=this.createElement("foreignObject");u.setAttribute("style","overflow:visible;");u.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);t.appendChild(u);this.root.appendChild(t);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var y=
-document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(x);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=s.fontBorderColor&&(v+=2,r+=2);if(k&&0<
-c){var z=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var A=y.style.whiteSpace;x.style.whiteSpace="nowrap";z<x.offsetWidth&&(y.style.whiteSpace=A)}n&&(z=Math.min(z,c));y.style.width=z+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=v+"px";q.setAttribute("style",y.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;y.parentNode.removeChild(y);u.appendChild(q)}else this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):u.appendChild(q),y=q,null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,k&&"break-word"==q.style.wordWrap&&(y.style.width="100%")),z=y.offsetWidth,0==z&&q.parentNode==u&&(q.style.visibility="hidden",document.body.appendChild(q),z=y.offsetWidth),this.cacheOffsetSize&&(t.mxCachedOffsetWidth=z),!n&&k&&0<c&&(this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(A=q.style.whiteSpace,q.style.whiteSpace="nowrap",z<y.offsetWidth&&
-(q.style.whiteSpace=A)),v=z+v-1,k&&"fill"!=m&&"width"!=m&&(n&&(v=Math.min(v,c)),q.style.width=v+"px"),v=y.offsetWidth,x=y.offsetHeight,this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=v,t.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=u&&(u.appendChild(q),q.style.visibility="");n&&(x=Math.min(x,d),v=Math.min(v,c));"width"==m?d=x:"fill"!=m&&(c=v,d=x);1>s.alpha&&t.setAttribute("opacity",s.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
-r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;y=1!=s.scale?"scale("+s.scale+")":"";0!=s.rotation&&this.rotateHtml?(y+="rotate("+s.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*s.scale,(b+d/2)*s.scale,s.rotation,s.rotationCx,s.rotationCy),a=b.x-c*s.scale/2,b=b.y-d*s.scale/2):(a*=s.scale,b*=s.scale);0!=p&&(y+="rotate("+p+","+-q+","+-r+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
-")"+y);u.setAttribute("width",Math.round(Math.max(1,c)));u.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(u,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(u.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(u),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,r)}};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){p=null!=p?p:0;var u=this.state;a+=u.dx;b+=u.dy;if(this.foEnabled&&"html"==l){var q="vertical-align:top;";n?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==m?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==m&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=k&&0<c?q+("width:"+
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",s=this.createElement("g");1>u.alpha&&s.setAttribute("opacity",u.alpha);var t=this.createElement("foreignObject");t.setAttribute("style","overflow:visible;");t.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,m);if(null!=q){null!=r&&q.setAttribute("dir",r);s.appendChild(t);this.root.appendChild(s);var v=0,x=0;r=v=2;if(mxClient.IS_IE&&(9==document.documentMode||!mxClient.IS_SVG)){var z=
+document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";x=document.createElement("div");x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(x);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=u.fontBorderColor&&(v+=2,r+=2);if(k&&0<
+c){var y=x.offsetWidth;if(!n&&k&&0<c&&this.root.ownerDocument!=document&&"fill"!=m){var E=z.style.whiteSpace;x.style.whiteSpace="nowrap";y<x.offsetWidth&&(z.style.whiteSpace=E)}n&&(y=Math.min(y,c));z.style.width=y+"px";v=x.offsetWidth+v+0;x=x.offsetHeight+r;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=v+"px";q.setAttribute("style",z.style.cssText)}else v=x.offsetWidth+v,x=x.offsetHeight+r;z.parentNode.removeChild(z);t.appendChild(q)}else this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):t.appendChild(q),z=q,null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,k&&"break-word"==q.style.wordWrap&&(z.style.width="100%")),y=z.offsetWidth,0==y&&q.parentNode==t&&(q.style.visibility="hidden",document.body.appendChild(q),y=z.offsetWidth),this.cacheOffsetSize&&(s.mxCachedOffsetWidth=y),!n&&k&&0<c&&(this.root.ownerDocument!=document&&"fill"!=m&&"width"!=m)&&(E=q.style.whiteSpace,q.style.whiteSpace="nowrap",y<z.offsetWidth&&
+(q.style.whiteSpace=E)),v=y+v-1,k&&"fill"!=m&&"width"!=m&&(n&&(v=Math.min(v,c)),q.style.width=v+"px"),v=z.offsetWidth,x=z.offsetHeight,this.cacheOffsetSize&&(s.mxCachedFinalOffsetWidth=v,s.mxCachedFinalOffsetHeight=x),x-=r,q.parentNode!=t&&(t.appendChild(q),q.style.visibility="");n&&(x=Math.min(x,d),v=Math.min(v,c));"width"==m?d=x:"fill"!=m&&(c=v,d=x);1>u.alpha&&s.setAttribute("opacity",u.alpha);r=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?
+r-=d/2:g==mxConstants.ALIGN_BOTTOM&&(r-=d);"fill"!=m&&mxClient.IS_FF&&mxClient.IS_WIN&&(r-=2);b+=r;z=1!=u.scale?"scale("+u.scale+")":"";0!=u.rotation&&this.rotateHtml?(z+="rotate("+u.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*u.scale,(b+d/2)*u.scale,u.rotation,u.rotationCx,u.rotationCy),a=b.x-c*u.scale/2,b=b.y-d*u.scale/2):(a*=u.scale,b*=u.scale);0!=p&&(z+="rotate("+p+","+-q+","+-r+")");s.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+
+")"+z);t.setAttribute("width",Math.round(Math.max(1,c)));t.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(t,a,b,c,d,e,f,g,k,l,m,n,p),null!=a&&(t.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(t),c.appendChild(a),s.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,k,m,n,p,r)}};
mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
-mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,s=this.createElement("g"),q=k.transform||"";this.updateFont(s);0!=n&&(q+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&s.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
-n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),s.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")):s.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&s.setAttribute("text-anchor",
-n);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&s.setAttribute("font-size",r*k.scale+"px");0<q.length&&s.setAttribute("transform",q);1>k.alpha&&s.setAttribute("opacity",k.alpha);q=e.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var t=r+(q.length-1)*p;n=b+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(t,d):t)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(t,d):t,n-=m+2));for(m=0;m<q.length;m++)0<
-q[m].length&&0<mxUtils.trim(q[m]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(r,q[m]),s.appendChild(r)),n+=p;this.root.appendChild(s);this.addTextBackground(s,e,a,b,c,"fill"==l?d:t,f,g,l)};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p){n=null!=n?n:0;k=this.state;var r=k.fontSize,u=this.createElement("g"),q=k.transform||"";this.updateFont(u);0!=n&&(q+="rotate("+n+","+this.format(a*k.scale)+","+this.format(b*k.scale)+")");null!=p&&u.setAttribute("direction",p);m&&0<c&&0<d&&(p=a,n=b,f==mxConstants.ALIGN_CENTER?p-=c/2:f==mxConstants.ALIGN_RIGHT&&(p-=c),"fill"!=l&&(g==mxConstants.ALIGN_MIDDLE?n-=d/2:g==mxConstants.ALIGN_BOTTOM&&(n-=d)),n=this.createClip(p*k.scale-2,
+n*k.scale-2,c*k.scale+4,d*k.scale+4),null!=this.defs?this.defs.appendChild(n):this.root.appendChild(n),!mxClient.IS_CHROME_APP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&this.root.ownerDocument==document?(p=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),u.setAttribute("clip-path","url("+p+"#"+n.getAttribute("id")+")")):u.setAttribute("clip-path","url(#"+n.getAttribute("id")+")"));n=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=n&&u.setAttribute("text-anchor",
+n);(!this.styleEnabled||r!=mxConstants.DEFAULT_FONTSIZE)&&u.setAttribute("font-size",r*k.scale+"px");0<q.length&&u.setAttribute("transform",q);1>k.alpha&&u.setAttribute("opacity",k.alpha);q=e.split("\n");p=Math.round(r*mxConstants.LINE_HEIGHT);var s=r+(q.length-1)*p;n=b+r-1;g==mxConstants.ALIGN_MIDDLE?"fill"==l?n-=d/2:(m=(this.matchHtmlAlignment&&m&&0<d?Math.min(s,d):s)/2,n-=m+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==l?n-=d:(m=this.matchHtmlAlignment&&m&&0<d?Math.min(s,d):s,n-=m+2));for(m=0;m<q.length;m++)0<
+q[m].length&&0<mxUtils.trim(q[m]).length&&(r=this.createElement("text"),r.setAttribute("x",this.format(a*k.scale)+this.textOffset),r.setAttribute("y",this.format(n*k.scale)+this.textOffset),mxUtils.write(r,q[m]),u.appendChild(r)),n+=p;this.root.appendChild(u);this.addTextBackground(u,e,a,b,c,"fill"==l?d:s,f,g,l)};
mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
"underline")};
mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,k,l){var m=this.state;if(null!=m.fontBackgroundColor||null!=m.fontBorderColor){var n=null;if("fill"==l||"width"==l)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),k==mxConstants.ALIGN_MIDDLE?d-=f/2:k==mxConstants.ALIGN_BOTTOM&&(d-=f),n=new mxRectangle((c+1)*m.scale,d*m.scale,(e-2)*m.scale,(f+2)*m.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var n=a.getBBox(),p=mxClient.IS_IE&&mxClient.IS_SVG,
@@ -565,24 +565,24 @@ mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,k){var l=null;f?(l=this.cre
mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.style.textDecoration="inherit",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=
f,c.innerHTML=a);a=c.style;a.fontSize=e.fontSize/this.vmlScale+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
(a.textDecoration="underline");return c};
-mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){var s=this.state;if("html"==l){null!=s.rotation&&(b=this.rotatePoint(a,b,s.rotation,s.rotationCx,s.rotationCy),a=b.x,b=b.y);8==document.documentMode&&!mxClient.IS_EM?(a+=s.dx,b+=s.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(b-=1)):(a*=s.scale,b*=s.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline";
-l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=s.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),u=t.x,t=t.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
-(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=s.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){var u=this.state;if("html"==l){null!=u.rotation&&(b=this.rotatePoint(a,b,u.rotation,u.rotationCx,u.rotationCy),a=b.x,b=b.y);8==document.documentMode&&!mxClient.IS_EM?(a+=u.dx,b+=u.dy,"fill"!=m&&g==mxConstants.ALIGN_TOP&&(b-=1)):(a*=u.scale,b*=u.scale);l=8==document.documentMode&&!mxClient.IS_EM?this.createVmlElement("group"):this.createElement("div");l.style.position="absolute";l.style.display="inline";
+l.style.left=this.format(a)+"px";l.style.top=this.format(b)+"px";l.style.zoom=u.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var s=mxUtils.getAlignmentAsPoint(f,g),t=s.x,s=s.y;e=this.createDiv(e,f,g,m);f=this.createElement("div");null!=r&&e.setAttribute("dir",r);if(k&&0<c){if(n||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var v=e;null!=v.firstChild&&"DIV"==v.firstChild.nodeName&&
+(v.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";p=u.rotation+(p||0);this.rotateHtml&&0!=p?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&!mxClient.IS_EM&&"DIV"!=this.root.nodeName?(q.appendChild(f),l.appendChild(q)):l.appendChild(f)):8==document.documentMode&&!mxClient.IS_EM?(q.appendChild(e),l.appendChild(q)):(e.style.display="inline",l.appendChild(e));"DIV"!=this.root.nodeName?(r=this.createVmlElement("rect"),r.stroked="false",r.filled=
"false",r.appendChild(l),this.root.appendChild(r)):this.root.appendChild(l);n?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==m?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==m&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=p){v=p*(Math.PI/180);p=parseFloat(parseFloat(Math.cos(v)).toFixed(8));
r=parseFloat(parseFloat(Math.sin(-v)).toFixed(8));v%=2*Math.PI;0>v&&(v+=2*Math.PI);v%=Math.PI;v>Math.PI/2&&(v=Math.PI-v);g=Math.cos(v);var x=Math.sin(v);8==document.documentMode&&!mxClient.IS_EM&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);v=q.offsetWidth+3;q=q.offsetHeight;n?(c=Math.min(c,v),
-q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,e.style.height=q+"px";d=q;n=(d-d*g+c*-x)/2-r*c*(u+0.5)+p*d*(t+0.5);k=(c-c*g+d*-x)/2+p*c*(u+0.5)+r*d*(t+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*s.scale)+"px",m.style.top=this.format(b+(n-d/2)*s.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(s=8==document.documentMode&&
-!mxClient.IS_EM?1:s.scale,l.style.left=this.format(a+(k-c/2)*s)+"px",l.style.top=this.format(b+(n-d/2)*s)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
-"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),s=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",s.appendChild(e),l.style.left=this.format(a+c*u*this.state.scale)+"px",l.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*u+
-"%",q.style.top=100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,r)}};
+q=Math.min(q,d)):c=v;k&&(e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(n||"width"==m)&&q>d)q=d,e.style.height=q+"px";d=q;n=(d-d*g+c*-x)/2-r*c*(t+0.5)+p*d*(s+0.5);k=(c-c*g+d*-x)/2+p*c*(t+0.5)+r*d*(s+0.5);"group"==l.nodeName&&"DIV"==this.root.nodeName?(m=this.createElement("div"),m.style.display="inline-block",m.style.position="absolute",m.style.left=this.format(a+(k-c/2)*u.scale)+"px",m.style.top=this.format(b+(n-d/2)*u.scale)+"px",l.parentNode.appendChild(m),m.appendChild(l)):(u=8==document.documentMode&&
+!mxClient.IS_EM?1:u.scale,l.style.left=this.format(a+(k-c/2)*u)+"px",l.style.top=this.format(b+(n-d/2)*u)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11\x3d"+p+", M12\x3d"+r+", M21\x3d"+-r+", M22\x3d"+p+", sizingMethod\x3d'auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity\x3d"+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
+"top",1>this.state.alpha&&(l.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),u=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&n&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",u.appendChild(e),l.style.left=this.format(a+c*t*this.state.scale)+"px",l.style.top=this.format(b+d*s*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity\x3d"+100*this.state.alpha+")"),q.style.left=100*t+
+"%",q.style.top=100*s+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,k,l,m,n,p,r)}};
mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,k,l,m,n,p,r){k=this.state;a=(a+k.dx)*k.scale;b=(b+k.dy)*k.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=k.fontColor;d.opacity=100*k.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
"v-text-align:"+f;d.style.align=f;d.style.fontFamily=k.fontFamily;d.string=e;d.on="true";f=k.fontSize*k.scale/this.vmlScale;d.style.fontSize=f+"px";(k.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(k.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(k.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");k=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
g==mxConstants.ALIGN_BOTTOM?f=-k/2:g!=mxConstants.ALIGN_MIDDLE&&(f=k/2);null!=p&&(c.style.rotation=p,g=p*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize/2};
mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
-mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,m=null,n=!1,p=null,r=null,s=this.getGuideTolerance(),q=s,t=s,s=a.clone();s.x+=b.x;s.y+=b.y;var u=s.x,v=s.x+s.width,x=s.getCenterX(),y=s.y,z=s.y+s.height,A=s.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-u)<q?(f=b-a.x,
-q=Math.abs(b-u),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var s=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-A)<t?(g=b-a.getCenterY(),t=Math.abs(b-A),c=!0):Math.abs(b-
-y)<t?(g=b-a.y,t=Math.abs(b-y),c=!0):Math.abs(b-z)<t&&(g=b-a.y-a.height,t=Math.abs(b-z),c=!0);c&&(p=C,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||c},E=0;E<this.states.length;E++){var C=this.states[E];null!=C&&(this.horizontal&&(b.call(this,C.getCenterX(),
-C),b.call(this,C.x,C),b.call(this,C.x+C.width,C)),this.vertical&&(s.call(this,C.getCenterY(),C),s.call(this,C.y,C),s.call(this,C.y+C.height,C)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),n||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,k=!1,l=null,m=null,n=!1,p=null,r=null,u=this.getGuideTolerance(),q=u,s=u,u=a.clone();u.x+=b.x;u.y+=b.y;var t=u.x,v=u.x+u.width,x=u.getCenterX(),z=u.y,y=u.y+u.height,E=u.getCenterY();b=function(b,c){b+=this.graph.panDx;var d=!1;Math.abs(b-x)<q?(f=b-a.getCenterX(),q=Math.abs(b-x),d=!0):Math.abs(b-t)<q?(f=b-a.x,
+q=Math.abs(b-t),d=!0):Math.abs(b-v)<q&&(f=b-a.x-a.width,q=Math.abs(b-v),d=!0);d&&(l=c,m=Math.round(b-this.graph.panDx),null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane())));k=k||d};for(var u=function(b){b+=this.graph.panDy;var c=!1;Math.abs(b-E)<s?(g=b-a.getCenterY(),s=Math.abs(b-E),c=!0):Math.abs(b-
+z)<s?(g=b-a.y,s=Math.abs(b-z),c=!0):Math.abs(b-y)<s&&(g=b-a.y-a.height,s=Math.abs(b-y),c=!0);c&&(p=D,r=Math.round(b-this.graph.panDy),null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane())));n=n||c},A=0;A<this.states.length;A++){var D=this.states[A];null!=D&&(this.horizontal&&(b.call(this,D.getCenterX(),
+D),b.call(this,D.x,D),b.call(this,D.x+D.width,D)),this.vertical&&(u.call(this,D.getCenterY(),D),u.call(this,D.y,D),u.call(this,D.y+D.height,D)))}c&&(k||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),n||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));e=this.graph.container;!k&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(null!=l&&null!=a&&(minY=Math.min(a.y+g-this.graph.panDy,l.y),maxY=Math.max(a.y+a.height+g-this.graph.panDy,
l.y+l.height)),this.guideX.points=null!=minY&&null!=maxY?[new mxPoint(m,minY),new mxPoint(m,maxY)]:[new mxPoint(m,-this.graph.panDy),new mxPoint(m,e.scrollHeight-3-this.graph.panDy)],this.guideX.stroke=this.getGuideColor(l,!0),this.guideX.node.style.visibility="visible",this.guideX.redraw());!n&&null!=this.guideY?this.guideY.node.style.visibility="hidden":null!=this.guideY&&(null!=p&&null!=a&&(minX=Math.min(a.x+f-this.graph.panDx,p.x),maxX=Math.max(a.x+a.width+f-this.graph.panDx,p.x+p.width)),this.guideY.points=
null!=minX&&null!=maxX?[new mxPoint(minX,r),new mxPoint(maxX,r)]:[new mxPoint(-this.graph.panDx,r),new mxPoint(e.scrollWidth-3-this.graph.panDx,r)],this.guideY.stroke=this.getGuideColor(p,!1),this.guideY.node.style.visibility="visible",this.guideY.redraw());b=new mxPoint(f,g)}return b};mxGuide.prototype.getGuideColor=function(a,b){return mxConstants.GUIDE_COLOR};mxGuide.prototype.hide=function(){this.setVisible(!1)};
mxGuide.prototype.setVisible=function(a){null!=this.guideX&&(this.guideX.node.style.visibility=a?"visible":"hidden");null!=this.guideY&&(this.guideY.node.style.visibility=a?"visible":"hidden")};mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
@@ -643,9 +643,9 @@ mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=thi
mxShape.prototype.createTransparentSvgRectangle=function(a,b,c,d){var e=document.createElementNS(mxConstants.NS_SVG,"rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);e.setAttribute("fill","none");e.setAttribute("stroke","none");e.setAttribute("pointer-events","all");return e};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
var mxStencilRegistry={stencils:{},addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,k,l,m){var n=mxMarker.markers[c];return null!=n?n(a,b,c,d,e,f,g,k,l,m):null}};
-(function(){function a(a){a=null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,s){c=1.118*l*r;p=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:0.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(q.x,q.y);b.lineTo(q.x-l-m/a,q.y-m+l/a);(g==mxConstants.ARROW_CLASSIC||g==mxConstants.ARROW_CLASSIC_THIN)&&b.lineTo(q.x-3*l/4,q.y-3*m/4);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.close();s?b.fillAndStroke():b.stroke()}}}function b(a){a=
-null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,s){c=1.118*l*r;g=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=g;k.x+=2*-c;k.y+=2*-g;return function(){b.begin();b.moveTo(q.x-l-m/a,q.y-m+l/a);b.lineTo(q.x,q.y);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,r){n=c==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var s=g.clone();s.x-=b;s.y-=n;g.x+=-k-b;g.y+=-l-n;var q=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(s.x,s.y);a.lineTo(s.x-
-k/2-l/q,s.y+k/q-l/2);a.lineTo(s.x-k,s.y-l);a.lineTo(s.x-k/2+l/q,s.y-l/2-k/q);a.close();r?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,r){var s=m/2,q=g.clone();g.x-=k*s;g.y-=l*s;return function(){a.ellipse(q.x-s,q.y-s,m,m);r?a.fillAndStroke():a.stroke()}});
+(function(){function a(a){a=null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,u){c=1.118*l*r;p=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=p;n=g!=mxConstants.ARROW_CLASSIC&&g!=mxConstants.ARROW_CLASSIC_THIN?1:0.75;k.x+=-l*n-c;k.y+=-m*n-p;return function(){b.begin();b.moveTo(q.x,q.y);b.lineTo(q.x-l-m/a,q.y-m+l/a);(g==mxConstants.ARROW_CLASSIC||g==mxConstants.ARROW_CLASSIC_THIN)&&b.lineTo(q.x-3*l/4,q.y-3*m/4);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.close();u?b.fillAndStroke():b.stroke()}}}function b(a){a=
+null!=a?a:2;return function(b,c,g,k,l,m,n,p,r,u){c=1.118*l*r;g=1.118*m*r;l*=n+r;m*=n+r;var q=k.clone();q.x-=c;q.y-=g;k.x+=2*-c;k.y+=2*-g;return function(){b.begin();b.moveTo(q.x-l-m/a,q.y-m+l/a);b.lineTo(q.x,q.y);b.lineTo(q.x+m/a-l,q.y-m-l/a);b.stroke()}}}function c(a,b,c,g,k,l,m,n,p,r){n=c==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=k*p*n;n*=l*p;k*=m+p;l*=m+p;var u=g.clone();u.x-=b;u.y-=n;g.x+=-k-b;g.y+=-l-n;var q=c==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(u.x,u.y);a.lineTo(u.x-
+k/2-l/q,u.y+k/q-l/2);a.lineTo(u.x-k,u.y-l);a.lineTo(u.x-k/2+l/q,u.y-l/2-k/q);a.close();r?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a(2));mxMarker.addMarker("classicThin",a(3));mxMarker.addMarker("block",a(2));mxMarker.addMarker("blockThin",a(3));mxMarker.addMarker("open",b(2));mxMarker.addMarker("openThin",b(3));mxMarker.addMarker("oval",function(a,b,c,g,k,l,m,n,p,r){var u=m/2,q=g.clone();g.x-=k*u;g.y-=l*u;return function(){a.ellipse(q.x-u,q.y-u,m,m);r?a.fillAndStroke():a.stroke()}});
mxMarker.addMarker("diamond",c);mxMarker.addMarker("diamondThin",c)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};
mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
@@ -659,19 +659,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,k=mxUti
mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b)};mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};
mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=Math.max(this.arrowWidth,this.endSize);a.grow((b/2+this.strokewidth)*this.scale)};
-mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],k=g.x-f.x,l=g.y-f.y,m=Math.sqrt(k*k+l*l),n=m-2*c-e,k=k/m,l=l/m,m=d*l/3,d=-d*k/3,e=f.x-m/2+c*k,f=f.y-d/2+c*l,p=e+m,r=f+d,s=p+n*k,n=r+n*l,q=s+m,t=n+d,u=q-3*m,v=t-3*d;a.begin();a.moveTo(e,f);a.lineTo(p,r);a.lineTo(s,n);a.lineTo(q,t);a.lineTo(g.x-c*k,g.y-c*l);a.lineTo(u,v);a.lineTo(u+m,v+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],k=g.x-f.x,l=g.y-f.y,m=Math.sqrt(k*k+l*l),n=m-2*c-e,k=k/m,l=l/m,m=d*l/3,d=-d*k/3,e=f.x-m/2+c*k,f=f.y-d/2+c*l,p=e+m,r=f+d,u=p+n*k,n=r+n*l,q=u+m,s=n+d,t=q-3*m,v=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(p,r);a.lineTo(u,n);a.lineTo(q,s);a.lineTo(g.x-c*k,g.y-c*l);a.lineTo(t,v);a.lineTo(t+m,v+d);a.close();a.fillAndStroke()};
function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;
mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
-mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],s=1;s<b.length-1&&b[s].x==
-b[0].x&&b[s].y==b[0].y;)s++;var q=b[s].x-b[0].x,s=b[s].y-b[0].y,t=Math.sqrt(q*q+s*s);if(0!=t){var u=q/t,v,x=u,y=s/t,z,A=y,t=f*y,E=-f*u,C=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=u;s=y;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,u,y,n,d,f,m,!0);else{v=b[0].x+t/2+m*u;z=b[0].y+E/2+m*y;var D=b[0].x-t/2+m*u,F=b[0].y-E/2+m*y;g?(a.moveTo(v,z),C.push(function(){a.lineTo(D,F)})):(a.moveTo(D,F),a.lineTo(v,z))}for(var G=z=v=0,t=0;t<b.length-2;t++)if(E=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),v=b[t+2].x-b[t+1].x,z=b[t+2].y-b[t+1].y,G=Math.sqrt(v*v+z*z),0!=G&&(x=v/G,A=z/G,tmp=Math.max(Math.sqrt((u*x+y*A+1)/2),0.04),v=u+x,z=y+A,G=Math.sqrt(v*v+z*z),0!=G)){v/=G;z/=G;var G=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),G=0!=E&&p?Math.max(0.1,G):Math.max(tmp,0.06),H=b[t+1].x+z*f/2/G,N=b[t+1].y-v*f/2/G;z=b[t+1].x-z*f/2/G;v=b[t+1].y+v*f/2/G;0==E||!p?(a.lineTo(H,N),function(b,c){C.push(function(){a.lineTo(b,c)})}(z,v)):-1==E?(E=z+A*f,G=v-x*f,
-a.lineTo(z+y*f,v-u*f),a.quadTo(H,N,E,G),function(b,c){C.push(function(){a.lineTo(b,c)})}(z,v)):(a.lineTo(H,N),function(b,c){var d=H-y*f,e=N+u*f,k=H-A*f,g=N+x*f;C.push(function(){a.quadTo(b,c,d,e)});C.push(function(){a.lineTo(k,g)})}(z,v));u=x;y=A}t=f*A;E=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,m,!1);else{a.lineTo(r.x-m*x+t/2,r.y-m*A+E/2);var K=r.x-m*x-t/2,R=r.y-m*A-E/2;g?(a.moveTo(K,R),C.splice(0,0,function(){a.moveTo(K,R)})):a.lineTo(K,R)}for(t=C.length-1;0<=t;t--)C[t]();g?(a.end(),
-a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,s,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-u,-y,c,e,f,m,!0),a.stroke(),a.end()))}};
+mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),k=this.isMarkerStart(),l=this.isMarkerEnd(),m=g?0:this.arrowSpacing+c/2,n=this.startSize+c,c=this.endSize+c,p=this.isArrowRounded(),r=b[b.length-1],u=1;u<b.length-1&&b[u].x==
+b[0].x&&b[u].y==b[0].y;)u++;var q=b[u].x-b[0].x,u=b[u].y-b[0].y,s=Math.sqrt(q*q+u*u);if(0!=s){var t=q/s,v,x=t,z=u/s,y,E=z,s=f*z,A=-f*t,D=[];p?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=t;u=z;if(k&&!g)this.paintMarker(a,b[0].x,b[0].y,t,z,n,d,f,m,!0);else{v=b[0].x+s/2+m*t;y=b[0].y+A/2+m*z;var C=b[0].x-s/2+m*t,F=b[0].y-A/2+m*z;g?(a.moveTo(v,y),D.push(function(){a.lineTo(C,F)})):(a.moveTo(C,F),a.lineTo(v,y))}for(var H=y=v=0,s=0;s<b.length-2;s++)if(A=mxUtils.relativeCcw(b[s].x,
+b[s].y,b[s+1].x,b[s+1].y,b[s+2].x,b[s+2].y),v=b[s+2].x-b[s+1].x,y=b[s+2].y-b[s+1].y,H=Math.sqrt(v*v+y*y),0!=H&&(x=v/H,E=y/H,tmp=Math.max(Math.sqrt((t*x+z*E+1)/2),0.04),v=t+x,y=z+E,H=Math.sqrt(v*v+y*y),0!=H)){v/=H;y/=H;var H=Math.max(tmp,Math.min(this.strokewidth/200+0.04,0.35)),H=0!=A&&p?Math.max(0.1,H):Math.max(tmp,0.06),G=b[s+1].x+y*f/2/H,N=b[s+1].y-v*f/2/H;y=b[s+1].x-y*f/2/H;v=b[s+1].y+v*f/2/H;0==A||!p?(a.lineTo(G,N),function(b,c){D.push(function(){a.lineTo(b,c)})}(y,v)):-1==A?(A=y+E*f,H=v-x*f,
+a.lineTo(y+z*f,v-t*f),a.quadTo(G,N,A,H),function(b,c){D.push(function(){a.lineTo(b,c)})}(y,v)):(a.lineTo(G,N),function(b,c){var d=G-z*f,e=N+t*f,k=G-E*f,g=N+x*f;D.push(function(){a.quadTo(b,c,d,e)});D.push(function(){a.lineTo(k,g)})}(y,v));t=x;z=E}s=f*E;A=-f*x;if(l&&!g)this.paintMarker(a,r.x,r.y,-t,-z,c,e,f,m,!1);else{a.lineTo(r.x-m*x+s/2,r.y-m*E+A/2);var K=r.x-m*x-s/2,R=r.y-m*E-A/2;g?(a.moveTo(K,R),D.splice(0,0,function(){a.moveTo(K,R)})):a.lineTo(K,R)}for(s=D.length-1;0<=s;s--)D[s]();g?(a.end(),
+a.stroke()):(a.close(),a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);p&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),k&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,u,n,d,f,m,!0),a.stroke(),a.end()),l&&!g&&(a.begin(),this.paintMarker(a,r.x,r.y,-t,-z,c,e,f,m,!0),a.stroke(),a.end()))}};
mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,k,l,m){g=k/g;var n=k*e/2;k=-k*d/2;var p=(l+f)*d;f=(l+f)*e;m?a.moveTo(b-n+p,c-k+f):a.lineTo(b-n+p,c-k+f);a.lineTo(b-n/g+p,c-k/g+f);a.lineTo(b+l*d,c+l*e);a.lineTo(b+n/g+p,c+k/g+f);a.lineTo(b+n+p,c+k+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
-function mxText(a,b,c,d,e,f,g,k,l,m,n,p,r,s,q,t,u,v,x,y,z){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
-this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=s?s:!0;this.background=q;this.border=t;this.wrap=null!=u?u:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=y?y:0;this.textDirection=z;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
+function mxText(a,b,c,d,e,f,g,k,l,m,n,p,r,u,q,s,t,v,x,z,y){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=k?k:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(l||2);this.spacingTop=this.spacing+parseInt(m||0);this.spacingRight=this.spacing+parseInt(n||0);
+this.spacingBottom=this.spacing+parseInt(p||0);this.spacingLeft=this.spacing+parseInt(r||0);this.horizontal=null!=u?u:!0;this.background=q;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=v?v:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=z?z:0;this.textDirection=y;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8==document.documentMode&&!mxClient.IS_EM?4:3;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);if(b){var g=null!=this.state?this.state.unscaledWidth:null;null!=this.node.firstChild&&this.lastUnscaledWidth!=g&&a.invalidateCachedOffsetSize(this.node);a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node)}else{var k=(g=mxUtils.isNode(this.value)||
@@ -761,8 +761,8 @@ mxStackLayout.prototype.resizeParentMax=!1;mxStackLayout.prototype.resizeLast=!1
mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,k=0,l=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);b/=this.graph.view.scale;for(g=0;g<l;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(k<=b&&c>b)break;k=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var k=this.graph.getCellStyle(a),l=mxUtils.getNumber(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),k=1==mxUtils.getValue(k,
-mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),r=0;r<p;r++){var s=d.getChildAt(a,r);if(!this.isVertexIgnored(s)&&this.isVertexMovable(s)){var q=d.getGeometry(s);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=k&&(c&&k.x+k.width+q.width+2*this.spacing>this.wrap||!c&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=
-0;var l=Math.max(l,c?q.height:q.width),t=0;if(!this.borderCollapse)var u=this.graph.getCellStyle(s),t=mxUtils.getNumber(u,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?q.x=m+this.spacing+Math.floor(t/2):q.y=m+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(s,q);n=s;k=q;m=c?k.x+k.width+Math.floor(t/2):k.y+k.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(l=k?Math.min(l,b.height):Math.min(l,b.width));c==k&&(e-=l);k?g+=l:f+=l}d.beginUpdate();try{for(var l=0,k=null,m=0,n=null,p=d.getChildCount(a),r=0;r<p;r++){var u=d.getChildAt(a,r);if(!this.isVertexIgnored(u)&&this.isVertexMovable(u)){var q=d.getGeometry(u);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=k&&(c&&k.x+k.width+q.width+2*this.spacing>this.wrap||!c&&k.y+k.height+q.height+2*this.spacing>this.wrap))k=null,c?g+=l+this.spacing:f+=l+this.spacing,l=
+0;var l=Math.max(l,c?q.height:q.width),s=0;if(!this.borderCollapse)var t=this.graph.getCellStyle(u),s=mxUtils.getNumber(t,mxConstants.STYLE_STROKEWIDTH,1);null!=k?c?q.x=m+this.spacing+Math.floor(s/2):q.y=m+this.spacing+Math.floor(s/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(u,q);n=u;k=q;m=c?k.x+k.width+Math.floor(s/2):k.y+k.height+Math.floor(s/2)}}}this.resizeParent&&null!=b&&null!=k&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
b,k):this.resizeLast&&null!=b&&null!=k&&null!=n&&(c?k.width=b.width-k.x-this.spacing-this.marginRight-this.marginLeft:k.height=b.height-k.y-this.spacing-this.marginBottom,this.setChildGeometry(n,k))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);(null==c||b.x!=c.x||b.y!=c.y||b.width!=c.width||b.height!=c.height)&&this.graph.getModel().setGeometry(a,b)};
mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.spacing+this.marginRight,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.spacing+this.marginBottom,f.height=this.resizeParentMax?Math.max(f.height,c):c);(b.x!=f.x||b.y!=f.y||b.width!=f.width||b.height!=f.height)&&e.setGeometry(a,f)};
function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
@@ -793,7 +793,7 @@ mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=
mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding,this.groupPaddingTop,this.groupPaddingRight,this.groupPaddingBottom,this.groupPaddingLeft)};
mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,k=this.getVertexBounds(c),l=0;l<e.length;l++){for(var m=
-e[l].cell.cell,n=this.getVertexBounds(m),m=this.graph.getEdgesBetween(c,m,!1),p=[],r=0,s=0,q=0;q<m.length;q++)this.horizontal?(r=k.x+k.width,s=k.y+b,p.push(new mxPoint(r,s)),r=k.x+k.width+f,p.push(new mxPoint(r,s)),s=n.y+n.height/2):(r=k.x+b,s=k.y+k.height,p.push(new mxPoint(r,s)),s=k.y+k.height+f,p.push(new mxPoint(r,s)),r=n.x+n.width/2),p.push(new mxPoint(r,s)),this.setEdgePoints(m[q],p);l<d/2?f+=this.prefVertEdgeOff:l>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+e[l].cell.cell,n=this.getVertexBounds(m),m=this.graph.getEdgesBetween(c,m,!1),p=[],r=0,u=0,q=0;q<m.length;q++)this.horizontal?(r=k.x+k.width,u=k.y+b,p.push(new mxPoint(r,u)),r=k.x+k.width+f,p.push(new mxPoint(r,u)),u=n.y+n.height/2):(r=k.x+b,u=k.y+k.height,p.push(new mxPoint(r,u)),u=k.y+k.height+f,p.push(new mxPoint(r,u)),r=n.x+n.width/2),p.push(new mxPoint(r,u)),this.setEdgePoints(m[q],p);l<d/2?f+=this.prefVertEdgeOff:l>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxRadialTreeLayout(a){mxCompactTreeLayout.call(this,a,!1)}
mxUtils.extend(mxRadialTreeLayout,mxCompactTreeLayout);mxRadialTreeLayout.prototype.angleOffset=0.5;mxRadialTreeLayout.prototype.rootx=0;mxRadialTreeLayout.prototype.rooty=0;mxRadialTreeLayout.prototype.levelDistance=120;mxRadialTreeLayout.prototype.nodeDistance=10;mxRadialTreeLayout.prototype.autoRadius=!1;mxRadialTreeLayout.prototype.sortEdges=!1;mxRadialTreeLayout.prototype.rowMinX=[];mxRadialTreeLayout.prototype.rowMaxX=[];mxRadialTreeLayout.prototype.rowMinCenX=[];
mxRadialTreeLayout.prototype.rowMaxCenX=[];mxRadialTreeLayout.prototype.rowRadi=[];mxRadialTreeLayout.prototype.row=[];mxRadialTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
@@ -806,7 +806,7 @@ mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disabl
mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var k=mxObjectIdentity.get(g);this.indices[k]=d;var l=this.getVertexBounds(g),m=l.width,n=l.height,p=l.x,r=l.y;this.cellLocation[d][0]=p+m/2;this.cellLocation[d][1]=r+n/2;this.radius[d]=Math.min(m,n);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
-var s=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(s,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(s[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(s[m],!1);var k=mxObjectIdentity.get(c[m]),q=this.indices[k];this.neighbours[d][m]=null!=q?q:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+var u=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(u,this.vertexArray[d]);this.neighbours[d]=[];for(m=0;m<c.length;m++){this.resetEdges&&this.graph.resetEdge(u[m]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(u[m],!1);var k=mxObjectIdentity.get(c[m]),q=this.indices[k];this.neighbours[d][m]=null!=q?q:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(l=this.getVertexBounds(g),null!=l&&(this.cellLocation[d][0]-=l.width/2,this.cellLocation[d][1]-=l.height/2,p=this.graph.snap(this.cellLocation[d][0]),r=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,p,r),c=null==c?p:Math.min(c,p),a=null==a?r:Math.min(a,r)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
@@ -865,9 +865,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
k}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)k=f[g],k.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var k=d[g],l=k.getGeneralPurposeVariable(a),k=k.getPreviousLayerConnectedCells(a),m=[],n=0;n<k.length;n++){var p=k[n].getGeneralPurposeVariable(a-1);m.push(p)}m.sort(function(a,b){return a-b});f[l]=m}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;l=2*f-1;f-=1;e=[];for(g=0;g<l;++g)e[g]=0;for(g=0;g<d.length;g++){l=d[g]+f;for(++e[l];0<
l;)l%2&&(c+=e[l+1]),l=l-1>>1,++e[l]}return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,r=null,s=null,q=null,t=null,u=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],m=v.getNextLayerConnectedCells(f),n=v.getPreviousLayerConnectedCells(f),s=[],q=[],y=0;y<m.length;y++)s[y]=m[y].getGeneralPurposeVariable(f+
-1);for(y=0;y<n.length;y++)q[y]=n[y].getGeneralPurposeVariable(f-1)}else m=p,n=r,s=t,q=u,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);t=[];u=[];for(y=0;y<p.length;y++)t[y]=p[y].getGeneralPurposeVariable(f+1);for(y=0;y<r.length;y++)u[y]=r[y].getGeneralPurposeVariable(f-1);for(var z=0,A=0,y=0;y<s.length;y++)for(var E=0;E<t.length;E++)s[y]>t[E]&&z++,s[y]<t[E]&&A++;for(y=0;y<q.length;y++)for(E=0;E<u.length;E++)q[y]>u[E]&&z++,q[y]<u[E]&&A++;if(A<z||A==z&&e)p=v.getGeneralPurposeVariable(f),
-v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,r=n,t=s,u=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],k=[],l=0;l<g.length;l++){var m=g[l],n=m.getGeneralPurposeVariable(f);0>n&&(n=l);k[n]=m}for(var p=null,r=null,u=null,q=null,s=null,t=null,v=null,x=null,l=0;l<g.length-1;l++){if(0==l){for(var v=k[l],m=v.getNextLayerConnectedCells(f),n=v.getPreviousLayerConnectedCells(f),u=[],q=[],z=0;z<m.length;z++)u[z]=m[z].getGeneralPurposeVariable(f+
+1);for(z=0;z<n.length;z++)q[z]=n[z].getGeneralPurposeVariable(f-1)}else m=p,n=r,u=s,q=t,v=x;x=k[l+1];p=x.getNextLayerConnectedCells(f);r=x.getPreviousLayerConnectedCells(f);s=[];t=[];for(z=0;z<p.length;z++)s[z]=p[z].getGeneralPurposeVariable(f+1);for(z=0;z<r.length;z++)t[z]=r[z].getGeneralPurposeVariable(f-1);for(var y=0,E=0,z=0;z<u.length;z++)for(var A=0;A<s.length;A++)u[z]>s[A]&&y++,u[z]<s[A]&&E++;for(z=0;z<q.length;z++)for(A=0;A<t.length;A++)q[z]>t[A]&&y++,q[z]<t[A]&&E++;if(E<y||E==y&&e)p=v.getGeneralPurposeVariable(f),
+v.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,p),p=m,r=n,s=u,t=q,x=v,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],k=new MedianCellSorter;k.cell=g;var l;l=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var m;m=b?a+1:a-1;null!=l&&0!=l.length?(k.medianValue=this.medianValue(l,m),d.push(k)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -879,11 +879,11 @@ mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.pro
mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3dCoord assignment debug\x3d\x3d\x3d\x3d\x3d\x3d\x3d");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b)," ");mxLog.writeln()}mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d")};
mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
-mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,r=n.length,s=this.medianXValue(k,l+1),q=this.medianXValue(n,
-l-1),t=p+r,u=e.getGeneralPurposeVariable(l),v=u;0<t&&(v=(s*p+q*r)/t);p=!1;v<u-1?0==m?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m-1],u=m.getGeneralPurposeVariable(l),u=u+m.width/2+this.intraCellSpacing+e.width/2,u<v?(e.setGeneralPurposeVariable(l,v),p=!0):u<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,u),p=!0)):v>u+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],u=m.getGeneralPurposeVariable(l),u=u-m.width/2-this.intraCellSpacing-e.width/2,u>v?(e.setGeneralPurposeVariable(l,
-v),p=!0):u>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,u),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],k=new WeightedCellSorter(g,e);k.rankIndex=f;k.visited=!0;b.push(k);c.put(g,k)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,l=g.weightedValue,m=parseInt(g.rankIndex),k=e.getNextLayerConnectedCells(l),n=e.getPreviousLayerConnectedCells(l),p=k.length,r=n.length,u=this.medianXValue(k,l+1),q=this.medianXValue(n,
+l-1),s=p+r,t=e.getGeneralPurposeVariable(l),v=t;0<s&&(v=(u*p+q*r)/s);p=!1;v<t-1?0==m?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m-1],t=m.getGeneralPurposeVariable(l),t=t+m.width/2+this.intraCellSpacing+e.width/2,t<v?(e.setGeneralPurposeVariable(l,v),p=!0):t<e.getGeneralPurposeVariable(l)-1&&(e.setGeneralPurposeVariable(l,t),p=!0)):v>t+1&&(m==d[l].length-1?(e.setGeneralPurposeVariable(l,v),p=!0):(m=d[l][m+1],t=m.getGeneralPurposeVariable(l),t=t-m.width/2-this.intraCellSpacing-e.width/2,t>v?(e.setGeneralPurposeVariable(l,
+v),p=!0):t>e.getGeneralPurposeVariable(l)+1&&(e.setGeneralPurposeVariable(l,t),p=!0)));if(p){for(e=0;e<k.length;e++)l=k[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l));for(e=0;e<n.length;e++)l=n[e],l=c.get(l),null!=l&&!1==l.visited&&(l.visited=!0,b.push(l))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var k=null,k=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,k)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var l=0,g=d[f].cell,l=0,k=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
-null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));for(var m=0,k=-1E8,n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var r=p.cell;p.visited?(k=r.getGeneralPurposeVariable(a)+r.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=r.width+this.intraCellSpacing,n--)}}m=0;r=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var s=p.cell;p.visited?(r=s.getGeneralPurposeVariable(a)-s.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=s.width+this.intraCellSpacing,
+null!=k&&(l=k.length,l=0<l?this.medianXValue(k,c):g.getGeneralPurposeVariable(a));for(var m=0,k=-1E8,n=d[f].rankIndex-1;0<=n;){var p=e[b[n].id];if(null!=p){var r=p.cell;p.visited?(k=r.getGeneralPurposeVariable(a)+r.width/2+this.intraCellSpacing+m+g.width/2,n=-1):(m+=r.width+this.intraCellSpacing,n--)}}m=0;r=1E8;for(n=d[f].rankIndex+1;n<d.length;)if(p=e[b[n].id],null!=p){var u=p.cell;p.visited?(r=u.getGeneralPurposeVariable(a)-u.width/2-this.intraCellSpacing-m-g.width/2,n=d.length):(m+=u.width+this.intraCellSpacing,
n++)}l>=k&&l<=r?g.setGeneralPurposeVariable(a,l):l<k?(g.setGeneralPurposeVariable(a,k),this.currentXDelta+=k-l):l>r&&(g.setGeneralPurposeVariable(a,r),this.currentXDelta+=l-r);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
@@ -897,14 +897,14 @@ mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.ge
mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=-Number.MAX_VALUE;for(var d=b.vertexMapper.getValues(),c=0;c<d.length;c++)this.setVertexLocation(d[c]);(this.layout.edgeStyle==mxHierarchicalEdgeStyle.ORTHOGONAL||this.layout.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();
for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};
-mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);for(var n=e.x[0]-e.width/2,p=n+e.width,r=f=0,g=[],m=0;m<l.length;m++){var s=l[m].cell,
-q;if(s.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.length;t++)if(q[t].source==s||q[t].target==s)f+=q[t].edges.length,r++,g.push(q[t])}else f+=s.edges.length,r++,g.push(s)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;m<g.length;m++){s=g[m].edges.length;q=this.jettyPositions[g[m].ids[0]];null==q&&(q=[],this.jettyPositions[g[m].ids[0]]=q);m<f/2?
-p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff);for(t=0;t<s;t++)q[4*t+2*k]=n,n+=l,q[4*t+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
-mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),r=[],s=a.isReversed;p!=g&&(s=!s);if(null!=f){var q=s?
-2:0,t=s?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],u=f[4*e+1+q];s!=l&&(u=-u);var t=t+u,q=f[4*e+q],v=k.model.getTerminal(n,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,t+u))):(r.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t+u,q)))}q=a.x.length-1;t=u=-1;p=a.maxRank-1;for(s&&(q=0,u=a.x.length,t=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=u;q+=t){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,y=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(s)var z=x,x=y,y=z;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,y))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(y,
-v)));this.limitX=Math.max(this.limitX,v);p+=t}null!=f&&(q=s?2:0,t=s?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],u=f[4*e+3-q],s!=l&&(u=-u),t-=u,q=f[4*e+2-q],s=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(s)&&k.model.getParent(s)==p&&(q=k.view.getState(s),q=null!=q?q.x:p.geometry.x+a.target.width*s.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-r.push(new mxPoint(q,t-u)),r.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(t-u,q)),r.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,k=0;2>k;k++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var l=[],m=0;m<f.length;m++){var n=new WeightedCellSorter(f[m],f[m].getX(g));l.push(n)}l.sort(WeightedCellSorter.prototype.compare);for(var n=e.x[0]-e.width/2,p=n+e.width,r=f=0,g=[],m=0;m<l.length;m++){var u=l[m].cell,
+q;if(u.isVertex()){q=0==k?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<q.length;s++)if(q[s].source==u||q[s].target==u)f+=q[s].edges.length,r++,g.push(q[s])}else f+=u.edges.length,r++,g.push(u)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(n+=this.prefHozEdgeSep,p-=this.prefHozEdgeSep);l=(p-n)/f;n+=l/2;p=this.minEdgeJetty-this.prefVertEdgeOff;for(m=r=0;m<g.length;m++){u=g[m].edges.length;q=this.jettyPositions[g[m].ids[0]];null==q&&(q=[],this.jettyPositions[g[m].ids[0]]=q);m<f/2?
+p+=this.prefVertEdgeOff:m>f/2&&(p-=this.prefVertEdgeOff);for(s=0;s<u;s++)q[4*s+2*k]=n,n+=l,q[4*s+2*k+1]=p;r=Math.max(r,p)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,k=this.layout.graph,l=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,m=0;m<a.edges.length;m++){var n=a.edges[m],p=this.layout.getVisibleTerminal(n,!0),r=[],u=a.isReversed;p!=g&&(u=!u);if(null!=f){var q=u?
+2:0,s=u?l?this.rankBottomY[d]:this.rankTopY[d]:l?this.rankTopY[c]:this.rankBottomY[c],t=f[4*e+1+q];u!=l&&(t=-t);var s=s+t,q=f[4*e+q],v=k.model.getTerminal(n,!0);this.layout.isPort(v)&&k.model.getParent(v)==p&&(q=k.view.getState(v),q=null!=q?q.x:p.geometry.x+a.source.width*v.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(q,s)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(q,s+t))):(r.push(new mxPoint(s,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(s+t,q)))}q=a.x.length-1;s=t=-1;p=a.maxRank-1;for(u&&(q=0,t=a.x.length,s=1,p=a.minRank+1);a.maxRank!=a.minRank&&q!=t;q+=s){var v=a.x[q]+b,x=(this.rankTopY[p]+this.rankBottomY[p+1])/2,z=(this.rankTopY[p-1]+this.rankBottomY[p])/2;if(u)var y=x,x=z,z=y;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(r.push(new mxPoint(v,x)),r.push(new mxPoint(v,z))):(r.push(new mxPoint(x,v)),r.push(new mxPoint(z,
+v)));this.limitX=Math.max(this.limitX,v);p+=s}null!=f&&(q=u?2:0,s=u?l?this.rankTopY[c]:this.rankBottomY[c]:l?this.rankBottomY[d]:this.rankTopY[d],t=f[4*e+3-q],u!=l&&(t=-t),s-=t,q=f[4*e+2-q],u=k.model.getTerminal(n,!1),p=this.layout.getVisibleTerminal(n,!1),this.layout.isPort(u)&&k.model.getParent(u)==p&&(q=k.view.getState(u),q=null!=q?q.x:p.geometry.x+a.target.width*u.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+r.push(new mxPoint(q,s-t)),r.push(new mxPoint(q,s))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&r.push(new mxPoint(s-t,q)),r.push(new mxPoint(s,q))));a.isReversed&&this.processReversedEdge(a,n);this.layout.setEdgePoints(n,r);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
@@ -1007,16 +1007,16 @@ return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<
Math.tan(f)/2):f<-m?(g.y=a.y,g.x=b-a.height*Math.tan(l)/2):f<m?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(l)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,k=a.height/2,l=e+g,m=f+k;b=c.x;c=c.y;var n=parseInt(b-l),p=parseInt(c-m);if(0==n&&0!=p)return new mxPoint(l,
m+k*p/Math.abs(p));if(0==n&&0==p)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-m,a=Math.sqrt(g*g*(1-a*a/(k*k)))||0,b<=e&&(a=-a),new mxPoint(l+a,c);if(b>=e&&b<=e+a.width)return a=b-l,a=Math.sqrt(k*k*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,m+a)}e=p/n;m-=e*l;f=g*g*e*e+k*k;a=-2*l*f;k=Math.sqrt(a*a-4*f*(g*g*e*e*l*l+k*k*l*l-g*g*k*k));g=(-a+k)/(2*f);k=(-a-k)/(2*f);l=e*g+m;m=e*k+m;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(l-c,2));b=Math.sqrt(Math.pow(k-b,2)+Math.pow(m-c,2));f=c=0;e<b?(c=
g,f=l):(c=k,f=m);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,k=e+a/2,l=c.x;c=c.y;if(g==l)return k>c?new mxPoint(g,e):new mxPoint(g,e+a);if(k==c)return g>l?new mxPoint(b,k):new mxPoint(b+f,k);var m=g,n=k;d&&(l>=b&&l<=b+f?m=l:c>=e&&c<=e+a&&(n=c));return l<g?c<k?mxUtils.intersection(l,c,m,n,g,e,b,k):mxUtils.intersection(l,c,m,n,g,e+a,b,k):c<k?mxUtils.intersection(l,c,m,n,g,e,b+f,k):mxUtils.intersection(l,c,m,n,g,e+a,b+f,k)},TrianglePerimeter:function(a,
-b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width;a=a.height;var l=f+k/2,m=g+a/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),r=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(n=r,p=new mxPoint(l,g),r=new mxPoint(f+k,g+a)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),r=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),r=new mxPoint(f+k,g+a));var s=c.x-
-l,q=c.y-m,s=e?Math.atan2(s,q):Math.atan2(q,s),t=e?Math.atan2(k,a):Math.atan2(a,k),q=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?s>-t&&s<t:s<-Math.PI+t||s>Math.PI-t,t=null;q?t=d&&(e&&c.x>=n.x&&c.x<=r.x||!e&&c.y>=n.y&&c.y<=r.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+a*Math.tan(s)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-a*Math.tan(s)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+a/2+k*Math.tan(s)/2):new mxPoint(f,
-g+a/2-k*Math.tan(s)/2):(d&&(d=new mxPoint(l,m),c.y>=g&&c.y<=g+a?(d.x=e?l:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=!e?m:b==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,m=d.y),t=e&&c.x<=f+k/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,l,m,p.x,p.y,r.x,r.y));null==t&&(t=new mxPoint(l,m));return t},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=
--Math.atan2(n-a,m-l),r=Math.PI,s=Math.PI/2,q=new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var t=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;q=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(t){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,k=a.width;a=a.height;var l=f+k/2,m=g+a/2,n=new mxPoint(f,g),p=new mxPoint(f+k,m),r=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(n=r,p=new mxPoint(l,g),r=new mxPoint(f+k,g+a)):b==mxConstants.DIRECTION_SOUTH?(p=new mxPoint(l,g+a),r=new mxPoint(f+k,g)):b==mxConstants.DIRECTION_WEST&&(n=new mxPoint(f+k,g),p=new mxPoint(f,m),r=new mxPoint(f+k,g+a));var u=c.x-
+l,q=c.y-m,u=e?Math.atan2(u,q):Math.atan2(q,u),s=e?Math.atan2(k,a):Math.atan2(a,k),q=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?u>-s&&u<s:u<-Math.PI+s||u>Math.PI-s,s=null;q?s=d&&(e&&c.x>=n.x&&c.x<=r.x||!e&&c.y>=n.y&&c.y<=r.y)?e?new mxPoint(c.x,n.y):new mxPoint(n.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+k/2+a*Math.tan(u)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+k/2-a*Math.tan(u)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+k,g+a/2+k*Math.tan(u)/2):new mxPoint(f,
+g+a/2-k*Math.tan(u)/2):(d&&(d=new mxPoint(l,m),c.y>=g&&c.y<=g+a?(d.x=e?l:b==mxConstants.DIRECTION_WEST?f+k:f,d.y=c.y):c.x>=f&&c.x<=f+k&&(d.x=c.x,d.y=!e?m:b==mxConstants.DIRECTION_NORTH?g+a:g),l=d.x,m=d.y),s=e&&c.x<=f+k/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,l,m,n.x,n.y,p.x,p.y):mxUtils.intersection(c.x,c.y,l,m,p.x,p.y,r.x,r.y));null==s&&(s=new mxPoint(l,m));return s},HexagonPerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();var m=c.x,n=c.y,p=
+-Math.atan2(n-a,m-l),r=Math.PI,u=Math.PI/2,q=new mxPoint(l,a);b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;var s=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH;b=new mxPoint;q=new mxPoint;if(m<e&&n<f||m<e&&n>f+k||m>e+g&&n<f||m>e+g&&n>f+k)d=!1;if(d){if(s){if(m==l){if(n<=f)return new mxPoint(l,f);if(n>=f+k)return new mxPoint(l,f+k)}else if(m<e){if(n==f+k/4)return new mxPoint(e,f+k/4);if(n==f+3*k/4)return new mxPoint(e,
f+3*k/4)}else if(m>e+g){if(n==f+k/4)return new mxPoint(e+g,f+k/4);if(n==f+3*k/4)return new mxPoint(e+g,f+3*k/4)}else if(m==e){if(n<a)return new mxPoint(e,f+k/4);if(n>a)return new mxPoint(e,f+3*k/4)}else if(m==e+g){if(n<a)return new mxPoint(e+g,f+k/4);if(n>a)return new mxPoint(e+g,f+3*k/4)}if(n==f)return new mxPoint(l,f);if(n==f+k)return new mxPoint(l,f+k);m<l?n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):n<f+k/4?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+
g,f-Math.floor(0.25*k))):n>f+3*k/4&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+Math.floor(1.25*k))):m>l&&(n>f+k/4&&n<f+3*k/4?(b=new mxPoint(e+g,f),q=new mxPoint(e+g,f+k)):n<f+k/4?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):n>f+3*k/4&&(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))))}else{if(n==a){if(m<=e)return new mxPoint(e,f+k/2);if(m>=e+g)return new mxPoint(e+g,f+k/
2)}else if(n<f){if(m==e+g/4)return new mxPoint(e+g/4,f);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f)}else if(n>f+k){if(m==e+g/4)return new mxPoint(e+g/4,f+k);if(m==e+3*g/4)return new mxPoint(e+3*g/4,f+k)}else if(n==f){if(m<l)return new mxPoint(e+g/4,f);if(m>l)return new mxPoint(e+3*g/4,f)}else if(n==f+k){if(m<l)return new mxPoint(e+g/4,f+k);if(n>a)return new mxPoint(e+3*g/4,f+k)}if(m==e)return new mxPoint(e,a);if(m==e+g)return new mxPoint(e+g,a);n<a?m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f),q=new mxPoint(e+
g,f)):m<e+g/4?(b=new mxPoint(e-Math.floor(0.25*g),f+k),q=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f+k)):n>a&&(m>e+g/4&&m<e+3*g/4?(b=new mxPoint(e,f+k),q=new mxPoint(e+g,f+k)):m<e+g/4?(b=new mxPoint(e-Math.floor(0.25*g),f),q=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k))):m>e+3*g/4&&(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f)))}d=
-l;p=a;m>=e&&m<=e+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);q=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,q.x,q.y)}else{if(t){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(0.25*k));if(p==s)return new mxPoint(e+Math.floor(0.5*g),f);if(p==r-m)return new mxPoint(e,f+Math.floor(0.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(0.75*k));if(p==-s)return new mxPoint(e+Math.floor(0.5*g),f+k);if(p==-r+m)return new mxPoint(e,f+Math.floor(0.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),
-q=new mxPoint(e+g,f+k)):p>m&&p<s?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):p>s&&p<r-m?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f-Math.floor(0.25*k))):p>r-m&&p<=r||p<-r+m&&p>=-r?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):p<-m&&p>-s?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))):p<-s&&p>-r+m&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+
+l;p=a;m>=e&&m<=e+g?(d=m,p=n<a?f+k:f):n>=f&&n<=f+k&&(p=n,d=m<l?e+g:e);q=mxUtils.intersection(d,p,c.x,c.y,b.x,b.y,q.x,q.y)}else{if(s){m=Math.atan2(k/4,g/2);if(p==m)return new mxPoint(e+g,f+Math.floor(0.25*k));if(p==u)return new mxPoint(e+Math.floor(0.5*g),f);if(p==r-m)return new mxPoint(e,f+Math.floor(0.25*k));if(p==-m)return new mxPoint(e+g,f+Math.floor(0.75*k));if(p==-u)return new mxPoint(e+Math.floor(0.5*g),f+k);if(p==-r+m)return new mxPoint(e,f+Math.floor(0.75*k));p<m&&p>-m?(b=new mxPoint(e+g,f),
+q=new mxPoint(e+g,f+k)):p>m&&p<u?(b=new mxPoint(e,f-Math.floor(0.25*k)),q=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k))):p>u&&p<r-m?(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f-Math.floor(0.25*k))):p>r-m&&p<=r||p<-r+m&&p>=-r?(b=new mxPoint(e,f),q=new mxPoint(e,f+k)):p<-m&&p>-u?(b=new mxPoint(e+Math.floor(1.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e,f+Math.floor(1.25*k))):p<-u&&p>-r+m&&(b=new mxPoint(e-Math.floor(0.5*g),f+Math.floor(0.5*k)),q=new mxPoint(e+g,f+
Math.floor(1.25*k)))}else{m=Math.atan2(k/2,g/4);if(p==m)return new mxPoint(e+Math.floor(0.75*g),f);if(p==r-m)return new mxPoint(e+Math.floor(0.25*g),f);if(p==r||p==-r)return new mxPoint(e,f+Math.floor(0.5*k));if(0==p)return new mxPoint(e+g,f+Math.floor(0.5*k));if(p==-m)return new mxPoint(e+Math.floor(0.75*g),f+k);if(p==-r+m)return new mxPoint(e+Math.floor(0.25*g),f+k);0<p&&p<m?(b=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f+k)):p>m&&p<r-m?(b=new mxPoint(e,
f),q=new mxPoint(e+g,f)):p>r-m&&p<r?(b=new mxPoint(e-Math.floor(0.25*g),f+k),q=new mxPoint(e+Math.floor(0.5*g),f-Math.floor(0.5*k))):0>p&&p>-m?(b=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)),q=new mxPoint(e+Math.floor(1.25*g),f)):p<-m&&p>-r+m?(b=new mxPoint(e,f+k),q=new mxPoint(e+g,f+k)):p<-r+m&&p>-r&&(b=new mxPoint(e-Math.floor(0.25*g),f),q=new mxPoint(e+Math.floor(0.5*g),f+Math.floor(1.5*k)))}q=mxUtils.intersection(l,a,c.x,c.y,b.x,b.y,q.x,q.y)}return null==q?new mxPoint(l,a):q}};
function mxPrintPreview(a,b,c,d,e,f,g,k,l){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=mxRectangle.fromRectangle(null!=c?c:a.pageFormat);this.title=null!=k?k:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=l?l:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;
@@ -1026,10 +1026,10 @@ mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode
mxPrintPreview.prototype.appendGraph=function(a,b,c,d,e,f){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.x0=c;this.y0=d;this.open(null,null,e,f)};
mxPrintPreview.prototype.open=function(a,b,c,d){var e=this.graph.cellRenderer.initializeOverlay,f=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});this.printControls&&(this.graph.cellRenderer.initControl=function(a,b,c,d){b.dialect=a.view.graph.dialect;b.init(a.view.getDrawPane())});this.wnd=null!=b?b:this.wnd;b=!1;null==this.wnd&&(b=!0,this.wnd=window.open());var g=this.wnd.document;if(b){var k=this.getDoctype();null!=k&&0<k.length&&
g.writeln(k);mxClient.IS_VML?g.writeln('\x3chtml xmlns:v\x3d"urn:schemas-microsoft-com:vml" xmlns:o\x3d"urn:schemas-microsoft-com:office:office"\x3e'):("CSS1Compat"===document.compatMode&&g.writeln("\x3c!DOCTYPE html\x3e"),g.writeln("\x3chtml\x3e"));g.writeln("\x3chead\x3e");this.writeHead(g,a);g.writeln("\x3c/head\x3e");g.writeln('\x3cbody class\x3d"mxPage"\x3e')}var l=this.graph.getGraphBounds().clone(),m=this.graph.getView().getScale(),n=m/this.scale,p=this.graph.getView().getTranslate();this.autoOrigin||
-(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,s=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),t=Math.max(1,Math.ceil((l.height+this.y0)/s));this.pageCount=q*t;var u=mxUtils.bind(this,function(){if(this.pageSelector&&(1<t||1<q)){var a=this.createPageSelector(t,q);g.body.appendChild(a);
+(this.x0-=p.x*this.scale,this.y0-=p.y*this.scale,l.width+=l.x,l.height+=l.y,l.x=0,this.border=l.y=0);var r=this.pageFormat.width-2*this.border,u=this.pageFormat.height-2*this.border;this.pageFormat.height+=this.marginTop+this.marginBottom;l.width/=n;l.height/=n;var q=Math.max(1,Math.ceil((l.width+this.x0)/r)),s=Math.max(1,Math.ceil((l.height+this.y0)/u));this.pageCount=q*s;var t=mxUtils.bind(this,function(){if(this.pageSelector&&(1<s||1<q)){var a=this.createPageSelector(s,q);g.body.appendChild(a);
if(mxClient.IS_IE&&null==g.documentMode||5==g.documentMode||8==g.documentMode||7==g.documentMode){a.style.position="absolute";var b=function(){a.style.top=(g.body.scrollTop||g.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}}),v=mxUtils.bind(this,function(a,b){null!=this.borderColor&&(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background=this.backgroundColor;
-if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var y=0;y<x.length;y++)v(x[y],!0);for(var z=this.getAppendices(this.pageFormat.width,this.pageFormat.height),y=0;y<t;y++){var A=y*s/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
-q;a++){if(null==this.wnd)return null;var E=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,C=y*q+a+1,D=new mxRectangle(E,A,r,s),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-E,-A,this.scale,C,a,D);this.printBackgroundImage&&this.insertBackgroundImage(a,-E,-A)}),C);f.setAttribute("id","mxPage-"+C);v(f,null!=z||y<t-1||a<q-1)}}if(null!=z)for(y=0;y<z.length;y++)v(z[y],y<z.length-1);b&&!d&&(this.closeDocument(),u());this.wnd.focus()}catch(F){null!=
+if(c||b)a.style.pageBreakAfter="always";mxClient.IS_IE||11<=document.documentMode||mxClient.IS_EDGE?(g.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),g.body.appendChild(a));(c||b)&&this.addPageBreak(g)}),x=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=x)for(var z=0;z<x.length;z++)v(x[z],!0);for(var y=this.getAppendices(this.pageFormat.width,this.pageFormat.height),z=0;z<s;z++){var E=z*u/this.scale-this.y0/this.scale+(l.y-p.y*m)/m;for(a=0;a<
+q;a++){if(null==this.wnd)return null;var A=a*r/this.scale-this.x0/this.scale+(l.x-p.x*m)/m,D=z*q+a+1,C=new mxRectangle(A,E,r,u),f=this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-A,-E,this.scale,D,a,C);this.printBackgroundImage&&this.insertBackgroundImage(a,-A,-E)}),D);f.setAttribute("id","mxPage-"+D);v(f,null!=y||z<s-1||a<q-1)}}if(null!=y)for(z=0;z<y.length;z++)v(y[z],z<y.length-1);b&&!d&&(this.closeDocument(),t());this.wnd.focus()}catch(F){null!=
f&&null!=f.parentNode&&f.parentNode.removeChild(f)}finally{this.graph.cellRenderer.initializeOverlay=e}return this.wnd};mxPrintPreview.prototype.addPageBreak=function(a){var b=a.createElement("hr");b.className="mxPageBreak";a.body.appendChild(b)};mxPrintPreview.prototype.closeDocument=function(){if(null!=this.wnd&&null!=this.wnd.document){var a=this.wnd.document;this.writePostfix(a);a.writeln("\x3c/body\x3e");a.writeln("\x3c/html\x3e");a.close();mxEvent.release(a.body)}};
mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("\x3ctitle\x3e"+this.title+"\x3c/title\x3e");mxClient.IS_VML&&a.writeln('\x3cstyle type\x3d"text/css"\x3ev\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}\x3c/style\x3e');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('\x3cstyle type\x3d"text/css"\x3e');a.writeln("@media print {");a.writeln(" table.mxPageSelector { display: none; }");a.writeln(" hr.mxPageBreak { display: none; }");
a.writeln("}");a.writeln("@media screen {");a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln(" body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("\x3c/style\x3e")};mxPrintPreview.prototype.writePostfix=function(a){};
@@ -1039,10 +1039,10 @@ mxPrintPreview.prototype.renderPage=function(a,b,c,d,e,f){f=this.wnd.document;va
"relative";m.style.marginLeft=c+"px";m.style.marginTop=d+"px";8==f.documentMode&&(l.style.position="absolute",m.style.position="absolute");10==f.documentMode&&(m.style.width="100%",m.style.height="100%");l.appendChild(m);g.appendChild(l);document.body.appendChild(g);k=m}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),l=document.createElement("div"),l.style.width=a-2*this.border+"px",l.style.height=
b-2*this.border+"px",l.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(l.style.marginTop=this.border+"px",l.style.marginLeft=this.border+"px"):(l.style.top=this.border+"px",l.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(l.style.position="absolute"),g.appendChild(l),document.body.appendChild(g),k=l}catch(n){throw g.parentNode.removeChild(g),n;}e(k);return g};
mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
-mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var s=g.getTranslate();g.translate=new mxPoint(a,
-b);var q=this.graph.cellRenderer.redraw,t=g.states;a=g.scale;if(this.clipping){var u=new mxRectangle((f.x+s.x)*a,(f.y+s.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=t.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(u,d)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,c,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e,f){var g=this.graph.getView();d=this.graph.container;this.graph.container=e;var k=g.getCanvas(),l=g.getBackgroundPane(),m=g.getDrawPane(),n=g.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?g.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?g.createVml():g.createHtml();var p=g.isEventsEnabled();g.setEventsEnabled(!1);var r=this.graph.isEnabled();this.graph.setEnabled(!1);var u=g.getTranslate();g.translate=new mxPoint(a,
+b);var q=this.graph.cellRenderer.redraw,s=g.states;a=g.scale;if(this.clipping){var t=new mxRectangle((f.x+u.x)*a,(f.y+u.y)*a,f.width*a/c,f.height*a/c);this.graph.cellRenderer.redraw=function(a,b,c){if(null!=a){var d=s.get(a.cell);if(null!=d&&(d=g.getBoundingBox(d,!1),null!=d&&!mxUtils.intersects(t,d)))return}q.apply(this,arguments)}}a=null;try{var v=[this.getRoot()];a=new mxTemporaryCellStates(g,c,v)}finally{if(mxClient.IS_IE)g.overlayPane.innerHTML="",g.canvas.style.overflow="hidden",g.canvas.style.position=
"relative",g.canvas.style.top=this.marginTop+"px",g.canvas.style.width=f.width+"px",g.canvas.style.height=f.height+"px";else for(c=e.firstChild;null!=c;)v=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.style.overflow="hidden",c.style.position="relative",c.style.top=this.marginTop+"px",c.setAttribute("width",f.width),c.setAttribute("height",f.height),c.style.width="",c.style.height=""):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=v;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),
-0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=q;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=s;a.destroy();g.setEventsEnabled(p)}};
+0<e.length&&(e[0].style.position="absolute"));g.overlayPane.parentNode.removeChild(g.overlayPane);this.graph.setEnabled(r);this.graph.container=d;this.graph.cellRenderer.redraw=q;g.canvas=k;g.backgroundPane=l;g.drawPane=m;g.overlayPane=n;g.translate=u;a.destroy();g.setEventsEnabled(p)}};
mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
@@ -1155,26 +1155,26 @@ f),g=f.y<k||f.y>n,k=f.x<l||f.x>m;else l=Math.max(b.x,c.x),m=Math.min(b.x+b.width
b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),k=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:Math.round(k+(a-k)/2),k=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(k=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,
a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,k=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=k&&(b=new mxCellState,b.x=k.x,b.y=k.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(k=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),k=null!=d?d.y:Math.round(g+(k-g)/2),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,k)&&!mxUtils.contains(b,a,k)&&e.push(new mxPoint(a,k)),1==e.length&&(null!=d&&1==e.length?!mxUtils.contains(c,d.x,k)&&!mxUtils.contains(b,d.x,k)&&e.push(new mxPoint(d.x,k)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/
-2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var n=[],s=0;s<d.length;s++){var q=a.view.transformControlPoint(a,d[s]);null!=
-q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],t=b,u=g[0],v=!1,x=!1,v=n;null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);for(s=0;2>s;s++){var y=null!=u&&u.x==v.x,z=null!=u&&u.y==v.y,A=null!=t&&v.y>=t.y&&
-v.y<=t.y+t.height,t=null!=t&&v.x>=t.x&&v.x<=t.x+t.width,v=z||null==u&&A,x=y||null==u&&t;if(!(0==s&&(v&&x||y&&z))){if(null!=u&&!z&&!y&&(A||t)){m=A?!1:!0;break}if(x||v){m=v;1==s&&(m=0==d.length%2?v:x);break}}t=c;u=g[r];null!=u&&(u.x=Math.round(u.x),u.y=Math.round(u.y),t=null);v=d[d.length-1];y&&z&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
-p.y));m?p.y=n.y:p.x=n.x;for(s=0;s<d.length;s++)m=!m,n=d[s],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[r]&&g[r].y!=n.y||null==g[r]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
+2,k)))))},SegmentConnector:function(a,b,c,d,e){function f(a){if(null==l||Math.abs(l.x-a.x)>=k||Math.abs(l.y-a.y)>=k)e.push(a),l=a;return l}var g=a.absolutePoints,k=Math.max(1,a.view.scale),l=0<e.length?e[0]:null,m=!0,n=null,p=g[0];null==p&&null!=b?p=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=p&&(p=p.clone());p.x=Math.round(p.x);p.y=Math.round(p.y);var r=g.length-1;if(null!=d&&0<d.length){for(var n=[],u=0;u<d.length;u++){var q=a.view.transformControlPoint(a,d[u]);null!=
+q&&(q.x=Math.round(q.x),q.y=Math.round(q.y),n.push(q))}if(0==n.length)return;d=n;null!=p&&null!=d[0]&&(Math.abs(d[0].x-p.x)<k&&(d[0].x=p.x),Math.abs(d[0].y-p.y)<k&&(d[0].y=p.y));q=g[r];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<k&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<k&&(d[d.length-1].y=q.y));var n=d[0],s=b,t=g[0],v=!1,x=!1,v=n;null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),s=null);for(u=0;2>u;u++){var z=null!=t&&t.x==v.x,y=null!=t&&t.y==v.y,E=null!=s&&v.y>=s.y&&
+v.y<=s.y+s.height,s=null!=s&&v.x>=s.x&&v.x<=s.x+s.width,v=y||null==t&&E,x=z||null==t&&s;if(!(0==u&&(v&&x||z&&y))){if(null!=t&&!y&&!z&&(E||s)){m=E?!1:!0;break}if(x||v){m=v;1==u&&(m=0==d.length%2?v:x);break}}s=c;t=g[r];null!=t&&(t.x=Math.round(t.x),t.y=Math.round(t.y),s=null);v=d[d.length-1];z&&y&&(d=d.slice(1))}m&&(null!=g[0]&&g[0].y!=n.y||null==g[0]&&null!=b&&(n.y<b.y||n.y>b.y+b.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[0]&&g[0].x!=n.x||null==g[0]&&null!=b&&(n.x<b.x||n.x>b.x+b.width))&&f(new mxPoint(n.x,
+p.y));m?p.y=n.y:p.x=n.x;for(u=0;u<d.length;u++)m=!m,n=d[u],m?p.y=n.y:p.x=n.x,f(p.clone())}else n=p,m=!0;p=g[r];null==p&&null!=c&&(p=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=p&&(p.x=Math.round(p.x),p.y=Math.round(p.y),null!=n&&(m&&(null!=g[r]&&g[r].y!=n.y||null==g[r]&&null!=c&&(n.y<c.y||n.y>c.y+c.height))?f(new mxPoint(p.x,n.y)):!m&&(null!=g[r]&&g[r].x!=n.x||null==g[r]&&null!=c&&(n.x<c.x||n.x>c.x+c.width))&&f(new mxPoint(n.x,p.y))));if(null==g[0]&&null!=b)for(;1<
e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[r]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&Math.abs(q.x-e[e.length-1].x)<k&&Math.abs(q.y-e[e.length-1].y)<k&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<k&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<k&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,s=null!=b?b.height:0,q=null!=c?c.x:m.x,t=null!=c?c.y:m.y,u=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*mxEdgeStyle.getJettySize(a,
-b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var y=x+f,z=!1;if(null!=l&&null!=m)var z=m.x-l.x,A=m.y-l.y,z=z*z+A*A<y*y;if(z||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];z=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(n,p,r,s),z),n=z.x,
-p=z.y,r=z.width,s=z.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),z=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=z&&(z=mxUtils.getBoundingBox(new mxRectangle(q,t,u,v),z),q=z.x,t=z.y,u=z.width,v=z.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;s=Math.round(10*s)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;u=Math.round(10*u)/10;v=Math.round(10*v)/10;a=[0,0];n=[[n,p,r,s],[q,t,u,v]];x=[f,x];for(z=0;2>z;z++)mxEdgeStyle.limits[z][1]=
-n[z][0]-x[z],mxEdgeStyle.limits[z][2]=n[z][1]-x[z],mxEdgeStyle.limits[z][4]=n[z][0]+n[z][2]+x[z],mxEdgeStyle.limits[z][8]=n[z][1]+n[z][3]+x[z];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;z=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);A=x-p;x=0;0>z?x=0>A?2:1:0>=A&&(x=3,0==z&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(z=0;2>z;z++)null!=p&&(b[z][0]=(p.x-n[z][0])/n[z][2],1>=Math.abs(p.x-n[z][0])?a[z]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[z][0]-n[z][2])&&(a[z]=mxConstants.DIRECTION_MASK_EAST),
-b[z][1]=(p.y-n[z][1])/n[z][3],1>=Math.abs(p.y-n[z][1])?a[z]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[z][1]-n[z][3])&&(a[z]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);z=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(z-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-y,0);y=[];
-c=[];l=[];c[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=z>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=z>=p?z:p;r=[[0,0],[0,0]];s=!1;for(z=0;2>z;z++)0==a[z]&&(0==(c[z]&d[z])&&(c[z]=mxUtils.reversePortConstraints(c[z])),0==(l[z]&d[z])&&(l[z]=mxUtils.reversePortConstraints(l[z])),r[z][0]=l[z],r[z][1]=c[z]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(r[0][0]=
-c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],s=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],s=!0));0<p&&!s&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],s=!0);0<m&&!s&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(z=0;2>z;z++)if(0==a[z]&&(0==(r[z][0]&d[z])&&(r[z][0]=r[z][1]),y[z]=r[z][0]&d[z],y[z]|=(r[z][1]&d[z])<<8,y[z]|=(r[1-z][z]&d[z])<<16,y[z]|=(r[1-z][1-z]&d[z])<<24,0==(y[z]&15)&&(y[z]<<=8),0==(y[z]&3840)&&(y[z]=y[z]&15|y[z]>>8),0==
-(y[z]&983040)&&(y[z]=y[z]&65535|(y[z]&251658240)>>8),a[z]=y[z]&15,d[z]==mxConstants.DIRECTION_MASK_WEST||d[z]==mxConstants.DIRECTION_MASK_NORTH||d[z]==mxConstants.DIRECTION_MASK_EAST||d[z]==mxConstants.DIRECTION_MASK_SOUTH))a[z]=d[z];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;y-=x;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(z=0;z<d.length;z++)l=d[z]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),m=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),t=0<(d[z]&mxEdgeStyle.TARGET_MASK),s=0<(d[z]&mxEdgeStyle.SOURCE_MASK),p=(d[z]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[z]&mxEdgeStyle.CENTER_MASK),(s||t)&&9>p?(s=s?0:1,q=r&&0==l?n[s][0]+b[s][0]*n[s][2]:r?n[s][1]+b[s][1]*
-n[s][3]:mxEdgeStyle.limits[s][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:y=l;for(z=0;z<=f&&!(z==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
-mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);z++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[z][0]),Math.round(mxEdgeStyle.wayPoints1[z][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),k=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,l=f[0],m=f[f.length-1],n=null!=b?b.x:l.x,p=null!=b?b.y:l.y,r=null!=b?b.width:0,u=null!=b?b.height:0,q=null!=c?c.x:m.x,s=null!=c?c.y:m.y,t=null!=c?c.width:0,v=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var z=x+f,y=!1;if(null!=l&&null!=m)var y=m.x-l.x,E=m.y-l.y,y=y*y+E*E<z*z;if(y||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||k)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];y=0;null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(n,p,r,u),y),n=y.x,
+p=y.y,r=y.width,u=y.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),y=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=y&&(y=mxUtils.getBoundingBox(new mxRectangle(q,s,t,v),y),q=y.x,s=y.y,t=y.width,v=y.height));n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;u=Math.round(10*u)/10;q=Math.round(10*q)/10;s=Math.round(10*s)/10;t=Math.round(10*t)/10;v=Math.round(10*v)/10;a=[0,0];n=[[n,p,r,u],[q,s,t,v]];x=[f,x];for(y=0;2>y;y++)mxEdgeStyle.limits[y][1]=
+n[y][0]-x[y],mxEdgeStyle.limits[y][2]=n[y][1]-x[y],mxEdgeStyle.limits[y][4]=n[y][0]+n[y][2]+x[y],mxEdgeStyle.limits[y][8]=n[y][1]+n[y][3]+x[y];x=n[0][1]+n[0][3]/2;p=n[1][1]+n[1][3]/2;y=n[0][0]+n[0][2]/2-(n[1][0]+n[1][2]/2);E=x-p;x=0;0>y?x=0>E?2:1:0>=E&&(x=3,0==y&&(x=2));p=null;null!=b&&(p=l);b=[[0.5,0.5],[0.5,0.5]];for(y=0;2>y;y++)null!=p&&(b[y][0]=(p.x-n[y][0])/n[y][2],1>=Math.abs(p.x-n[y][0])?a[y]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(p.x-n[y][0]-n[y][2])&&(a[y]=mxConstants.DIRECTION_MASK_EAST),
+b[y][1]=(p.y-n[y][1])/n[y][3],1>=Math.abs(p.y-n[y][1])?a[y]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(p.y-n[y][1]-n[y][3])&&(a[y]=mxConstants.DIRECTION_MASK_SOUTH)),p=null,null!=c&&(p=m);y=n[0][1]-(n[1][1]+n[1][3]);m=n[0][0]-(n[1][0]+n[1][2]);p=n[1][1]-(n[0][1]+n[0][3]);r=n[1][0]-(n[0][0]+n[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(y-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(p-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(r-z,0);z=[];
+c=[];l=[];c[0]=m>=r?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;l[0]=y>=p?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);l[1]=mxUtils.reversePortConstraints(l[0]);m=m>=r?m:r;p=y>=p?y:p;r=[[0,0],[0,0]];u=!1;for(y=0;2>y;y++)0==a[y]&&(0==(c[y]&d[y])&&(c[y]=mxUtils.reversePortConstraints(c[y])),0==(l[y]&d[y])&&(l[y]=mxUtils.reversePortConstraints(l[y])),r[y][0]=l[y],r[y][1]=c[y]);0<p&&0<m&&(0<(c[0]&d[0])&&0<(l[1]&d[1])?(r[0][0]=
+c[0],r[0][1]=l[0],r[1][0]=l[1],r[1][1]=c[1],u=!0):0<(l[0]&d[0])&&0<(c[1]&d[1])&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=c[1],r[1][1]=l[1],u=!0));0<p&&!u&&(r[0][0]=l[0],r[0][1]=c[0],r[1][0]=l[1],r[1][1]=c[1],u=!0);0<m&&!u&&(r[0][0]=c[0],r[0][1]=l[0],r[1][0]=c[1],r[1][1]=l[1]);for(y=0;2>y;y++)if(0==a[y]&&(0==(r[y][0]&d[y])&&(r[y][0]=r[y][1]),z[y]=r[y][0]&d[y],z[y]|=(r[y][1]&d[y])<<8,z[y]|=(r[1-y][y]&d[y])<<16,z[y]|=(r[1-y][1-y]&d[y])<<24,0==(z[y]&15)&&(z[y]<<=8),0==(z[y]&3840)&&(z[y]=z[y]&15|z[y]>>8),0==
+(z[y]&983040)&&(z[y]=z[y]&65535|(z[y]&251658240)>>8),a[y]=z[y]&15,d[y]==mxConstants.DIRECTION_MASK_WEST||d[y]==mxConstants.DIRECTION_MASK_NORTH||d[y]==mxConstants.DIRECTION_MASK_EAST||d[y]==mxConstants.DIRECTION_MASK_SOUTH))a[y]=d[y];d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;z-=x;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=n[0][0];mxEdgeStyle.wayPoints1[0][1]=n[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2];mxEdgeStyle.wayPoints1[0][1]+=n[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=n[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*n[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*n[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(y=0;y<d.length;y++)l=d[y]&15,q=l==mxConstants.DIRECTION_MASK_EAST?3:l,q+=x,4<q&&(q-=4),m=mxEdgeStyle.dirVectors[q-1],l=0<q%2?0:1,l!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),s=0<(d[y]&mxEdgeStyle.TARGET_MASK),u=0<(d[y]&mxEdgeStyle.SOURCE_MASK),p=(d[y]&mxEdgeStyle.SIDE_MASK)>>5,p<<=x,15<p&&(p>>=4),r=0<(d[y]&mxEdgeStyle.CENTER_MASK),(u||s)&&9>p?(u=u?0:1,q=r&&0==l?n[u][0]+b[u][0]*n[u][2]:r?n[u][1]+b[u][1]*
+n[u][3]:mxEdgeStyle.limits[u][p],0==l?(p=(q-mxEdgeStyle.wayPoints1[f][0])*m[0],0<p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*p)):(p=(q-mxEdgeStyle.wayPoints1[f][1])*m[1],0<p&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*p))):r&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[q]/2)),0<f&&mxEdgeStyle.wayPoints1[f][l]==mxEdgeStyle.wayPoints1[f-1][l]?f--:z=l;for(y=0;y<=f&&!(y==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)!=(f+1)%2);y++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[y][0]),Math.round(mxEdgeStyle.wayPoints1[y][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-
1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_HEXAGON,mxPerimeter.HexagonPerimeter);function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;
@@ -1317,20 +1317,20 @@ this.cellsAdded(c,a,f,null,null,!1,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!1,!1);
mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b,!0);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),null!=c&&(b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c));return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.removeCellsAfterUngroup(a);this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsAfterUngroup=function(a){this.cellsRemoved(this.addAllEdges(a))};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=0,r=0;if(this.isSwimlane(a[k]))var s=this.getStartSize(a[k]),p=s.width,r=
-s.height;l=l.clone();c&&(l.x=Math.round(l.x+n.x-b-p-g),l.y=Math.round(l.y+n.y-b-r-d));l.width=Math.round(n.width+2*b+p+g+e);l.height=Math.round(n.height+2*b+r+d+f);this.model.setGeometry(a[k],l);this.moveCells(m,b+p-n.x+g,b+r-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;d=null!=d?d:0;e=null!=e?e:0;f=null!=f?f:0;g=null!=g?g:0;this.model.beginUpdate();try{for(var k=a.length-1;0<=k;k--){var l=this.getCellGeometry(a[k]);if(null!=l){var m=this.getChildCells(a[k]);if(null!=m&&0<m.length){var n=this.getBoundingBoxFromGeometry(m,!0);if(null!=n&&0<n.width&&0<n.height){var p=0,r=0;if(this.isSwimlane(a[k]))var u=this.getStartSize(a[k]),p=u.width,r=
+u.height;l=l.clone();c&&(l.x=Math.round(l.x+n.x-b-p-g),l.y=Math.round(l.y+n.y-b-r-d));l.width=Math.round(n.width+2*b+p+g+e);l.height=Math.round(n.height+2*b+r+d+f);this.model.setGeometry(a[k],l);this.moveCells(m,b+p-n.x+g,b+r-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
mxGraph.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=0;c<a.length;c++)if(this.model.isVertex(a[c])||this.model.isEdge(a[c])){var d=this.view.getBoundingBox(this.view.getState(a[c]),!0);null!=d&&(null==b?b=mxRectangle.fromRectangle(d):b.add(d))}return b};
mxGraph.prototype.cloneCells=function(a,b,c){b=null!=b?b:!0;var d=null;if(null!=a){for(var e=new mxDictionary,d=[],f=0;f<a.length;f++)e.put(a[f],!0),d.push(a[f]);if(0<d.length)for(var g=this.view.scale,k=this.view.translate,d=this.model.cloneCells(a,!0,c),f=0;f<a.length;f++)if(!b&&this.model.isEdge(d[f])&&null!=this.getEdgeValidationError(d[f],this.model.getTerminal(d[f],!0),this.model.getTerminal(d[f],!1)))d[f]=null;else{var l=this.model.getGeometry(d[f]);if(null!=l){var m=this.view.getState(a[f]),
n=this.view.getState(this.model.getParent(a[f]));if(null!=m&&null!=n)if(c=n.origin.x,n=n.origin.y,this.model.isEdge(d[f])){for(var m=m.absolutePoints,p=this.model.getTerminal(a[f],!0);null!=p&&!e.get(p);)p=this.model.getParent(p);null==p&&l.setTerminalPoint(new mxPoint(m[0].x/g-k.x,m[0].y/g-k.y),!0);for(p=this.model.getTerminal(a[f],!1);null!=p&&!e.get(p);)p=this.model.getParent(p);null==p&&(p=m.length-1,l.setTerminalPoint(new mxPoint(m[p].x/g-k.x,m[p].y/g-k.y),!1));l=l.points;if(null!=l)for(m=0;m<
l.length;m++)l[m].x+=c,l[m].y+=n}else l.translate(c,n)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};
mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var r=this.view.getState(p),s=null!=r?r.origin:n,q=this.model.getGeometry(a[l]);if(null!=q){var t=s.x-m.x,u=s.y-m.y,q=q.clone();q.translate(t,u);!q.relative&&this.model.isVertex(a[l])&&!this.isAllowNegativeCoordinates()&&
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var r=this.view.getState(p),u=null!=r?r.origin:n,q=this.model.getGeometry(a[l]);if(null!=q){var s=u.x-m.x,t=u.y-m.y,q=q.clone();q.translate(s,t);!q.relative&&this.model.isVertex(a[l])&&!this.isAllowNegativeCoordinates()&&
(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[l],q)}}b==p&&c+l>this.model.getChildCount(b)&&c--;this.model.add(b,a[l],c+l);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[l],!0);(null==k||k)&&this.isExtendParentsOnAdd(a[l])&&this.isExtendParent(a[l])&&this.extendParent(a[l]);(null==g||g)&&this.constrainChild(a[l]);null!=d&&this.cellConnected(a[l],d,!0);null!=e&&this.cellConnected(a[l],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",
d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,g){var n=this.model.getGeometry(d);if(null!=n){var p=this.view.getState(d);if(null!=p){for(var r=p.getVisibleTerminal(g),s=!1;null!=r;){if(a[e]==r){s=!0;break}r=this.model.getParent(r)}if(s){var r=c.x,s=c.y,q=this.view.getState(this.model.getParent(d));
-null!=q&&this.model.isVertex(q.cell)&&(r=q.x/b,s=q.y/b);n=n.clone();p=p.absolutePoints;q=g?0:p.length-1;n.setTerminalPoint(new mxPoint(p[q].x/b-r,p[q].y/b-s),g);this.model.setTerminal(f[k],null,g);this.model.setGeometry(f[k],n)}}}}),k=0;k<f.length;k++)d.get(f[k])||(g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,g){var n=this.model.getGeometry(d);if(null!=n){var p=this.view.getState(d);if(null!=p){for(var r=p.getVisibleTerminal(g),u=!1;null!=r;){if(a[e]==r){u=!0;break}r=this.model.getParent(r)}if(u){var r=c.x,u=c.y,q=this.view.getState(this.model.getParent(d));
+null!=q&&this.model.isVertex(q.cell)&&(r=q.x/b,u=q.y/b);n=n.clone();p=p.absolutePoints;q=g?0:p.length-1;n.setTerminalPoint(new mxPoint(p[q].x/b-r,p[q].y/b-u),g);this.model.setTerminal(f[k],null,g);this.model.setGeometry(f[k],n)}}}}),k=0;k<f.length;k++)d.get(f[k])||(g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCells([a])[0];var k=this.view.getState(a),l=this.getCellGeometry(c);if(null!=l&&null!=l.points&&null!=k){var m=this.view.translate,n=this.view.scale,p=mxUtils.findNearestSegment(k,(d+m.x)*n,(e+m.y)*n);l.points=l.points.slice(0,p);l=this.getCellGeometry(a);null!=l&&null!=l.points&&(l=l.clone(),l.points=l.points.slice(p),this.model.setGeometry(a,
l))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0);this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
@@ -1353,7 +1353,7 @@ mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if
(e.width=l,e.height=m);this.model.isVertex(a)?this.cellResized(a,e,!0,d):this.model.setGeometry(a,e)}};mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.getCellGeometry(b);if(null!=b&&null!=c&&!this.isCellCollapsed(b)&&(a=this.getCellGeometry(a),null!=a&&!a.relative&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};
mxGraph.prototype.importCells=function(a,b,c,d,e,f){return this.moveCells(a,b,c,!0,d,e,f)};
mxGraph.prototype.moveCells=function(a,b,c,d,e,f,g){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){a=this.model.getTopmostCells(a);this.model.beginUpdate();try{for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(var m=mxUtils.bind(this,function(a){for(;null!=a;){if(k.get(a))return!0;a=this.model.getParent(a)}return!1}),n=[],l=0;l<a.length;l++){var p=this.getCellGeometry(a[l]),r=this.model.getParent(a[l]);(null==p||!p.relative||!this.model.isEdge(r)||
-!m(this.model.getTerminal(r,!0))&&!m(this.model.getTerminal(r,!1)))&&n.push(a[l])}a=n;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var s=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(s);if(null!=e){var q=this.model.getChildCount(e);this.cellsAdded(a,e,q,null,
+!m(this.model.getTerminal(r,!0))&&!m(this.model.getTerminal(r,!1)))&&n.push(a[l])}a=n;d&&(a=this.cloneCells(a,this.isCloneInvalidEdges(),g),null==e&&(e=this.getDefaultParent()));var u=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(u);if(null!=e){var q=this.model.getChildCount(e);this.cellsAdded(a,e,q,null,
null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);if(null!=d){b=parseFloat(b);c=parseFloat(c);d=d.clone();d.translate(b,c);!d.relative&&this.model.isVertex(a)&&!this.isAllowNegativeCoordinates()&&(d.x=Math.max(0,parseFloat(d.x)),d.y=Math.max(0,parseFloat(d.y)));if(d.relative&&!this.model.isEdge(a)){var e=this.model.getParent(a),f=0;this.model.isVertex(e)&&(f=this.view.getState(e),e=null!=f?f.style:this.getCellStyle(e),f=mxUtils.getValue(e,mxConstants.STYLE_ROTATION,0));
@@ -1377,7 +1377,7 @@ d,k,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f
mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
c,"previous",e))}finally{this.model.endUpdate()}}};
mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var f=this.model.getGeometry(a[e]);if(null!=f){var g=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=g&&null!=k){var f=f.clone(),l=-k.origin.x,m=-k.origin.y,n=g.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=p&&this.isCellDisconnectable(a[e],
-p,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(;null!=r&&!d.get(r);)r=this.model.getParent(r);if(null==r){var s=n.length-1;f.setTerminalPoint(new mxPoint(n[s].x/b-c.x+l,n[s].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};
+p,!0)){for(;null!=p&&!d.get(p);)p=this.model.getParent(p);null==p&&(f.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(;null!=r&&!d.get(r);)r=this.model.getParent(r);if(null==r){var u=n.length-1;f.setTerminalPoint(new mxPoint(n[u].x/b-c.x+l,n[u].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],f)}}}}finally{this.model.endUpdate()}}};
mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};
mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};
mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
@@ -1452,9 +1452,9 @@ mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e
mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f=new mxDictionary;if(null!=a)for(var g=0;g<a.length;g++){var k=this.view.getState(a[g]),l=null!=k?k.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),k=null!=k?k.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);l==b&&null!=k&&k!=b&&d?f.get(k)||(f.put(k,!0),e.push(k)):k==b&&null!=l&&l!=b&&c&&!f.get(l)&&(f.put(l,!0),e.push(l))}return e};
mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),k=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(k==a&&g==b||!c&&k==b&&g==a)&&e.push(d[f])}return e};
mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
-mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=g.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)){var s=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(r=mxUtils.getBoundingBox(r,s));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k?f.push(p):this.getCells(a,
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),k=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var m=g.getChildCount(e),n=0;n<m;n++){var p=g.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)){var u=mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(r=mxUtils.getBoundingBox(r,u));(g.isEdge(p)||g.isVertex(p))&&r.x>=a&&r.y+r.height<=l&&r.y>=b&&r.x+r.width<=k?f.push(p):this.getCells(a,
b,c,d,p,f)}}}return f};mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),k=0;k<g;k++){var l=this.model.getChildAt(c,k),m=this.view.getState(l);this.isCellVisible(l)&&null!=m&&(!d||m.x>=a)&&(!e||m.y>=b)&&f.push(l)}return f};
-mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,r=0,s=0;s<n.length;s++)this.view.getVisibleTerminal(n[s],!0)==m?p++:r++;(c&&0==p&&0<r||!c&&0==r&&0<p)&&d.push(m);n=c?r-p:p-r;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,k=0,l=0;l<f;l++){var m=e.getChildAt(a,l);if(this.model.isVertex(m)&&this.isCellVisible(m)){for(var n=this.getConnections(m,b?a:null),p=0,r=0,u=0;u<n.length;u++)this.view.getVisibleTerminal(n[u],!0)==m?p++:r++;(c&&0==p&&0<r||!c&&0==r&&0<p)&&d.push(m);n=c?r-p:p-r;n>k&&(k=n,g=m)}}0==d.length&&null!=g&&d.push(g)}return d};
mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a&&(b=null!=b?b:!0,e=e||new mxDictionary,!e.get(a)&&(e.put(a,!0),d=c(a,d),null==d||d)))if(d=this.model.getEdgeCount(a),0<d)for(var f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),k=this.model.getTerminal(g,!0)==a;if(!b||k)k=this.model.getTerminal(g,!k),this.traverse(k,b,c,g,e)}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
@@ -1645,8 +1645,8 @@ mxConnectionHandler.prototype.drawPreview=function(){this.updatePreview(null==th
mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget(c)||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=!1,g=null;e.beginUpdate();try{if(null!=a&&null==b&&!this.graph.isIgnoreTerminalEvent(c)&&this.isCreateTarget(c)&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);f=!0;if(null==d||!this.graph.getModel().isEdge(d)){var k=this.graph.getView().getState(d);if(null!=k){var l=e.getGeometry(b);l.x-=k.origin.x;l.y-=k.origin.y}}else d=
this.graph.getDefaultParent();this.graph.addCell(b,d)}var m=this.graph.getDefaultParent();null!=a&&null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot()&&(m=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(m=e.getParent(m)));var n=k=null;null!=this.edgeState&&(k=this.edgeState.cell.value,n=this.edgeState.cell.style);g=this.insertEdge(m,null,k,a,b,n);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);
this.graph.setConnectionConstraint(g,b,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);e.getParent(a);if(this.isInsertBefore(g,a,b,c,d)){m=null;for(l=a;null!=l.parent&&null!=l.geometry&&l.geometry.relative&&l.parent!=g.parent;)l=this.graph.model.getParent(l);null!=l&&null!=l.parent&&l.parent==g.parent&&(m=l.parent.getIndex(l),l.parent.insert(g,m))}var p=e.getGeometry(g);null==p&&(p=new mxGeometry,p.relative=!0,e.setGeometry(g,p));if(null!=
-this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,s=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-s.x,q.y/r-s.y))}}if(null==b){var t=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-t.x,this.originalPoint.y/r-t.y):new mxPoint(this.currentPoint.x/r-t.x,this.currentPoint.y/r-t.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
-this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(u){mxLog.show(),mxLog.debug(u.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
+this.waypoints&&0<this.waypoints.length){var r=this.graph.view.scale,u=this.graph.view.translate;p.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];p.points.push(new mxPoint(q.x/r-u.x,q.y/r-u.y))}}if(null==b){var s=this.graph.view.translate,r=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/r-s.x,this.originalPoint.y/r-s.y):new mxPoint(this.currentPoint.x/r-s.x,this.currentPoint.y/r-s.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
+this.graph.view.scale;p.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(t){mxLog.show(),mxLog.debug(t.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return this.graph.addEdge(b,a,d,e)};
mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.view.translate,f=this.graph.view.scale,g=new mxPoint(this.currentPoint.x/f-e.x,this.currentPoint.y/f-e.y);c.x=Math.round(g.x-c.width/2-this.graph.panDx/f);c.y=Math.round(g.y-c.height/2-this.graph.panDy/f);
g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null!=k){var l=k.x/f-e.x,e=k.y/f-e.y;Math.abs(l-c.x)<=g&&(c.x=Math.round(l));Math.abs(e-c.y)<=g&&(c.y=Math.round(e))}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
@@ -1736,8 +1736,8 @@ mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&
null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());this.removeHint();this.redrawHandles();this.unscaledBounds=this.edgeHandlers=null};
mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f,g){e=this.graph.model.getGeometry(a);null!=e&&(d==mxEvent.LABEL_HANDLE?(c=this.graph.view.scale,b=Math.round((this.labelShape.bounds.getCenterX()-this.startX)/c),c=Math.round((this.labelShape.bounds.getCenterY()-this.startY)/c),e=e.clone(),null==e.offset?e.offset=new mxPoint(b,c):(e.offset.x+=b,e.offset.y+=c),this.graph.model.setGeometry(a,e)):null!=this.unscaledBounds&&(c=this.graph.view.scale,(0!=this.childOffsetX||0!=this.childOffsetY)&&
this.moveChildren(a,Math.round(this.childOffsetX/c),Math.round(this.childOffsetY/c)),this.graph.resizeCell(a,this.unscaledBounds,g)))};mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f),k=this.graph.getCellGeometry(g);null!=k&&(k=k.clone(),k.translate(b,c),d.setGeometry(g,k))}};
-mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,r=p+m;a=a.y-g.y*f;var s=a+n,q=p+m/2,t=a+n/2;4<d?(s+=c,e&&(s=this.graph.snap(s/f)*f)):3>d&&(a+=c,e&&(a=this.graph.snap(a/f)*f));if(0==d||3==d||5==d)p+=b,e&&(p=this.graph.snap(p/f)*f);else if(2==d||4==d||7==d)r+=b,e&&(r=this.graph.snap(r/
-f)*f);e=r-p;c=s-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=r-e,a=s-c)));l&&(e+=e-m,c+=c-n,p+=q-(p+e/2),a+=t-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,k,l){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var m=a.width,n=a.height,p=a.x-g.x*f,r=p+m;a=a.y-g.y*f;var u=a+n,q=p+m/2,s=a+n/2;4<d?(u+=c,e&&(u=this.graph.snap(u/f)*f)):3>d&&(a+=c,e&&(a=this.graph.snap(a/f)*f));if(0==d||3==d||5==d)p+=b,e&&(p=this.graph.snap(p/f)*f);else if(2==d||4==d||7==d)r+=b,e&&(r=this.graph.snap(r/
+f)*f);e=r-p;c=u-a;k&&(k=this.graph.getCellGeometry(this.state.cell),null!=k&&(k=k.width/k.height,1==d||2==d||7==d||6==d?e=c*k:c=e/k,0==d&&(p=r-e,a=u-c)));l&&(e+=e-m,c+=c-n,p+=q-(p+e/2),a+=s-(a+c/2));0>e&&(p+=e,e=Math.abs(e));0>c&&(a+=c,c=Math.abs(c));d=new mxRectangle(p+g.x*f,a+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));
return d};mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),b=this.tolerance;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]&&(this.bounds.width<2*this.sizers[0].bounds.width+2*b||this.bounds.height<2*this.sizers[0].bounds.height+2*b))b/=2,a.x=this.sizers[0].bounds.width+b,a.y=this.sizers[0].bounds.height+b;return a};
mxVertexHandler.prototype.redrawHandles=function(){var a=this.tolerance;this.verticalOffset=this.horizontalOffset=0;var b=this.bounds;if(null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]){if(null==this.index&&this.manageSizers&&8<=this.sizers.length){var c=this.getHandlePadding();this.horizontalOffset=c.x;this.verticalOffset=c.y;if(0!=this.horizontalOffset||0!=this.verticalOffset)b=new mxRectangle(b.x,b.y,b.width,b.height),b.x-=this.horizontalOffset/2,b.width+=this.horizontalOffset,b.y-=
@@ -1873,7 +1873,7 @@ mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener
function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
-mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var k=!1;null!=f;){if("add"==f.nodeName){var l=f.getAttribute("if");if(null==l||e[l]){var l=f.getAttribute("as"),l=mxResources.get(l)||l,m=mxUtils.eval(mxUtils.getTextContent(f)),n=f.getAttribute("action"),p=f.getAttribute("icon"),r=f.getAttribute("iconCls"),s=f.getAttribute("enabled-if"),s=null==s||e[s];k&&(b.addSeparator(g),k=!1);null!=p&&this.imageBasePath&&(p=this.imageBasePath+p);l=this.addAction(b,a,l,p,m,n,c,g,r,s);this.addItems(a,
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var k=!1;null!=f;){if("add"==f.nodeName){var l=f.getAttribute("if");if(null==l||e[l]){var l=f.getAttribute("as"),l=mxResources.get(l)||l,m=mxUtils.eval(mxUtils.getTextContent(f)),n=f.getAttribute("action"),p=f.getAttribute("icon"),r=f.getAttribute("iconCls"),u=f.getAttribute("enabled-if"),u=null==u||e[u];k&&(b.addSeparator(g),k=!1);null!=p&&this.imageBasePath&&(p=this.imageBasePath+p);l=this.addAction(b,a,l,p,m,n,c,g,r,u);this.addItems(a,
b,c,d,e,f.firstChild,l)}}else"separator"==f.nodeName&&(k=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,k,l,m){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},k,l,m)};
mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),k=e[d].getAttribute("name");null!=k&&"function"==typeof g&&(f[k]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
@@ -1979,10 +1979,10 @@ function(a,c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"
g={});for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var k=f.getAttribute("as");if("add"==f.nodeName){var l=mxUtils.getTextContent(f),m=null;null!=l&&0<l.length&&mxStylesheetCodec.allowEval?m=mxUtils.eval(l):(m=f.getAttribute("value"),mxUtils.isNumeric(m)&&(m=parseFloat(m)));null!=m&&(g[k]=m)}else"remove"==f.nodeName&&delete g[k]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());mxStylesheetCodec.allowEval=!0;
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
var mxDefaultToolbarCodec=mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||
-f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),r=mxUtils.getTextContent(c),s=null;if(null!=l)s=d.addItem(f,g,l,k);else if(null!=m)var q=mxDefaultToolbarCodec.allowEval?mxUtils.eval(r):null,s=d.addMode(f,g,m,k,q);else if(null!=n||null!=r&&0<r.length)s=e.templates[n],n=c.getAttribute("style"),null!=s&&null!=n&&(s=e.graph.cloneCells([s])[0],s.setStyle(n)),n=null,null!=r&&0<r.length&&
-mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(r)),s=d.addPrototype(f,g,s,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g){n=d.addActionCombo(f);for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p))}else{var t=null,u=d.addPrototype(f,g,function(){var a=e.templates[t.value];if(null!=a){var a=a.clone(),b=t.options[t.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+
-a+" not found");return null},null,null,p),t=d.addCombo();mxEvent.addListener(t,"change",function(){d.toolbar.selectMode(u,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(t,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(t,g,r||n).cellStyle=p.getAttribute("style"))}null!=s&&(n=c.getAttribute("id"),
-null!=n&&0<n.length&&s.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+f,g=c.getAttribute("icon"),k=c.getAttribute("pressedIcon"),l=c.getAttribute("action"),m=c.getAttribute("mode"),n=c.getAttribute("template"),p="0"!=c.getAttribute("toggle"),r=mxUtils.getTextContent(c),u=null;if(null!=l)u=d.addItem(f,g,l,k);else if(null!=m)var q=mxDefaultToolbarCodec.allowEval?mxUtils.eval(r):null,u=d.addMode(f,g,m,k,q);else if(null!=n||null!=r&&0<r.length)u=e.templates[n],n=c.getAttribute("style"),null!=u&&null!=n&&(u=e.graph.cloneCells([u])[0],u.setStyle(n)),n=null,null!=r&&0<r.length&&
+mxDefaultToolbarCodec.allowEval&&(n=mxUtils.eval(r)),u=d.addPrototype(f,g,u,k,n,p);else if(k=mxUtils.getChildNodes(c),0<k.length)if(null==g){n=d.addActionCombo(f);for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(n,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),p=p.getAttribute("action"),d.addActionOption(n,g,p))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+
+a+" not found");return null},null,null,p),s=d.addCombo();mxEvent.addListener(s,"change",function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,q(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<k.length;f++)p=k[f],"separator"==p.nodeName?d.addOption(s,"---"):"add"==p.nodeName&&(g=p.getAttribute("as"),r=p.getAttribute("template"),d.addOption(s,g,r||n).cellStyle=p.getAttribute("style"))}null!=u&&(n=c.getAttribute("id"),
+null!=n&&0<n.length&&u.setAttribute("id",n))}c=c.nextSibling}}return d};return a}());mxDefaultToolbarCodec.allowEval=!0;mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),k=parseInt(a.getAttribute("y")),l=a.getAttribute("width"),m=a.getAttribute("height"),
g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,k,l,m,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
@@ -2029,12 +2029,12 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
"geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=e,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],e=1;e<this.gridSteps;e++){var f=e*b;d.push("M 0 "+f+" L "+c+" "+f+" M "+f+" 0 L "+f+" "+c)}return'\x3csvg width\x3d"'+c+'" height\x3d"'+
c+'" xmlns\x3d"'+mxConstants.NS_SVG+'"\x3e\x3cdefs\x3e\x3cpattern id\x3d"grid" width\x3d"'+c+'" height\x3d"'+c+'" patternUnits\x3d"userSpaceOnUse"\x3e\x3cpath d\x3d"'+d.join(" ")+'" fill\x3d"none" stroke\x3d"'+a+'" opacity\x3d"0.2" stroke-width\x3d"1"/\x3e\x3cpath d\x3d"M '+c+" 0 L 0 0 0 "+c+'" fill\x3d"none" stroke\x3d"'+a+'" stroke-width\x3d"1"/\x3e\x3c/pattern\x3e\x3c/defs\x3e\x3crect width\x3d"100%" height\x3d"100%" fill\x3d"url(#grid)"/\x3e\x3c/svg\x3e'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=
function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=d.ownerSVGElement&&(d=d.ownerSVGElement);var e=this.gridSize*this.view.scale*this.view.gridSteps,e=-Math.round(e-mxUtils.mod(this.view.translate.x*this.view.scale+b,e))+"px "+-Math.round(e-mxUtils.mod(this.view.translate.y*this.view.scale+c,e))+"px";d.style.backgroundPosition=e}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,
-q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var t=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),u=(a=a&&Math.min(t.width,t.height)>this.minPageBreakDist)?Math.ceil(c/t.height)-1:0,v=a?Math.ceil(b/t.width)-1:0,x=q.x+b,y=q.y+c;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?u:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
-[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*t.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*t.height))]:[new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*t.width),Math.round(y))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
+q=this.view.getBackgroundPageBounds();b=q.width;c=q.height;var s=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g),t=(a=a&&Math.min(s.width,s.height)>this.minPageBreakDist)?Math.ceil(c/s.height)-1:0,v=a?Math.ceil(b/s.width)-1:0,x=q.x+b,z=q.y+c;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?t:v,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?
+[new mxPoint(Math.round(q.x),Math.round(q.y+(c+1)*s.height)),new mxPoint(Math.round(x),Math.round(q.y+(c+1)*s.height))]:[new mxPoint(Math.round(q.x+(c+1)*s.width),Math.round(q.y)),new mxPoint(Math.round(q.x+(c+1)*s.width),Math.round(z))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-
b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,d){for(var e=0;e<c.length;e++)if(this.graph.getModel().isVertex(c[e])){var f=this.graph.getCellGeometry(c[e]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var c=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=c.apply(this,arguments);a.intersects=
mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=a.width/this.scale,e=a.height/this.scale,f=this.graph.pageFormat,g=this.graph.pageScale,
a=f.width*g,f=f.height*g,g=Math.floor(Math.min(0,b)/a),q=Math.floor(Math.min(0,c)/f),b=Math.ceil(Math.max(1,b+d)/a),c=Math.ceil(Math.max(1,c+e)/f);return new mxRectangle(this.scale*(this.translate.x+g*a),this.scale*(this.translate.y+q*f),this.scale*(b-g)*a,this.scale*(c-q)*f)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){d.apply(this,arguments);if(this.dialect!=mxConstants.DIALECT_SVG&&null!=this.view.backgroundPageShape&&(!this.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.container)))this.view.backgroundPageShape.node.style.marginLeft=
-a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px"};var e=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,f,g){var s=e.apply(this,arguments);null!=g&&!g&&mxEvent.addListener(s,"mousedown",function(a){mxEvent.consume(a)});return s};var f=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=f.apply(this,arguments),e=b.getParent(d);
+a+"px",this.view.backgroundPageShape.node.style.marginTop=b+"px"};var e=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,b,c,d,f,g){var u=e.apply(this,arguments);null!=g&&!g&&mxEvent.addListener(u,"mousedown",function(a){mxEvent.consume(a)});return u};var f=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=this.graph.getModel(),c=b.getParent(this.graph.getSelectionCell()),d=f.apply(this,arguments),e=b.getParent(d);
if(null==c||c!=d&&c!=e)for(;!this.graph.isCellSelected(d)&&!this.graph.isCellSelected(e)&&b.isVertex(e)&&!this.graph.isContainer(e);)d=e,e=this.graph.getModel().getParent(d);return d};var g=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,b){var c=g.apply(this,arguments);if(!c)for(var d=this.graph.getModel(),e=d.getParent(a);null!=e;){if(this.graph.isCellSelected(e)&&d.isVertex(e)){c=!0;break}e=d.getParent(e)}return c};mxGraphHandler.prototype.selectDelayed=
function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(!(null!=c&&a.isSource(c.control)))for(var c=this.graph.getModel(),d=c.getParent(b);!this.graph.isCellSelected(d)&&c.isVertex(d);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var b=this.graph.getModel(),c=b.getParent(a);b.isVertex(c)&&!this.graph.isContainer(c);)this.graph.isCellSelected(c)&&
(a=c),c=b.getParent(c);return a}})();
@@ -2045,16 +2045,16 @@ b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this
this.diagramContainer.removeAttribute("title")}));var e=!1,f=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,b){return e||f.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(e=!0,this.hoverIcons.reset(),d.container.style.cursor="move",!d.isEditing()&&mxEvent.getSource(a)==d.container&&mxEvent.consume(a)):!mxEvent.isConsumed(a)&&27==a.keyCode&&this.hideDialog()});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,
function(a){d.container.style.cursor="";e=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var g=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return g.apply(this,arguments)||e||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var k=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=
function(a){return k.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var l=!1,m=null,n=null,p=null,r=mxUtils.bind(this,function(){if(l!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var c=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=c}a=this.toolbar.fontMenu;c=this.toolbar.sizeMenu;
-if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),s=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
-if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=s.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));s.toolbar.setFontName(c);s.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var t=d.cellEditor.stopEditing;
-d.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var u=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
+if(null==p)this.toolbar.createTextToolbar();else{for(var e=0;e<p.length;e++)this.toolbar.container.appendChild(p[e]);this.toolbar.fontMenu=m;this.toolbar.sizeMenu=n}l=d.cellEditor.isContentEditing();m=a;n=c;p=b}}),u=this,q=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){q.apply(this,arguments);r();if(d.cellEditor.isContentEditing()){var a=!1,b=function(){a||(a=!0,window.setTimeout(function(){for(var b=d.getSelectedElement();null!=b&&b.nodeType!=mxConstants.NODETYPE_ELEMENT;)b=b.parentNode;
+if(null!=b&&(b=mxUtils.getCurrentStyle(b),null!=b&&null!=u.toolbar)){var c=b.fontFamily;"'"==c.charAt(0)&&(c=c.substring(1));"'"==c.charAt(c.length-1)&&(c=c.substring(0,c.length-1));u.toolbar.setFontName(c);u.toolbar.setFontSize(parseInt(b.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",b);mxEvent.addListener(d.cellEditor.textarea,"touchend",b);mxEvent.addListener(d.cellEditor.textarea,"mouseup",b);mxEvent.addListener(d.cellEditor.textarea,"keyup",b);b()}};var s=d.cellEditor.stopEditing;
+d.cellEditor.stopEditing=function(a,b){s.apply(this,arguments);r()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";window.self===window.top&&null!=d.container.parentNode&&d.container.focus();var t=d.fireMouseEvent;d.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));
mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic".split(" ");this.setDefaultStyle=function(a){var b=d.view.getState(a);if(null!=b){a=a.clone();a.style="";a=d.getCellStyle(a);var c=[],e=[],f;for(f in b.style)a[f]!=b.style[f]&&(c.push(b.style[f]),
e.push(f));f=d.getModel().getStyle(b.cell);for(var k=null!=f?f.split(";"):[],g=0;g<k.length;g++){var l=k[g],m=l.indexOf("\x3d");0<=m&&(f=l.substring(0,m),l=l.substring(m+1),null!=a[f]&&"none"==l&&(c.push(l),e.push(f)))}d.getModel().isEdge(b.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",e,"values",c,"cells",[b.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=d.defaultEdgeStyle;d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged",
-"keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],z="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)v.push(A[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var E=function(a,b){d.getModel().beginUpdate();
-try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=v.slice(),f=0;f<m.length;f++){var p=m[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),s=mxUtils.indexOf(n,q);0<=s&&n.splice(s,1);for(var t=0;t<A.length;t++){var u=A[t];if(0<=mxUtils.indexOf(u,q))for(var y=
-0;y<u.length;y++){var z=mxUtils.indexOf(n,u[y]);0<=z&&n.splice(z,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],E=e[q];if(null!=E&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,E,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){E(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){E(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
-b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));E(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&!(e=d.getModel().isVertex(c[k])||e,(f=d.getModel().isEdge(c[k])||f)&&e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(y,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
-mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(z,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(v,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(v,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(z,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
+"keys",[],"values",[],"cells",[]))};var z=["fontFamily","fontSize","fontColor"],y="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),E=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],z,["align"],["html"]];for(a=0;a<E.length;a++)for(b=0;b<E[a].length;b++)v.push(E[a][b]);for(a=0;a<x.length;a++)v.push(x[a]);var A=function(a,b){d.getModel().beginUpdate();
+try{if(b)for(var c=d.getModel().isEdge(g),e=c?d.currentEdgeStyle:d.currentVertexStyle,c=["fontSize","fontFamily","fontColor"],f=0;f<c.length;f++){var k=e[c[f]];null!=k&&d.setCellStyles(c[f],k,a)}else for(k=0;k<a.length;k++){for(var g=a[k],l=d.getModel().getStyle(g),m=null!=l?l.split(";"):[],n=v.slice(),f=0;f<m.length;f++){var p=m[f],r=p.indexOf("\x3d");if(0<=r){var q=p.substring(0,r),u=mxUtils.indexOf(n,q);0<=u&&n.splice(u,1);for(var s=0;s<E.length;s++){var t=E[s];if(0<=mxUtils.indexOf(t,q))for(var A=
+0;A<t.length;A++){var y=mxUtils.indexOf(n,t[A]);0<=y&&n.splice(y,1)}}}}e=(c=d.getModel().isEdge(g))?d.currentEdgeStyle:d.currentVertexStyle;for(f=0;f<n.length;f++){var q=n[f],z=e[q];if(null!=z&&("shape"!=q||c))(!c||0>mxUtils.indexOf(x,q))&&d.setCellStyles(q,z,[g])}}}finally{d.getModel().endUpdate()}};d.addListener("cellsInserted",function(a,b){A(b.getProperty("cells"))});d.addListener("textInserted",function(a,b){A(b.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,
+b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));A(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,b){var c=b.getProperty("cells"),e=!1,f=!1;if(0<c.length)for(var k=0;k<c.length&&!(e=d.getModel().isVertex(c[k])||e,(f=d.getModel().isEdge(c[k])||f)&&e);k++);else f=e=!0;for(var c=b.getProperty("keys"),g=b.getProperty("values"),k=0;k<c.length;k++){var l=0<=mxUtils.indexOf(z,c[k]);if("strokeColor"!=c[k]||null!=g[k]&&"none"!=g[k])if(0<=
+mxUtils.indexOf(x,c[k]))f||0<=mxUtils.indexOf(y,c[k])?null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]:e&&0<=mxUtils.indexOf(v,c[k])&&(null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k]);else if(0<=mxUtils.indexOf(v,c[k])){if(e||l)null==g[k]?delete d.currentVertexStyle[c[k]]:d.currentVertexStyle[c[k]]=g[k];if(f||l||0<=mxUtils.indexOf(y,c[k]))null==g[k]?delete d.currentEdgeStyle[c[k]]:d.currentEdgeStyle[c[k]]=g[k]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||
Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==
d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?
"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=
@@ -2083,18 +2083,18 @@ function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor
"Next Page"),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(g.innerHTML="",mxUtils.write(g,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";k.style.paddingLeft="4px";k.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(k.style.display="",f.style.display="",g.style.display="inline-block"):(k.style.display=
"none",f.style.display="none",g.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",l);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,(mxResources.get("zoomOut")||"Zoom Out")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,(mxResources.get("zoomIn")||"Zoom In")+" (Alt+Mousewheel)");d(mxUtils.bind(this,
function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit")||"Fit");var n=null,p=null,r=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);n=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";
-p=null}),600)}),a||200)}),s=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
+p=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var q=d(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=q.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){q.style.display=1<t.getChildCount(t.root)?
+mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")||"Layers"),s=a.getModel();s.addListener(mxEvent.CHANGE,function(){q.style.display=1<s.getChildCount(s.root)?
"":"none"})}null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow")||"Open in New Window");a.lightbox&&this.container!=document.body&&d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,(mxResources.get("close")||
-"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||s(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
-"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():s(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||s(30)}));var u=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():s(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
-mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var y=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
-k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):y.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
-1;var z=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
-this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=z&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-z.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
-2-z.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){z=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
+"Close")+" (Escape)");this.chromelessToolbar.style.display="none";a.container.appendChild(this.chromelessToolbar);this.chromelessToolbar.style.marginLeft=-(24*e+10)+"px";this.addChromelessClickHandler();mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),r())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,
+"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?r():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var t=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<t&&Math.abs(this.scrollTop-a.container.scrollTop)<t&&Math.abs(this.startX-c.getGraphX())<t&&Math.abs(this.startY-c.getGraphY())<t&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?r():u(30))}})}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&
+mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}x.apply(this,arguments)};var z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),e=Math.ceil(2*c.x+b.width*d.width),f=Math.ceil(2*c.y+b.height*d.height),k=a.minimumGraphSize;if(null==
+k||k.width!=e||k.height!=f)a.minimumGraphSize=new mxRectangle(0,0,e,f);e=c.x-b.x*d.width;c=c.y-b.y*d.height;!this.autoTranslate&&(this.view.translate.x!=e||this.view.translate.y!=c)?(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(e,c),a.container.scrollLeft+=Math.round((e-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1):z.apply(this,arguments)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=
+1;var y=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?0.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+0.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale):0.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-0.01)/this.view.scale:(this.cumulativeZoomFactor/=
+this.zoomFactor,this.cumulativeZoomFactor=Math.round(20*this.view.scale*this.cumulativeZoomFactor)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(0.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=y&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-y.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/
+2-y.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){y=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);
break}d=d.parentNode}}))};EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
EditorUi.prototype.lightboxFit=function(){this.editor.graph.maxFitScale=2;this.editor.graph.fit(60);this.editor.graph.maxFitScale=null};EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.chromeless)return this.onBeforeUnload()})};
@@ -2179,15 +2179,15 @@ b){l=f=g=k=null})})}this.cellRenderer.getLabelValue=function(a){var b=mxCellRend
!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,b){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var n=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=n.apply(this,arguments);if(this.graph.pageVisible){for(var b=[],c=this.graph.pageFormat,d=this.graph.pageScale,e=c.width*d,c=c.height*
d,d=this.graph.view.translate,f=this.graph.view.scale,k=this.graph.getPageLayout(),g=0;g<k.width;g++)b.push(new mxRectangle(((k.x+g)*e+d.x)*f,(k.y*c+d.y)*f,e*f,c*f));for(g=0;g<k.height;g++)b.push(new mxRectangle((k.x*e+d.x)*f,((k.y+g)*c+d.y)*f,e*f,c*f));a=b.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor=
"#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);"1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):
-c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),s=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
-function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),s=0):s=(new Date).getTime()-r};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<s||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&t.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,
+c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);this.getRubberband=function(){return p};var r=(new Date).getTime(),u=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=
+function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(r=(new Date).getTime(),u=0):u=(new Date).getTime()-r};var s=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&s.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,
arguments)||mxEvent.isShiftDown(a)};var v=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,
-function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return y.apply(this,arguments)};var z=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return z.apply(this,arguments);if(null!=
-this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var s=
-mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=s&&(r=mxUtils.getBoundingBox(r,s));(k.isEdge(p)||k.isVertex(p))&&r.x>=a&&(r.y+r.height<=l&&r.y>=b&&r.x+r.width<=g)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
-"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
-null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
+function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(!this.isEnabled()&&!a.isConsumed()){var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))}else return z.apply(this,arguments)};var y=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return y.apply(this,arguments);if(null!=
+this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var k=this.getModel(),g=a+c,l=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=k.getRoot()));if(null!=e)for(var m=k.getChildCount(e),n=0;n<m;n++){var p=k.getChildAt(e,n),r=this.view.getState(p);if(null!=r&&this.isCellVisible(p)&&"1"!=mxUtils.getValue(r.style,"locked","0")){var u=
+mxUtils.getValue(r.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(r=mxUtils.getBoundingBox(r,u));(k.isEdge(p)||k.isVertex(p))&&r.x>=a&&(r.y+r.height<=l&&r.y>=b&&r.x+r.width<=g)&&f.push(p);this.getAllCells(a,b,c,d,p,f)}}}return f};var E=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?!1:E.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
+"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var A=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();A=null!=c&&!this.isSelectionEmpty()&&!this.isCellSelected(c.cell)?this.getSelectionCells():null}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");
+null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),p.start(c.x,c.y)):null!=A?this.addSelectionCells(A):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);A=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy=urlParams.target||"auto";Graph.prototype.linkTarget="_blank";
Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;
Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=window!=window.top?document.referrer:document.location.toString();
@@ -2204,8 +2204,8 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,c){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,g=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1==arguments.length&&"[object String]"==Object.prototype.toString.call(a)&&
-!/\d/.test(a)&&(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),s=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),u={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
-12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:s,MM:g(s),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+!/\d/.test(a)&&(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var k=c?"getUTC":"get",l=a[k+"Date"](),m=a[k+"Day"](),n=a[k+"Month"](),p=a[k+"FullYear"](),r=a[k+"Hours"](),u=a[k+"Minutes"](),q=a[k+"Seconds"](),k=a[k+"Milliseconds"](),s=c?0:a.getTimezoneOffset(),t={d:l,dd:g(l),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:n+1,mm:g(n+1),mmm:d.i18n.monthNames[n],mmmm:d.i18n.monthNames[n+
+12],yy:String(p).slice(2),yyyy:p,h:r%12||12,hh:g(r%12||12),H:r,HH:g(r),M:u,MM:g(u),s:q,ss:g(q),l:g(k,3),L:g(99<k?Math.round(k/10):k),t:12>r?"a":"p",tt:12>r?"am":"pm",T:12>r?"A":"P",TT:12>r?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<s?"-":"+")+g(100*Math.floor(Math.abs(s)/60)+Math.abs(s)%60,4),S:["th","st","nd","rd"][3<l%10?0:(10!=l%100-l%10)*l%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in t?t[a]:a.slice(1,
a.length-1)})};
Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),c=b.getChildCount(b.root),d=0;d<c;d++)(function(c){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");b.isVisible(c)&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d.appendChild(g);var k=c.value||
mxResources.get("background")||"Background";d.setAttribute("title",k);mxUtils.write(d,k);a.appendChild(d);mxEvent.addListener(g,"click",function(){null!=g.getAttribute("checked")?g.removeAttribute("checked"):g.setAttribute("checked","checked");b.setVisible(c,g.checked)})})(b.getChildAt(b.root,d));return a};
@@ -2214,9 +2214,9 @@ match.index)+(null!=f?f:e));d=match.index+e.length}}c.push(b.substring(d));retur
Graph.prototype.connectVertex=function(a,b,c,d,e){var f=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(f.x+=a.geometry.width/2,f.y-=c):b==mxConstants.DIRECTION_SOUTH?(f.x+=a.geometry.width/2,f.y+=a.geometry.height+c):(f.x=b==mxConstants.DIRECTION_WEST?f.x-c:f.x+(a.geometry.width+c),f.y+=a.geometry.height/2);c=this.view.getState(this.model.getParent(a));
var g=this.view.scale,k=this.view.translate,l=k.x*g,k=k.y*g;this.model.isVertex(c.cell)&&(l=c.x,k=c.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(f.x+=a.parent.geometry.x,f.y+=a.parent.geometry.y);c=mxEvent.isControlDown(d)&&!e?null:this.getCellAt(l+f.x*g,k+f.y*g);this.model.isAncestor(c,a)&&(c=null);for(g=c;null!=g;){if(this.isCellLocked(g)){c=null;break}g=this.model.getParent(g)}null!=c&&(g=this.view.getState(a),l=this.view.getState(c),null!=g&&null!=l&&mxUtils.intersects(g,l)&&(c=null));
if(e=!mxEvent.isShiftDown(d)||e)b==mxConstants.DIRECTION_NORTH?f.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?f.y+=a.geometry.height/2:f.x=b==mxConstants.DIRECTION_WEST?f.x-a.geometry.width/2:f.x+a.geometry.width/2;null!=c&&!this.isCellConnectable(c)&&(g=this.getModel().getParent(c),this.getModel().isVertex(g)&&this.isCellConnectable(g)&&(c=g));if(c==a||this.model.isEdge(c)||!this.isCellConnectable(c))c=null;g=[];this.model.beginUpdate();try{l=c;if(null==l&&e){for(var k=a,m=this.getCellGeometry(a);null!=
-m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);null!=m&&(m.x=f.x-m.width/2,m.y=f.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var s=mxEvent.isControlDown(d)&&e||null==c&&null!=m&&m.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=s&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=s.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==s.parent&&(q=d.parent.getIndex(d),d.parent.insert(s,q))}null==c&&null!=l&&(null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
-q));null!=s&&g.push(s);null==c&&null!=l&&g.push(l);null==l&&null!=s&&s.geometry.setTerminalPoint(f,!1);null!=s&&this.fireEvent(new mxEventObject("cellsInserted","cells",[s]))}finally{this.model.endUpdate()}return g};
+m&&m.relative;)k=this.getModel().getParent(k),m=this.getCellGeometry(k);var n=this.view.getState(k),p=null!=n?n.style:this.getCellStyle(k);if(mxUtils.getValue(p,"part",!1)){var r=this.model.getParent(k);this.model.isVertex(r)&&(k=r)}l=this.duplicateCells([k],!1)[0];m=this.getCellGeometry(l);null!=m&&(m.x=f.x-m.width/2,m.y=f.y-m.height/2)}m=null;null!=this.layoutManager&&(m=this.layoutManager.getLayout(this.model.getParent(a)));var u=mxEvent.isControlDown(d)&&e||null==c&&null!=m&&m.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,l,this.createCurrentEdgeStyle());if(null!=u&&this.connectionHandler.insertBeforeSource){var q=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=u.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==u.parent&&(q=d.parent.getIndex(d),d.parent.insert(u,q))}null==c&&null!=l&&(null!=m&&null!=a.parent&&m.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST)&&(q=a.parent.getIndex(a),a.parent.insert(l,
+q));null!=u&&g.push(u);null==c&&null!=l&&g.push(l);null==l&&null!=u&&u.geometry.setTerminalPoint(f,!1);null!=u&&this.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{this.model.endUpdate()}return g};
Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],c="",d;for(d in this.model.cells)if(c=this.model.cells[d],this.model.isVertex(c)||this.model.isEdge(c))this.isHtmlLabel(c)?(a.innerHTML=this.getLabel(c),c=mxUtils.extractTextWithWhitespace([a])):c=this.getLabel(c),c=mxUtils.trim(c.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<c.length&&b.push(c);return b.join(" ")};
Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),c=a,d=null;null==d&&null!=c;)null!=c.value&&"object"==typeof c.value&&(d=c.hasAttribute(b)?null!=c.getAttribute(b)?c.getAttribute(b):"":null),c=this.model.getParent(c);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
@@ -2273,7 +2273,7 @@ HoverIcons.prototype.update=function(a,b,c){if(this.graph.connectionArrowsEnable
this.startTime);this.setDisplay("");if(null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,c))this.reset(!1);else if(null!=this.currentState||d>this.activationDelay)if(this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==c||!mxUtils.contains(this.bbox,b,c)))null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=
a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset()}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
(function(){var a=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(b,c,f,g){if(null!=c&&null!=b&&("1"==c.style.snapToPoint||"1"==b.style.snapToPoint)){c=this.getTerminalPort(b,c,g);var k=this.getNextPoint(b,f,g),l=this.graph.isOrthogonal(b),m=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=m)var p=Math.cos(-m),r=Math.sin(-m),k=mxUtils.getRotatedPoint(k,p,r,n);p=parseFloat(b.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);p+=parseFloat(b.style[g?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&l,p);0!=m&&(p=Math.cos(m),r=Math.sin(m),k=mxUtils.getRotatedPoint(k,p,r,n));if(null!=c){m=this.graph.getAllConnectionConstraints(c);l=n=null;for(p=0;p<m.length;p++)if(r=this.graph.getConnectionPoint(c,m[p]),null!=r){var s=(r.x-k.x)*(r.x-k.x)+(r.y-k.y)*(r.y-k.y);if(null==l||s<l)n=r,l=s}null!=n&&(k=n)}b.setAbsoluteTerminalPoint(k,g)}else a.apply(this,
+0);p+=parseFloat(b.style[g?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);k=this.getPerimeterPoint(c,k,0==m&&l,p);0!=m&&(p=Math.cos(m),r=Math.sin(m),k=mxUtils.getRotatedPoint(k,p,r,n));if(null!=c){m=this.graph.getAllConnectionConstraints(c);l=n=null;for(p=0;p<m.length;p++)if(r=this.graph.getConnectionPoint(c,m[p]),null!=r){var u=(r.x-k.x)*(r.x-k.x)+(r.y-k.y)*(r.y-k.y);if(null==l||u<l)n=r,l=u}null!=n&&(k=n)}b.setAbsoluteTerminalPoint(k,g)}else a.apply(this,
arguments)};var b=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,c,f){var g=b.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=f.state&&(g=f.state.view.graph.replacePlaceholders(f.state.cell,g));return g};var c=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,
8))try{var f=b.substring(8,b.length-1),g=mxUtils.parseXml(a.view.graph.decompress(f));return new mxShape(new mxStencil(g.documentElement))}catch(k){null!=window.console&&console.log("Error in shape: "+k)}}return c.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var c=mxStencilRegistry.getBasenameForStencil(a);if(null!=c){b=mxStencilRegistry.libraries[c];if(null!=b){if(null==mxStencilRegistry.packages[c]){mxStencilRegistry.packages[c]=1;for(c=0;c<b.length;c++){var d=b[c];if(".xml"==d.toLowerCase().substring(d.length-4,d.length))mxStencilRegistry.loadStencilSet(d,null);else if(".js"==d.toLowerCase().substring(d.length-
@@ -2293,8 +2293,8 @@ f[1]),2<f.length?"0"!=f[2]:!0))}}catch(k){}return d}if(null!=a.shape)if(null!=a.
this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null!=e&&!e.relative&&c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,"part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,
arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=
function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),k=b.getTerminal(e,!1);b.setTerminal(e,k,!0);b.setTerminal(e,f,!1);var g=b.getGeometry(e);if(null!=g){g=g.clone();null!=g.points&&g.points.reverse();
-var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(k);if(null!=n){var s=null!=p?this.getConnectionConstraint(n,p,!0):null,q=null!=r?this.getConnectionConstraint(n,r,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,k,!1,s)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/
-2;g.y+=g.height/2-g.width/2;var t=g.width;g.width=g.height;g.height=t;b.setGeometry(e,g);var u=this.view.getState(e);if(null!=u){var v=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
+var l=g.getTerminalPoint(!0),m=g.getTerminalPoint(!1);g.setTerminalPoint(l,!1);g.setTerminalPoint(m,!0);b.setGeometry(e,g);var n=this.view.getState(e),p=this.view.getState(f),r=this.view.getState(k);if(null!=n){var u=null!=p?this.getConnectionConstraint(n,p,!0):null,q=null!=r?this.getConnectionConstraint(n,r,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,k,!1,u)}c.push(e)}}else if(b.isVertex(e)&&(g=this.getCellGeometry(e),null!=g)){g=g.clone();g.x+=g.width/2-g.height/
+2;g.y+=g.height/2-g.width/2;var s=g.width;g.width=g.height;g.height=s;b.setGeometry(e,g);var t=this.view.getState(e);if(null!=t){var v=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==v?v="south":"south"==v?v="west":"west"==v?v="north":"north"==v&&(v="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,v,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&
"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==
typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,
mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);e==mxConstants.NONE&&d==mxConstants.NONE&&b.push(a[c])}}a=b;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,b){this.setAttributeForCell(a,"link",b)};Graph.prototype.setTooltipForCell=function(a,b){this.setAttributeForCell(a,"tooltip",b)};Graph.prototype.setAttributeForCell=function(a,b,c){var d=null;null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),
@@ -2317,9 +2317,9 @@ k.getCenterY(),d=null!=d?Math.max(d,g):g,e=null!=e?Math.min(e,g):g;c.push(k)}}if
Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var b=this.cloneCells(a),c=0;c<b.length;c++){var d=this.view.getState(a[c]);if(null!=d){var e=this.getCellGeometry(b[c]);null!=e&&e.relative&&(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}for(var d=new mxCodec,e=new mxGraphModel,f=e.getChildAt(e.getRoot(),0),c=0;c<a.length;c++)e.add(f,b[c]);
return d.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,b,c,d,e,f,k){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;k=null!=k?k:!0;var g=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==g)throw Error(mxResources.get("drawingEmpty"));var l=this.view.scale,m=mxUtils.createXmlDocument();d=
null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/l;d.setAttribute("width",Math.ceil(g.width*a)+2*c+"px");d.setAttribute("height",Math.ceil(g.height*a)+2*
-c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.imageOffset=e?-0.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,r,s){var q=this.state;if(null!=this.foAltText&&
-(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var t=this.createElement("text");t.setAttribute("x",Math.round(d/2));t.setAttribute("y",Math.round((e+q.fontSize)/2));t.setAttribute("fill",q.fontColor||"black");t.setAttribute("text-anchor","middle");t.setAttribute("font-size",Math.round(q.fontSize)+"px");t.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&t.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
-t.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.setAttribute("text-decoration","underline");mxUtils.write(t,f);return t}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var r=k.drawCellState;k.drawCellState=function(a,
+c+"px");d.setAttribute("version","1.1");var n=d;e&&(n=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),n.setAttribute("transform","translate(0.5,0.5)"),d.appendChild(n));m.appendChild(d);m=this.createSvgCanvas(n);m.foOffset=e?-0.5:0;m.textOffset=e?-0.5:0;m.imageOffset=e?-0.5:0;m.translate(Math.floor((c/b-g.x)/l),Math.floor((c/b-g.y)/l));var p=m.createAlternateContent;m.createAlternateContent=function(a,b,c,d,e,f,k,g,l,m,n,r,u){var q=this.state;if(null!=this.foAltText&&
+(0==d||0!=q.fontSize&&f.length<5*d/q.fontSize)){var s=this.createElement("text");s.setAttribute("x",Math.round(d/2));s.setAttribute("y",Math.round((e+q.fontSize)/2));s.setAttribute("fill",q.fontColor||"black");s.setAttribute("text-anchor","middle");s.setAttribute("font-size",Math.round(q.fontSize)+"px");s.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&s.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&
+s.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&s.setAttribute("text-decoration","underline");mxUtils.write(s,f);return s}return p.apply(this,arguments)};c=this.backgroundImage;null!=c&&(e=l/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(g,e)&&m.image(b.x,b.y,c.width,c.height,c.src,!0));m.scale(a);m.textEnabled=k;k=this.createSvgImageExport();var r=k.drawCellState;k.drawCellState=function(a,
b){(f||a.view.graph.isCellSelected(a.cell))&&r.apply(this,arguments)};k.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=
function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else if((b=document.selection)&&"Control"!=b.type)a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select()};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],
d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=function(a,b){var c=a.tHead;if(null!=c)for(var d=0;d<c.rows.length;d++){var e=document.createElement("th");c.rows[d].appendChild(e);mxUtils.br(e)}c=a.tBodies[0];for(d=0;d<c.rows.length;d++)e=c.rows[d].insertCell(b),mxUtils.br(e);return c.rows[0].cells[0<=b?b:c.rows[0].cells.length-1]};
@@ -2363,38 +2363,38 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=!0;mxVertexHandler.prototype.livePreview=!0;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxVertexHandler.prototype.rotationHandleVSpacing=-20;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=
!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=
18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(b)||mxEvent.isPopupTrigger(b)&&(null==a.getState()||mxEvent.isControlDown(b)||mxEvent.isShiftDown(b))};
-var s=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){s.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};
+var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,b){u.apply(this,arguments);mxEvent.isTouchEvent(b.getEvent())&&this.graph.isCellSelected(b.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return mxEvent.isLeftMouseButton(b)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b))||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};
mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div&&"none"!=this.div.style.display,d=null,e=null,f=null,k=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,e=this.first.y,f=(this.currentX-d)/this.graph.view.scale,k=(this.currentY-e)/this.graph.view.scale,
mxEvent.isAltDown(b.getEvent())||(f=this.graph.snap(f),k=this.graph.snap(k)));this.reset();if(c){if(mxEvent.isAltDown(b.getEvent())&&this.graph.isToggleEvent(b.getEvent())){var f=new mxRectangle(this.x,this.y,this.width,this.height),g=this.graph.getCells(f.x,f.y,f.width,f.height);this.graph.removeSelectionCells(g)}else if(this.isSpaceEvent(b)){this.graph.model.beginUpdate();try{g=this.graph.getCellsBeyond(d,e,this.graph.getDefaultParent(),!0,!0);for(c=0;c<g.length;c++)if(this.graph.isCellMovable(g[c])){var l=
this.graph.view.getState(g[c]),m=this.graph.getCellGeometry(g[c]);null!=l&&null!=m&&(m=m.clone(),m.translate(f,k),this.graph.model.setGeometry(g[c],m))}}finally{this.graph.model.endUpdate()}}else f=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(f,b.getEvent());b.consume()}};mxRubberband.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.first){var c=mxUtils.getScrollOrigin(this.graph.container),d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;
var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,k=this.graph.tolerance;if(null!=this.div||Math.abs(e)>k||Math.abs(f)>k)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=
0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=
this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),
-this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),u=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),u=0):u=(new Date).getTime()-t;this.currentTerminalState=
-c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
+this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var s=(new Date).getTime(),t=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){v.apply(this,arguments);c!=this.currentTerminalState?(s=(new Date).getTime(),t=0):t=(new Date).getTime()-s;this.currentTerminalState=
+c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,b){var c=null!=
a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=!1,c;c=mxConstants.HANDLE_SIZE;
-this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var z=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return z.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):A.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&E.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var D=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){D.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+this.preferHtml&&(c-=1);return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var y=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return y.apply(this,arguments)};var E=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):E.apply(this,arguments)};var A=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&A.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell);this.updateLinkHint(c);null!=c&&(a=!0);a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b){if(null==b||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="4px 10px 6px 10px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter=
"",this.updateLinkHint(b),this.graph.container.appendChild(this.linkHint));var c=b;60<c.length&&(c=c.substring(0,36)+"..."+c.substring(c.length-20));var d=document.createElement("a");d.setAttribute("href",this.graph.getAbsoluteUrl(b));d.setAttribute("title",b);null!=this.graph.linkTarget&&d.setAttribute("target",this.graph.linkTarget);mxUtils.write(d,c);this.linkHint.innerHTML="";this.linkHint.appendChild(d);this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&(b=document.createElement("img"),
-b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var G=
-mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
-this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var H=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
-function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
+b.setAttribute("src",IMAGE_PATH+"/edit.gif"),b.setAttribute("title",mxResources.get("editLink")),b.setAttribute("width","11"),b.setAttribute("height","11"),b.style.marginLeft="10px",b.style.marginBottom="-1px",b.style.cursor="pointer",this.linkHint.appendChild(b),mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)})))}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var H=
+mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){H.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});
+this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell);null!=b&&(this.updateLinkHint(b),this.redrawHandles())};var G=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=
+function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this);if(null!=this.state&&null!=this.linkHint){var a=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),a=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||
"0",a),b=null!=a?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state;null==a&&(a=this.state);this.linkHint.style.left=Math.round(b.x+(b.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=
1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var X=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(X.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+
a.height+6+this.state.view.graph.tolerance)+"px"}};var V=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){V.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var W=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){W.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),
this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();
-(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function s(){mxActor.call(this)}function q(a,b){this.canvas=
+(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function u(){mxActor.call(this)}function q(a,b){this.canvas=
a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function y(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function A(){mxShape.call(this)}function E(){mxShape.call(this)}function C(){mxEllipse.call(this)}function D(){mxShape.call(this)}
-function F(){mxShape.call(this)}function G(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function X(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function s(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function y(){mxCylinder.call(this)}function E(){mxShape.call(this)}function A(){mxShape.call(this)}function D(){mxEllipse.call(this)}function C(){mxShape.call(this)}
+function F(){mxShape.call(this)}function H(){mxRectangleShape.call(this)}function G(){mxShape.call(this)}function N(){mxShape.call(this)}function K(){mxShape.call(this)}function R(){mxCylinder.call(this)}function X(){mxDoubleEllipse.call(this)}function V(){mxDoubleEllipse.call(this)}function W(){mxArrowConnector.call(this);this.spacing=0}function B(){mxArrowConnector.call(this);this.spacing=0}function T(){mxActor.call(this)}function M(){mxRectangleShape.call(this)}function I(){mxActor.call(this)}
function Y(){mxActor.call(this)}function L(){mxActor.call(this)}function J(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}function Q(){mxRhombus.call(this)}function ga(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function $(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}
function ka(){mxActor.call(this)}function da(){mxActor.call(this)}function na(){mxActor.call(this)}function va(a,b,c,d,e,f,k,g,l,m){k+=l;var n=d.clone();d.x-=e*(2*k+l);d.y-=f*(2*k+l);e*=k+l;f*=k+l;return function(){a.ellipse(n.x-e-k,n.y-f-k,2*k,2*k);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),
a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.cube=a;var sa=Math.tan(mxUtils.toRadians(30)),ma=(0.5-sa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/sa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,0.25*b);a.lineTo(0.5*b,b*ma);a.lineTo(b,0.25*b);a.lineTo(0.5*b,(0.5-ma)*b);a.lineTo(0,
@@ -2409,31 +2409,31 @@ b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=k;
mxActor);m.prototype.size=0.3;m.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,e-b/2);a.quadTo(3*d/4,e-1.4*b,d/2,e-b/2);a.quadTo(d/4,e-b*(1-1.4),0,e-b/2);a.lineTo(0,b/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=m;mxUtils.extend(n,mxActor);n.prototype.size=0.2;n.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d,0),new mxPoint(d-b,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=n;mxUtils.extend(p,mxActor);p.prototype.size=0.2;p.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=p;mxUtils.extend(r,mxActor);r.prototype.size=0.5;r.prototype.redrawPath=function(a,b,c,d,e){a.setFillColor(null);b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,
-0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(s,mxActor);s.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=s;q.prototype.moveTo=
+0),new mxPoint(b,0),new mxPoint(b,e/2),new mxPoint(0,e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=r;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,b,c,d,e){a.setStrokeWidth(1);a.setFillColor(this.stroke);b=d/5;a.rect(0,0,b,e);a.fillAndStroke();a.rect(2*b,0,b,e);a.fillAndStroke();a.rect(4*b,0,b,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;q.prototype.moveTo=
function(a,b){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,
arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=function(a,b,c,d,e,f,k){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=k};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=Math.abs(a-this.lastX),d=Math.abs(b-this.lastY),e=Math.sqrt(c*c+d*d);if(2>e)this.originalLineTo.apply(this.canvas,arguments);else{var f=Math.round(e/10),k=this.defaultVariation;5>f&&(f=5,k/=3);for(var g=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},
l=g(a-this.lastX)*c/f,g=g(b-this.lastY)*d/f,c=c/e,d=d/e,e=0;e<f;e++){var m=l*e+this.lastX,n=g*e+this.lastY,p=(Math.random()-0.5)*k;this.originalLineTo.call(this.canvas,m-p*d,n-p*c)}this.originalLineTo.call(this.canvas,a,b)}}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=
this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var za=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));za.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Aa=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Aa.apply(this,arguments)};var Ba=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ba.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
mxConstants.NONE){if(!f&&(null==this.fill||this.fill==mxConstants.NONE))a.pointerEvents=!1;a.begin();this.isRounded?(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,
-c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=0.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=
-a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxActor);u.prototype.size=0.2;u.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=u;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+c));a.close();a.end();a.fillAndStroke()}}};var Ca=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ca.apply(this,arguments)};mxUtils.extend(s,mxRectangleShape);s.prototype.size=0.1;s.prototype.isHtmlAllowed=function(){return!1};s.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=
+a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};s.prototype.paintForeground=function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var k=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*k,e*k));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=s;mxUtils.extend(t,mxActor);t.prototype.size=0.2;t.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=t;mxUtils.extend(v,mxHexagon);v.prototype.size=0.25;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,0.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,0.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.prototype.defaultShapes.plus=x;var wa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){wa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+
-1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(y,mxRectangleShape);y.prototype.isHtmlAllowed=function(){return!1};y.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};y.prototype.paintForeground=function(a,b,c,
+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),wa.apply(this,[a,b,c,d,e]))}};mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};z.prototype.paintForeground=function(a,b,c,
d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,k=null;do{k=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=k){var g=this.style["symbol"+f+"Align"],l=this.style["symbol"+f+"VerticalAlign"],m=this.style["symbol"+f+"Width"],n=this.style["symbol"+
-f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,s=c,r=g==mxConstants.ALIGN_CENTER?r+(d-m)/2:g==mxConstants.ALIGN_RIGHT?r+(d-m-p):r+p,s=l==mxConstants.ALIGN_MIDDLE?s+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?s+(e-n-p):s+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,r,s,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.prototype.defaultShapes.ext=y;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
-e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=A;mxUtils.extend(E,mxShape);E.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
-a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=E;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=C;mxUtils.extend(D,mxShape);D.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
-0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=D;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
-4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(G,mxRectangleShape);G.prototype.size=40;G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};G.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
-k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=G&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};G.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
-mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=G;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
-b,c)};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};
-mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=G.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,
+f+"Height"],p=this.style["symbol"+f+"Spacing"]||0,r=this.style["symbol"+f+"ArcSpacing"];null!=r&&(p+=this.getArcSize(d+this.strokewidth,e+this.strokewidth)*r);var r=b,q=c,r=g==mxConstants.ALIGN_CENTER?r+(d-m)/2:g==mxConstants.ALIGN_RIGHT?r+(d-m-p):r+p,q=l==mxConstants.ALIGN_MIDDLE?q+(e-n)/2:l==mxConstants.ALIGN_BOTTOM?q+(e-n-p):q+p;a.save();g=new k;g.style=this.style;k.prototype.paintVertexShape.call(g,a,r,q,m,n);a.restore()}f++}while(null!=k)}mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.prototype.defaultShapes.ext=z;mxUtils.extend(y,mxCylinder);y.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=y;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,
+e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(A,mxShape);A.prototype.getLabelBounds=function(a){return new mxRectangle(a.x+a.width/6,a.y,5*a.width/6,a.height)};A.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();
+a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=A;mxUtils.extend(D,mxEllipse);D.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=D;mxUtils.extend(C,mxShape);C.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,
+0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=C;mxUtils.extend(F,mxShape);F.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};F.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};F.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,1.1*(e/8));a.lineTo(5*d/8,e/
+4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=F;mxUtils.extend(H,mxRectangleShape);H.prototype.size=40;H.prototype.isHtmlAllowed=function(){return!1};H.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};H.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),
+k=mxUtils.getValue(this.style,"participant");null==k||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(k=this.state.view.graph.cellRenderer.getShape(k),null!=k&&k!=H&&(k=new k,k.apply(this.state),a.save(),k.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};H.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
+mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=H;mxUtils.extend(G,mxShape);G.prototype.width=60;G.prototype.height=30;G.prototype.corner=10;G.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.width,parseFloat(mxUtils.getValue(this.style,"width",this.width))*this.scale)),c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"height",this.height))*this.scale));return new mxRectangle(a.x,a.y,
+b,c)};G.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,k=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),g=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+k,c);a.lineTo(b+k,c+Math.max(0,g-1.5*f));a.lineTo(b+Math.max(0,k-f),c+g);a.lineTo(b,c+g);a.close();a.fillAndStroke();a.begin();a.moveTo(b+k,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+g);a.stroke()};
+mxCellRenderer.prototype.defaultShapes.umlFrame=G;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=H.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,
arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));
c.y<a.getCenterY()&&(d+=1,d*=-1);return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=
N;mxUtils.extend(K,mxShape);K.prototype.size=10;K.prototype.inset=2;K.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),k=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+k);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-k,f/2);a.quadTo((d-f)/2-k,f+k,d/2,f+k);a.quadTo((d+f)/2+k,f+k,(d+f)/2+k,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=
@@ -2461,14 +2461,14 @@ mxCellRenderer.prototype.defaultShapes.partialRectangle=$;mxUtils.extend(ha,mxEl
e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ka;mxUtils.extend(da,mxActor);da.prototype.size=0.2;da.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var k=(d-f)/2,f=k+f;a.moveTo(0,b);a.lineTo(k,b);a.lineTo(k,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);
a.lineTo(f,e);a.lineTo(k,e);a.lineTo(k,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=da;mxUtils.extend(na,mxActor);na.prototype.size=0.25;na.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=na;mxMarker.addMarker("dash",
function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,k,g,l,m){var n=e*(k+l+1),p=f*(k+l+1);return function(){a.begin();a.moveTo(d.x-n/2-p/2,d.y-p/2+n/2);a.lineTo(d.x+p/2-3*n/2,d.y-3*p/2-n/2);a.moveTo(d.x-n/2+p/2,d.y-p/2-n/2);a.lineTo(d.x-p/2-3*n/2,d.y-3*p/2+n/2);a.stroke()}});mxMarker.addMarker("circle",va);mxMarker.addMarker("circlePlus",
-function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=va.apply(this,arguments),r=e*(k+2*l),s=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*r+e*l,n.y-2*s+f*l);a.moveTo(n.x-r-s+f*l,n.y-s+r-e*l);a.lineTo(n.x+s-r-f*l,n.y-s-r+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=1.118*e*l;c=1.118*f*l;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-
+function(a,b,c,d,e,f,k,g,l,m){var n=d.clone(),p=va.apply(this,arguments),r=e*(k+2*l),q=f*(k+2*l);return function(){p.apply(this,arguments);a.begin();a.moveTo(n.x-e*l,n.y-f*l);a.lineTo(n.x-2*r+e*l,n.y-2*q+f*l);a.moveTo(n.x-r-q+f*l,n.y-q+r-e*l);a.lineTo(n.x+q-r-f*l,n.y-q-r+e*l);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,k,g,l,m){b=1.118*e*l;c=1.118*f*l;e*=k+l;f*=k+l;var n=d.clone();n.x-=b;n.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(n.x,n.y);g?a.lineTo(n.x-
e-f/2,n.y-f+e/2):a.lineTo(n.x+f/2-e,n.y-f-e/2);a.lineTo(n.x-e,n.y-f);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,k,g,l,m,n){f*=g+m;k*=g+m;var p=e.clone();return function(){b.begin();b.moveTo(p.x,p.y);l?b.lineTo(p.x-f-k/a,p.y-k+f/a):b.lineTo(p.x+k/a-f,p.y-k-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fa=function(a,b,c,d,e){a=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);
a.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};a.getPosition=c;a.setPosition=d;a.ignoreGrid=null!=e?e:!0;return a},la=function(a,b){return fa(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100,e=null!=b?b:c.height/8;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*d),c.y+e)},function(a,b,c){a=Math.min(50,Math.max(0,
100*(a.width-b.x+a.x)/Math.min(a.width,a.height)));this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(a)})},ja=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b}},ia=function(a){return function(b){var c=[fa(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(b.x+0.75*c*b.width,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
Math.min(a,(c.x-b.x)/(0.75*b.width)))})];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(la(b));return c}},pa=function(a,b,c){c=null!=c?c:1;return function(d){var e=[fa(d,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},ta=function(a,b,c){return function(d){var e=
[fa(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(la(d));return e}},xa=function(a){return function(b){return[fa(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
"arrowWidth",L.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",L.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,2*(Math.abs(b.y+b.height/2-c.y)/b.height)));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},oa=function(a,b,c,d,e){var f=a.absolutePoints,k=f.length-1,g=a.view.translate,l=a.view.scale,m=c?f[0]:f[k],n=c?f[1]:f[k-
-1],p=n.x-m.x,r=n.y-m.y,s=Math.sqrt(p*p+r*r);return fa(a,b,function(a){a=d.call(this,s,p/s,r/s,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+r*r);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,r/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
+1],p=n.x-m.x,r=n.y-m.y,q=Math.sqrt(p*p+r*r);return fa(a,b,function(a){a=d.call(this,q,p/q,r/q,m,n);return new mxPoint(a.x/l-g.x,a.y/l-g.y)},function(a,b,c){a=Math.sqrt(p*p+r*r);b.x=(b.x+g.x)*l;b.y=(b.y+g.y)*l;e.call(this,a,p/a,r/a,m,n,b,c)})},ya=function(a,b,c){return oa(a,["width"],b,function(b,d,e,f,k){k=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*k/2,f.y+e*b/4-d*k/2)},function(b,d,e,f,k,g){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));a.style.width=Math.round(2*
b)/a.view.scale-c})},ua={link:function(a){return[ya(a,!0,10),ya(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(oa(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+
c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,k,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,k.x,k.y,g.x,g.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,g.x,g.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(l.getEvent())||
Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(oa(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*
@@ -2480,8 +2480,8 @@ c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxU
a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(l.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(l.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<
b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[fa(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(la(a,c/2))}return b},label:ja(),ext:ja(),rectangle:ja(),triangle:ja(),rhombus:ja(),hexagon:ja(),umlLifeline:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",G.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){var b=[fa(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,
-b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=
+"size",H.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){var b=[fa(a,["width","height"],function(a){var b=Math.max(G.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",G.prototype.width))),c=Math.max(1.5*G.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",G.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,
+b){this.state.style.width=Math.round(Math.max(G.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*G.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},process:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(0.5,parseFloat(mxUtils.getValue(this.state.style,"size",s.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=
Math.max(0,Math.min(0.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},cross:function(a){return[fa(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",da.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(2*(Math.max(0,a.getCenterY()-b.y)/c),2*(Math.max(0,
a.getCenterX()-b.x)/c))))})]},note:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[fa(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
"size",T.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},dataStorage:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,
@@ -2491,21 +2491,21 @@ mxConstants.STYLE_ROUNDED,!1)&&b.push(la(a));return b},corner:function(a){return
"tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==
mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[fa(a,["size"],
function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,2*((b.y-a.y)/a.height)))})]},offPageConnector:function(a){return[fa(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",P.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(u.prototype.size,!0),hexagon:pa(v.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:pa(t.prototype.size,!0),hexagon:pa(v.prototype.size,!0,0.5),curlyBracket:pa(r.prototype.size,!1),display:pa(na.prototype.size,!1),cube:ta(1,a.prototype.size,!1),card:ta(0.5,k.prototype.size,!0),loopLimit:ta(0.5,ba.prototype.size,!0),trapezoid:ia(0.5),parallelogram:ia(1)};Graph.createHandle=fa;Graph.handleFactory=ua;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=
ua[this.state.style.shape];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=ua[this.state.style.shape];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var qa=new mxPoint(1,0),ra=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ja=Math.cos(ia),ia=Math.sin(ia),qa=mxUtils.getRotatedPoint(qa,ja,ia),ia=mxUtils.toRadians(-150),ja=Math.cos(ia),ia=Math.sin(ia),
-ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,p=ra.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){var s=g;a=function(a,b,c){a-=s.x;var d=
-b-s.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);r?(c&&(s=new mxPoint(s.x+l*b,s.y+m*b),e.push(s)),s=new mxPoint(s.x+n*a,s.y+p*a)):(c&&(s=new mxPoint(s.x+n*a,s.y+p*a),e.push(s)),s=new mxPoint(s.x+l*b,s.y+m*b));e.push(s)};null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
+ra=mxUtils.getRotatedPoint(ra,ja,ia);mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var k=a.absolutePoints,g=k[0],k=k[k.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));var l=qa.x,m=qa.y,n=ra.x,p=ra.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=k&&null!=g){var q=g;a=function(a,b,c){a-=q.x;var d=
+b-q.y;b=(p*a-n*d)/(l*p-m*n);a=(m*a-l*d)/(m*n-l*p);r?(c&&(q=new mxPoint(q.x+l*b,q.y+m*b),e.push(q)),q=new mxPoint(q.x+n*a,q.y+p*a)):(c&&(q=new mxPoint(q.x+n*a,q.y+p*a),e.push(q)),q=new mxPoint(q.x+l*b,q.y+m*b));e.push(q)};null==d&&(d=new mxPoint(g.x+(k.x-g.x)/2,g.y+(k.y-g.y)/2));a(d.x,d.y,!0);a(k.x,k.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Da=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=
new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Da.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,
0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0.5,
0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.constraints=
mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;U.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;
T.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.15,0.05),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.85,0.05),
-!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
+!1),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.3),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.7),!0),new mxConnectionConstraint(new mxPoint(0.15,0.95),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.85,0.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,
0.1),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.75,0.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,0.3),!0),new mxConnectionConstraint(new mxPoint(0,0.7),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.25,
0.2),!1),new mxConnectionConstraint(new mxPoint(0.1,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(0.75,0.25),!1),new mxConnectionConstraint(new mxPoint(0.9,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.75),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0.5,
0.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(0.5,0.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.35),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.65),!1),new mxConnectionConstraint(new mxPoint(1,
-0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
+0.35),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.65),!1),new mxConnectionConstraint(new mxPoint(0.25,1),!1),new mxConnectionConstraint(new mxPoint(0.75,0),!1)];t.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0.25,1),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(0.75,
1),!0),new mxConnectionConstraint(new mxPoint(0.1,0.25),!1),new mxConnectionConstraint(new mxPoint(0.2,0.5),!1),new mxConnectionConstraint(new mxPoint(0.1,0.75),!1),new mxConnectionConstraint(new mxPoint(0.9,0.25),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.9,0.75),!1)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.75,0.5),
!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),
new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.5,1),!0),new mxConnectionConstraint(new mxPoint(1,0.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.375,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.625,0),!0),new mxConnectionConstraint(new mxPoint(0.125,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0.125,0.75),!1),new mxConnectionConstraint(new mxPoint(0.875,
@@ -2513,14 +2513,14 @@ new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new
0.55),!1),new mxConnectionConstraint(new mxPoint(0.07,0.4),!1),new mxConnectionConstraint(new mxPoint(0.31,0.8),!1),new mxConnectionConstraint(new mxPoint(0.13,0.77),!1),new mxConnectionConstraint(new mxPoint(0.8,0.8),!1),new mxConnectionConstraint(new mxPoint(0.55,0.95),!1),new mxConnectionConstraint(new mxPoint(0.875,0.5),!1),new mxConnectionConstraint(new mxPoint(0.96,0.7),!1),new mxConnectionConstraint(new mxPoint(0.625,0.2),!1),new mxConnectionConstraint(new mxPoint(0.88,0.25),!1)];n.prototype.constraints=
mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.25,0),!0),new mxConnectionConstraint(new mxPoint(0.5,0),!0),new mxConnectionConstraint(new mxPoint(0.75,0),!0),new mxConnectionConstraint(new mxPoint(0,0.25),!0),new mxConnectionConstraint(new mxPoint(0,0.5),!0),new mxConnectionConstraint(new mxPoint(0,0.75),!0),new mxConnectionConstraint(new mxPoint(1,0.25),!0),new mxConnectionConstraint(new mxPoint(1,
0.5),!0),new mxConnectionConstraint(new mxPoint(1,0.75),!0)];mxArrow.prototype.constraints=null;Y.prototype.constraints=null;I.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];J.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(1,
-0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];G.prototype.constraints=null;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
+0.5),!1),new mxConnectionConstraint(new mxPoint(0.5,0),!1),new mxConnectionConstraint(new mxPoint(0.5,1),!1)];H.prototype.constraints=null;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0.25),!1),new mxConnectionConstraint(new mxPoint(0,0.5),!1),new mxConnectionConstraint(new mxPoint(0,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0.175,
0.25),!1),new mxConnectionConstraint(new mxPoint(0.25,0.5),!1),new mxConnectionConstraint(new mxPoint(0.175,0.75),!1),new mxConnectionConstraint(new mxPoint(1,0.5),!1),new mxConnectionConstraint(new mxPoint(0.7,0.1),!1),new mxConnectionConstraint(new mxPoint(0.7,0.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0<b.length){var c=d.model.getParents(b);d.removeCells(b,a);if(null!=c){a=[];for(b=0;b<c.length;b++)(d.model.isVertex(c[b])||d.model.isEdge(c[b]))&&a.push(c[b]);d.setSelectionCells(a)}}}var b=this.editorUi,c=b.editor,d=c.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});this.addAction("open...",
function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var d=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(d)).decode(d.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));c.graph.setSelectionCells(c.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
": "+p.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=e;this.addAction("save",function(){b.saveFile(!1)},null,null,"Ctrl+S").isEnabled=e;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,"Ctrl+Shift+S").isEnabled=e;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,620,
420,!0,!0);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=e;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print","Ctrl+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo","Ctrl+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",!mxClient.IS_WIN?"Ctrl+Shift+Z":"Ctrl+Y");
this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut","Ctrl+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy","Ctrl+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste","Ctrl+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();try{var b=mxClipboard.paste(d);if(null!=b){var c=d.getBoundingBoxFromGeometry(b);
-if(null!=c){var e=d.view.translate,f=d.view.scale,p=e.y,r=Math.round(d.snap(d.popupMenuHandler.triggerX/f-e.x)),s=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,r-c.x,s-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,"Ctrl+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,"Ctrl+D");this.addAction("turn",
+if(null!=c){var e=d.view.translate,f=d.view.scale,p=e.y,r=Math.round(d.snap(d.popupMenuHandler.triggerX/f-e.x)),u=Math.round(d.snap(d.popupMenuHandler.triggerY/f-p));d.cellsMoved(b,r-c.x,u-c.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,"Ctrl+Delete");this.addAction("duplicate",function(){d.setSelectionCells(d.duplicateCells())},null,null,"Ctrl+D");this.addAction("turn",
function(){d.setSelectionCells(d.turnShapes(d.getSelectionCells()))},null,null,"Ctrl+R");this.addAction("selectVertices",function(){d.selectVertices()},null,null,"Ctrl+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,"Ctrl+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,"Ctrl+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,"Ctrl+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();
try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,"Ctrl+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},
null,null,"Ctrl+Shift+Page Up");this.addAction("enterGroup",function(){d.enterGroup()},null,null,"Ctrl+Shift+Page Down");this.addAction("expand",function(){d.foldCells(!1)},null,null,"Ctrl+Page Down");this.addAction("collapse",function(){d.foldCells(!0)},null,null,"Ctrl+Page Up");this.addAction("toFront",function(){d.orderCells(!1)},null,null,"Ctrl+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,"Ctrl+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container",
@@ -2557,7 +2557,7 @@ c.graph.selectionCellsHandler.getHandler(a);if(b instanceof mxEdgeHandler){for(v
a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var c=a[b];if(d.getModel().isEdge(c)){var e=d.getCellGeometry(c);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(c,e))}}}finally{d.getModel().endUpdate()}}});f=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),
null,null,"Ctrl+,");f=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,"Ctrl+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),e="";null!=c&&(e=c.style[mxConstants.STYLE_IMAGE]||e);var f=d.cellEditor.saveSelection();b.showImageDialog(a,e,function(a,
b,c){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(f),d.insertImage(a,b,c);else{var e=d.getSelectionCells();if(null!=a){var k=null;d.getModel().beginUpdate();try{if(0==e.length)var g=d.getFreeInsertPoint(),k=e=[d.insertVertex(d.getDefaultParent(),null,"",g.x,g.y,b,c,"shape\x3dimage;imageAspect\x3d0;aspect\x3dfixed;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;")];d.setCellStyles(mxConstants.STYLE_IMAGE,a,e);var l=d.view.getState(e[0]),v=null!=l?l.style:d.getCellStyle(e[0]);
-"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],y=d.getModel().getGeometry(x);null!=y&&(y=y.clone(),y.width=b,y.height=c,d.getModel().setGeometry(x,y))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&
+"image"!=v[mxConstants.STYLE_SHAPE]&&"label"!=v[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",e);if(1==d.getSelectionCount()&&null!=b&&null!=c){var x=e[0],z=d.getModel().getGeometry(x);null!=z&&(z=z.clone(),z.width=b,z.height=c,d.getModel().setGeometry(x,z))}}finally{d.getModel().endUpdate()}null!=k&&(d.setSelectionCells(k),d.scrollCellToVisible(k[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=e;this.addAction("insertImage...",function(){d.isEnabled()&&
!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=e;f=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),
b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,"Ctrl+Shift+L");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));f=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,"Ctrl+Shift+P");f.setToggleAction(!0);f.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));f=
this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible());
@@ -2624,7 +2624,7 @@ c);while(c++<a&&"1"==mxUtils.getValue(this.getCellStyle(b),"locked","0"));null!=
[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"];mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"];mxStencilRegistry.libraries.floorplan=
[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=
[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=
-[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var s=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return s.apply(this,arguments)}})();
+[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,f,k,g,l,m){if(null!=c&&null==mxMarker.markers[c]){var n=this.getPackageForType(c);null!=n&&mxStencilRegistry.getStencil(n)}return u.apply(this,arguments)}})();
(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.isElectronApp=window&&window.process&&window.process.type;EditorUi.prototype.emptyDiagramXml='\x3cmxGraphModel\x3e\x3croot\x3e\x3cmxCell id\x3d"0"/\x3e\x3cmxCell id\x3d"1" parent\x3d"0"/\x3e\x3c/root\x3e\x3c/mxGraphModel\x3e';EditorUi.prototype.emptyLibraryXml="\x3cmxlibrary\x3e[]\x3c/mxlibrary\x3e";EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle=
"shape\x3dstencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE\x3d);whiteSpace\x3dwrap;html\x3d1;";EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=
1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;(function(){EditorUi.prototype.useCanvasForExport=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(d){}};b.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" xmlns:xlink\x3d"http://www.w3.org/1999/xlink" width\x3d"1px" height\x3d"1px" version\x3d"1.1"\x3e\x3cforeignObject pointer-events\x3d"all" width\x3d"1" height\x3d"1"\x3e\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e\x3c/div\x3e\x3c/foreignObject\x3e\x3c/svg\x3e')))}catch(c){}})();
@@ -2634,16 +2634,16 @@ length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",spee
g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),g.innerHTML=f+"...",c.appendChild(g),d.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)))g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/
2))+"px";this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,f)}));this.stop();return a});g=!0}return g};var f=d.stop;d.stop=function(){f.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=f;f+=b;return a.substring(c,f)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<
24)}var f=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var g=d(a,4);if(null!=b&&b(f-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(d){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(s){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("\x26lt;mxfile ");if(0<=d){var e=b.lastIndexOf("\x26lt;/mxfile\x26gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,"\x3e").replace(/&lt;/g,"\x3c").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement),c=null!=g?mxUtils.getXml(g):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&
0<a.length){var b=a.indexOf('\x3cmeta charset\x3d"utf-8"\x3e');0<=b&&(a=a.slice(0,b)+'\x3cmeta charset\x3d"utf-8"/\x3e'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");
if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,g,q,t,u){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;t=null!=t?t:!0;var v=null,x=null;null==
-c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?v="_blank":x=v=d;if(null==a)return"";var y=a;if("mxfile"!=y.nodeName.toLowerCase()){var z=b.zapGremlins(mxUtils.getXml(a)),y=b.compress(z);if(b.decompress(y)!=z)return z;z=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(z,y);y=a.ownerDocument.createElement("mxfile");y.appendChild(z)}u?(y=y.cloneNode(!0),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.setAttribute("userAgent",
-navigator.userAgent),y.setAttribute("version",EditorUi.VERSION),y.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&y.setAttribute("type",a));a=mxUtils.getXml(y);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(y),b,null!=c?c.getTitle():null,v,x);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,t,x)}return a};
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,d,e,f,g,q,s,t){b=null!=b?b:this.editor.graph;e=null!=e?e:!1;s=null!=s?s:!0;var v=null,x=null;null==
+c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?v="_blank":x=v=d;if(null==a)return"";var z=a;if("mxfile"!=z.nodeName.toLowerCase()){var y=b.zapGremlins(mxUtils.getXml(a)),z=b.compress(y);if(b.decompress(z)!=y)return y;y=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(y,z);z=a.ownerDocument.createElement("mxfile");z.appendChild(y)}t?(z=z.cloneNode(!0),z.removeAttribute("userAgent"),z.removeAttribute("version"),z.removeAttribute("editor"),z.removeAttribute("type")):(z.setAttribute("userAgent",
+navigator.userAgent),z.setAttribute("version",EditorUi.VERSION),z.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&z.setAttribute("type",a));a=mxUtils.getXml(z);if(!f&&!e&&(g||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(z),b,null!=c?c.getTitle():null,v,x);else if(f||!e&&null!=c&&/(\.svg)$/i.test(c.getTitle())){if(null!=c&&(c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER))d=null;a=this.getEmbeddedSvg(a,b,d,null,q,s,x)}return a};
EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var f=this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=f&&f.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),
-f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,q){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var t=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=t&&/(\.svg)$/i.test(t.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
-var u=f.getGlobalVariable,v=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(v.root)}a=this.createFileData(g,f,t,window.location.href,a,b,c,d,e,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():
-b.getBoundingBox(b.getSelectionCells()),t=b.view.scale;f=Math.floor(g.x/t-b.view.translate.x);t=Math.floor(g.y/t-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",t)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));
+f.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),f.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,e,f,g,q){e=null!=e?e:!0;g=null!=g?g:this.getXmlFileData(e,null!=f?f:!1);f=this.editor.graph;var s=this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=s&&/(\.svg)$/i.test(s.getTitle()))){f=this.createTemporaryGraph(f.getStylesheet());
+var t=f.getGlobalVariable,v=this.pages[0];f.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(f.container);f.model.setRoot(v.root)}a=this.createFileData(g,f,s,window.location.href,a,b,c,d,e,q);f!=this.editor.graph&&f.container.parentNode.removeChild(f.container);return a};EditorUi.prototype.getHtml=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=null,q="https://www.draw.io/js/embed-static.min.js";if(null!=b){var g=f?b.getGraphBounds():
+b.getBoundingBox(b.getSelectionCells()),s=b.view.scale;f=Math.floor(g.x/s-b.view.translate.x);s=Math.floor(g.y/s-b.view.translate.y);g=b.background;null==e&&(b=this.getBasenames().join(";"),0<b.length&&(q="https://www.draw.io/embed.js?s\x3d"+b));a.setAttribute("x0",f);a.setAttribute("y0",s)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=d&&a.setAttribute("edit",d));
null!=e&&(e=e.replace(/&/g,"\x26amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";d=this.editor.graph.compress(a);this.editor.graph.decompress(d)!=a&&(d=encodeURIComponent(a));return(null==e?'\x3c!--[if IE]\x3e\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d5,IE\x3d9" \x3e\x3c![endif]--\x3e\n':"")+"\x3c!DOCTYPE html\x3e\n\x3chtml"+(null!=e?' xmlns\x3d"http://www.w3.org/1999/xhtml"\x3e':"\x3e")+"\n\x3chead\x3e\n"+(null==e?null!=c?"\x3ctitle\x3e"+mxUtils.htmlEntities(c)+
"\x3c/title\x3e\n":"":"\x3ctitle\x3eDraw.io Diagram\x3c/title\x3e\n")+(null!=e?'\x3cmeta http-equiv\x3d"refresh" content\x3d"0;URL\x3d\''+e+"'\"/\x3e\n":"")+"\x3c/head\x3e\n\x3cbody"+(null==e&&null!=g&&g!=mxConstants.NONE?' style\x3d"background-color:'+g+';"\x3e':"\x3e")+'\n\x3cdiv class\x3d"mxgraph" style\x3d"position:relative;overflow:auto;width:100%;"\x3e\n\x3cdiv style\x3d"width:1px;height:1px;overflow:hidden;"\x3e'+d+"\x3c/div\x3e\n\x3c/div\x3e\n"+(null==e?'\x3cscript type\x3d"text/javascript" src\x3d"'+
q+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+"\n\x3c/body\x3e\n\x3c/html\x3e\n"};EditorUi.prototype.getHtml2=function(a,b,c,d,e){d="https://www.draw.io/js/viewer.min.js";var f="";null!=b&&null==e&&(f=this.getBasenames().join(";"),0<f.length&&(d="https://www.draw.io/embed2.js?s\x3d"+f));null!=e&&(e=e.replace(/&/g,
@@ -2652,10 +2652,10 @@ q+'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;mar
'"\x3e\x3c/script\x3e':'\x3ca style\x3d"position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href\x3d"'+e+'" target\x3d"_blank"\x3e\x3cimg border\x3d"0" src\x3d"https://www.draw.io/images/drawlogo128.png"/\x3e\x3c/a\x3e')+"\n\x3c/body\x3e\n\x3c/html\x3e\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var b=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;a=null!=b?this.editor.extractGraphModel(b,
!0):null;null!=a&&(b=a);if(null!=b&&"mxfile"==b.nodeName&&(a=b.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=b;this.pages=[];for(b=0;b<a.length;b++){var c=new DiagramPage(a[b]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[b+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];b=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=
b&&(this.fileNode=b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(b);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||
-/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),q=g+"."+a;if("xml"==a){var t='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,t,"text/xml")}else if("html"==a)t=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(q,a,t,
-"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var u=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(u)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var y=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.addSvgShadow(y);
-this.convertImages(y,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",u=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else"xmlpng"==a&&(q=g+".png"),this.saveRequest(q,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;
-null!=f&&(this.editor.graph.pageVisible=f);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return g}catch(l){this.handleError(l)}}))}catch(z){this.handleError(z)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&
+/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,c,d,e,f){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var g=this.getBaseFilename(),q=g+"."+a;if("xml"==a){var s='\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n'+(b?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,e));this.saveData(q,a,s,"text/xml")}else if("html"==a)s=this.getHtml2(this.getFileData(!0),this.editor.graph,g),this.saveData(q,a,s,
+"text/html");else if(("svg"==a||"xmlsvg"==a)&&this.spinner.spin(document.body,mxResources.get("export"))){var t=null,v=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(t)}))});if("svg"==a){var x=this.editor.graph.background;x==mxConstants.NONE&&(x=null);var z=this.editor.graph.getSvg(x,null,null,null,null,d);c&&this.editor.addSvgShadow(z);
+this.convertImages(z,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();v('\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a))})))}else q=g+".svg",t=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();v(a)}),d)}else"xmlpng"==a&&(q=g+".png"),this.saveRequest(q,a,mxUtils.bind(this,function(b,c){try{var e=this.editor.graph.pageVisible;
+null!=f&&(this.editor.graph.pageVisible=f);var g=this.createDownloadRequest(b,a,d,c);this.editor.graph.pageVisible=e;return g}catch(l){this.handleError(l)}}))}catch(y){this.handleError(y)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=b);var f="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==b&&(e="1",b="png",null!=this.pages&&
null!=this.currentPage))for(var g=0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="\x26from\x3d"+g;break}return new mxXmlRequest(EXPORT_URL,"format\x3d"+b+f+"\x26base64\x3d"+d+"\x26embedXml\x3d"+e+"\x26xml\x3d"+encodeURIComponent(c)+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var b=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),
c.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.diagramContainer.style.visibility="hidden";this.formatContainer.style.visibility="hidden";this.hsplit.style.display="none";this.sidebarContainer.style.display="none";this.sidebarFooterContainer.style.display="none";this.editor.graph.setEnabled(!1);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&
(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{if(this.setCurrentFile(a),a.addListener("descriptorChanged",this.descriptorChangedListener),a.addListener("contentChanged",this.descriptorChangedListener),this.setMode(a.getMode()),this.descriptorChanged(),a.open(),this.diagramContainer.style.visibility="",this.formatContainer.style.visibility=
@@ -2667,21 +2667,21 @@ return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(
a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=
function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,f=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding=
"8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var f=b[d],g=f.data;if(null!=g){var g=this.convertDataUri(g),l="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;imageAspect\x3d0;";"fixed"==f.aspect&&(l+="aspect\x3dfixed;");c.appendChild(this.sidebar.createVertexTemplate(l+"image\x3d"+g,f.w,f.h,"",f.title||"",!1,!1,!1))}else null!=f.xml&&(g=this.stringToCells(this.editor.graph.decompress(f.xml)),
-0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=q.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var t=document.createElement("div");t.style.position="absolute";t.style.right=
-"0px";t.style.top="5px";!mxClient.IS_QUIRKS&&8!=document.documentMode&&(t.style.backgroundColor="inherit");q.style.position="relative";var u=document.createElement("img");u.setAttribute("src",Dialog.prototype.closeImage);u.setAttribute("title",mxResources.get("close"));u.setAttribute("align","top");u.setAttribute("border","0");u.className="geButton";u.style.marginRight="1px";u.style.marginTop="-1px";t.appendChild(u);var v=null;mxEvent.addListener(u,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
-mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,y=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),z=mxUtils.bind(this,function(c){a.constructor!=
-LocalLibrary&&a.isAutosave()?(null!=C&&null!=C.parentNode&&C.parentNode.removeChild(C),C=u.cloneNode(!1),C.setAttribute("src",Editor.spinImage),C.setAttribute("title",mxResources.get("saving")),C.style.cursor="default",C.style.marginRight="2px",C.style.marginTop="-2px",t.insertBefore(C,t.firstChild),q.style.paddingRight=18*t.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=C&&null!=C.parentNode&&(C.parentNode.removeChild(C),q.style.paddingRight=18*t.childNodes.length+
-"px")})):null==v&&(v=u.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),t.insertBefore(v,t.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=18*t.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*t.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,f){a=
-x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=x.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);z(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),E=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
-(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;A(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&
+0<g.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(g,f.w,f.h,f.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){f(b,a)}));this.repositionLibrary(d);var q=g.parentNode.previousSibling;c=q.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var s=document.createElement("div");s.style.position="absolute";s.style.right=
+"0px";s.style.top="5px";!mxClient.IS_QUIRKS&&8!=document.documentMode&&(s.style.backgroundColor="inherit");q.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align","top");t.setAttribute("border","0");t.className="geButton";t.style.marginRight="1px";t.style.marginTop="-1px";s.appendChild(t);var v=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=
+mxUtils.bind(this,function(){this.closeLibrary(a)});null!=v?this.confirm(mxResources.get("allChangesLost"),c):c();mxEvent.consume(b)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var x=this.editor.graph,z=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),y=mxUtils.bind(this,function(c){a.constructor!=
+LocalLibrary&&a.isAutosave()?(null!=D&&null!=D.parentNode&&D.parentNode.removeChild(D),D=t.cloneNode(!1),D.setAttribute("src",Editor.spinImage),D.setAttribute("title",mxResources.get("saving")),D.style.cursor="default",D.style.marginRight="2px",D.style.marginTop="-2px",s.insertBefore(D,s.firstChild),q.style.paddingRight=18*s.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=D&&null!=D.parentNode&&(D.parentNode.removeChild(D),q.style.paddingRight=18*s.childNodes.length+
+"px")})):null==v&&(v=t.cloneNode(!1),v.setAttribute("src",IMAGE_PATH+"/download.png"),v.setAttribute("title",mxResources.get("save")),s.insertBefore(v,s.firstChild),mxEvent.addListener(v,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0);v.parentNode.removeChild(v);v=null;q.style.paddingRight=18*s.childNodes.length+"px";mxEvent.consume(c)})),q.style.paddingRight=18*s.childNodes.length+"px")}),E=mxUtils.bind(this,function(a,c,d,f){a=
+x.cloneCells(x.model.getTopmostCells(a));for(var k=0;k<a.length;k++){var m=x.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,f||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=f&&(a.title=f);b.push(a);y(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),A=mxUtils.bind(this,function(a){if(x.isSelectionEmpty())x.getRubberband().isActive()?
+(x.getRubberband().execute(a),x.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=x.getSelectionCells(),c=x.view.getBounds(b),d=x.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=x.view.translate.x;c.y-=x.view.translate.y;E(b,c)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler.shape&&
(x.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",g.style.cursor="copy",x.panningManager.stop(),x.autoScroll=!1,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!1),null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.panningManager&&null!=x.graphHandler&&(g.style.border="3px solid transparent",
-null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,E(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
+null!=e&&(e.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,x.panningManager.stop(),x.graphHandler.reset(),x.isMouseDown=!1,x.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){x.isMouseDown&&null!=x.graphHandler.shape&&(x.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",x.autoScroll=!0,null!=x.graphHandler.guide&&x.graphHandler.guide.setVisible(!0),
null!=x.graphHandler.hint&&(x.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border=
-"3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,t){if(null!=c&&"image/"==d.substring(0,6)){var u="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),u=[new mxCell("",new mxGeometry(0,0,n,q),u)];u[0].vertex=!0;A(u,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?
-null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," "))}else{t=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);z(a);this.spinner.stop();t=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),u=this.stringToCells(this.editor.graph.decompress(v)),A(u,new mxRectangle(0,0,n,q),a),t=!0}catch(y){}t||
-(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));u=u.cloneNode(!1);u.setAttribute("src",IMAGE_PATH+"/edit.gif");u.setAttribute("title",mxResources.get("edit"));
-t.insertBefore(u,t.firstChild);mxEvent.addListener(u,"click",y);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&y(a)});u=u.cloneNode(!1);u.setAttribute("src",Editor.plusImage);u.setAttribute("title",mxResources.get("add"));t.insertBefore(u,t.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
-mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),t.insertBefore(c,t.firstChild));var C=null;mxEvent.addListener(u,"click",E)}q.appendChild(t);q.style.paddingRight=18*t.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+"3px solid transparent";g.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,q,s){if(null!=c&&"image/"==d.substring(0,6)){var t="shape\x3dimage;verticalLabelPosition\x3dbottom;verticalAlign\x3dtop;aspect\x3dfixed;image\x3d"+this.convertDataUri(c),t=[new mxCell("",new mxGeometry(0,0,n,q),t)];t[0].vertex=!0;E(t,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?
+null:s.substring(0,s.lastIndexOf(".")).replace(/_/g," "))}else{s=!1;if(null!=c&&"text/xml"==d)if(c=mxUtils.parseXml(c),"mxlibrary"==c.documentElement.nodeName)try{var v=JSON.parse(mxUtils.getTextContent(c.documentElement));f(v,g);b=b.concat(v);y(a);this.spinner.stop();s=!0}catch(x){}else if("mxfile"==c.documentElement.nodeName)try{v=mxUtils.getTextContent(c.documentElement.getElementsByTagName("diagram")[0]),t=this.stringToCells(this.editor.graph.decompress(v)),E(t,new mxRectangle(0,0,n,q),a),s=!0}catch(z){}s||
+(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}))}null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));
+s.insertBefore(t,s.firstChild);mxEvent.addListener(t,"click",z);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&z(a)});t=t.cloneNode(!1);t.setAttribute("src",Editor.plusImage);t.setAttribute("title",mxResources.get("add"));s.insertBefore(t,s.firstChild);!this.isOffline()&&".scratchpad"==a.title&&(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,
+mxUtils.bind(this,function(a){window.open("https://support.draw.io/questions/10420280");mxEvent.consume(a)})),s.insertBefore(c,s.firstChild));var D=null;mxEvent.addListener(t,"click",A)}q.appendChild(s);q.style.paddingRight=18*s.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
"rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=740>=screen.height?5:46,EditorUi.prototype.createFooter=
function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});
EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,e){a=new ImageDialog(this,a,b,c,d,e);this.showDialog(a.container,Graph.fileSupport?420:340,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.setBackgroundImage(a)});var b=new BackgroundImageDialog(this,
@@ -2695,105 +2695,105 @@ EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64
c.getTitle():this.defaultFilename,d=c.lastIndexOf(".");0<d&&(c=c.substring(0,d));c+=".png";d=this.createPngDataUri(a,b);this.saveData(c,"png",d.substring(d.lastIndexOf(",")+1),"image/png",!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=
function(a,b,c,d,e){if(window.MSBlobBuilder&&navigator.msSaveOrOpenBlob)d=new MSBlobBuilder,d.append(a),a=d.getBlob(c),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,
620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var f=document.createElement("a");if("undefined"!==typeof f.download||this.isOffline()){f.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));"undefined"!==typeof f.download?f.download=b:f.setAttribute("target","_blank");document.body.appendChild(f);try{f.click(),window.setTimeout(function(){URL.revokeObjectURL(f.href)},0),f.parentNode.removeChild(f)}catch(g){}}else this.createEchoRequest(a,b,c,d,e).simulate(document,
-"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?"\x26binary\x3d1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,t=Math.min(q+1024,d),u=Array(t-q),v=0;q<t;++v,
-++q)u[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(u)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG))if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+
+"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,e,f){a="xml\x3d"+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"\x26mime\x3d"+c:"")+(null!=e?"\x26format\x3d"+e:"")+(null!=f?"\x26base64\x3d"+f:"")+(null!=b?"\x26filename\x3d"+encodeURIComponent(b):"")+(d?"\x26binary\x3d1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),g=0;g<e;++g){for(var q=1024*g,s=Math.min(q+1024,d),t=Array(s-q),v=0;q<s;++v,
+++q)t[v]=c[q].charCodeAt(0);f[g]=new Uint8Array(t)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,e){e=!mxClient.IS_IOS||!navigator.standalone;b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null!=c&&"image/"==c.substring(0,6)&&("image/svg"!=c.substring(0,9)||mxClient.IS_SVG))if(mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write('\x3chtml\x3e\x3cimg src\x3d"data:'+
c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))+'"/\x3e\x3c/html\x3e'),f.document.close())}else f=window.open("data:"+c+(d?";base64,"+a:";charset\x3dutf8,"+encodeURIComponent(a))),null==f&&mxUtils.popup(a,!0);else f=window.open("about:blank"),null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close());else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){this.exportFile(a,b,c,d,e,f)}))}catch(g){this.handleError(g)}}),
mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4);this.showDialog(b.container,380,5>this.getServiceCount(!1)-1?270:390,!0,!0);b.init()};EditorUi.prototype.saveData=function(a,b,c,d,e){this.isLocalFileSave()?this.saveLocalFile(c,a,d,e,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,f){return this.createEchoRequest(c,a,d,e,b,f)}))};EditorUi.prototype.saveRequest=function(a,b,c){var d=!mxClient.IS_IOS||!navigator.standalone;
a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var e=c("_blank"==d?null:a,d==App.MODE_DEVICE||null==d||"_blank"==d?"0":"1");null!=e&&(d==App.MODE_DEVICE||"_blank"==d?e.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){this.spinner.spin(document.body,mxResources.get("saving"))&&e.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=e.getStatus()&&299>=e.getStatus())try{var f="pdf"==b?"application/pdf":"image/"+b;this.exportFile(e.getText(),
a,f,!0,d,c)}catch(g){this.handleError(g)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,d);this.showDialog(a.container,380,4>this.getServiceCount(!1)-1?270:390,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,e,f){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=
-function(a,b,c,d,e,f,g){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var t=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(t);a=this.getCurrentFile();var u=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=u.lastIndexOf(".");0<a&&(u=u.substring(0,a));var u=u+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();
-e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,t,!1,mxUtils.bind(this,function(){f?
-(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(t,v,this.thumbImageCache)):v(t)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a){function b(){f.innerHTML=
+function(a,b,c,d,e,f,g){if(this.spinner.spin(document.body,mxResources.get("export"))){var q=this.editor.graph.isSelectionEmpty();c=null!=c?c:q;q=b?null:this.editor.graph.background;q==mxConstants.NONE&&(q=null);null==q&&!1==b&&(q="#ffffff");var s=this.editor.graph.getSvg(q,a,null,g,null,c);d&&this.editor.addSvgShadow(s);a=this.getCurrentFile();var t=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename;a=t.lastIndexOf(".");0<a&&(t=t.substring(0,a));var t=t+".svg",v=mxUtils.bind(this,function(a){this.spinner.stop();
+e&&a.setAttribute("content",this.getFileData(!0,null,null,null,c));var b='\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(t,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,s,!1,mxUtils.bind(this,function(){f?
+(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(s,v,this.thumbImageCache)):v(s)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,e){var f=document.createElement("input");f.style.marginRight="8px";f.style.marginTop="16px";f.setAttribute("type","checkbox");c&&(f.setAttribute("checked","checked"),f.defaultChecked=!0);d&&f.setAttribute("disabled","disabled");a.appendChild(f);mxUtils.write(a,b);e||mxUtils.br(a);return f};EditorUi.prototype.addLinkSection=function(a){function b(){f.innerHTML=
'\x3cdiv style\x3d"width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"\x3e\x3c/div\x3e'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="4px";c.style.marginRight="10px";c.className="geBtn";var d=document.createElement("option");
d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));c.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));c.appendChild(d);a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",f=null,f=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||
-"none",function(a){e=a;b()});mxEvent.consume(a)}));b();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var t=
-this.getCurrentFile(),u=[];d&&(u.push("chrome\x3d0"),u.push("lightbox\x3d1"),"auto"!=a&&u.push("target\x3d"+a),null!=b&&b!=mxConstants.NONE&&u.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&u.push("edit\x3d_blank"),f&&u.push("layers\x3d1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&u.push("page\x3d"+a);break}a="";b=!0;null!=g?a="#U"+encodeURIComponent(g):(t=this.getCurrentFile(),!q&&null!=t&&t.constructor==
-DriveFile?(a="#"+t.getHash(),b=!1):a="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));b&&null!=t&&null!=t.getTitle()&&u.push("title\x3d"+encodeURIComponent(t.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<u.length?"?"+u.join("\x26"):"")+a};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,q,t,u,v){var x=this.getBasenames(),y={};""!=e&&e!=mxConstants.NONE&&
-(y.highlight=e);"auto"!==d&&(y.target=d);t||(y.lightbox=!1);y.nav=this.editor.graph.foldingEnabled;c=parseInt(c);!isNaN(c)&&100!=c&&(y.zoom=c/100);c=[];g&&(c.push("pages"),y.resize=!0,null!=this.pages&&null!=this.currentPage&&(y.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),y.resize=!0);q&&c.push("layers");0<c.length&&(t&&c.push("lightbox"),y.toolbar=c.join(" "));u&&(y.edit=null!=a?a:"_blank");null!=a?y.url=a:y.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+
-(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(y))+'"\x3e\x3c/div\x3e';x=0<x.length?"s\x3d"+x.join(";"):"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";v(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<x.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+x:"https://www.draw.io/embed2.js?"+x)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
+"none",function(a){e=a;b()});mxEvent.consume(a)}));b();f.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";f.style.marginLeft="4px";f.style.height="22px";f.style.width="22px";f.style.position="relative";f.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";f.className="geColorBtn";a.appendChild(f);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,e,f,g,q){var s=
+this.getCurrentFile(),t=[];d&&(t.push("chrome\x3d0"),t.push("lightbox\x3d1"),"auto"!=a&&t.push("target\x3d"+a),null!=b&&b!=mxConstants.NONE&&t.push("highlight\x3d"+("#"==b.charAt(0)?b.substring(1):b)),e&&t.push("edit\x3d_blank"),f&&t.push("layers\x3d1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&t.push("page\x3d"+a);break}a="";b=!0;null!=g?a="#U"+encodeURIComponent(g):(s=this.getCurrentFile(),!q&&null!=s&&s.constructor==
+DriveFile?(a="#"+s.getHash(),b=!1):a="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))));b&&null!=s&&null!=s.getTitle()&&t.push("title\x3d"+encodeURIComponent(s.getTitle()));return(mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+(0<t.length?"?"+t.join("\x26"):"")+a};EditorUi.prototype.createHtml=function(a,b,c,d,e,f,g,q,s,t,v){var x=this.getBasenames(),z={};""!=e&&e!=mxConstants.NONE&&
+(z.highlight=e);"auto"!==d&&(z.target=d);s||(z.lightbox=!1);z.nav=this.editor.graph.foldingEnabled;c=parseInt(c);!isNaN(c)&&100!=c&&(z.zoom=c/100);c=[];g&&(c.push("pages"),z.resize=!0,null!=this.pages&&null!=this.currentPage&&(z.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),z.resize=!0);q&&c.push("layers");0<c.length&&(s&&c.push("lightbox"),z.toolbar=c.join(" "));t&&(z.edit=null!=a?a:"_blank");null!=a?z.url=a:z.xml=this.getFileData(!0,null,null,null,null,!g);b='\x3cdiv class\x3d"mxgraph" style\x3d"'+
+(f?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph\x3d"'+mxUtils.htmlEntities(JSON.stringify(z))+'"\x3e\x3c/div\x3e';x=0<x.length?"s\x3d"+x.join(";"):"";a=null!=a?"fetch\x3d"+encodeURIComponent(a):"";v(b,'\x3cscript type\x3d"text/javascript" src\x3d"'+(0<x.length||0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev\x3d1\x26"+x:"https://www.draw.io/embed2.js?"+x)+"\x26"+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+
'"\x3e\x3c/script\x3e')};EditorUi.prototype.showGitHubDialog=function(a,b,c){if(null==this.gitHubDialog){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("github"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(e);var e=document.createElement("table"),f=document.createElement("tbody");e.style.marginBottom="16px";var g=mxUtils.bind(this,function(a,b,c){var d=document.createElement("tr"),
-e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),A())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=null,t=null,
-u=this.getCurrentFile();null!=u&&u.constructor==GitHubFile&&null!=u.meta.drawio&&(q=u.meta.drawio.org,t=u.meta.drawio.repo);var v=g(mxResources.get("organisation")+":","org",q),x=g(mxResources.get("repository")+":","repo",t),y=g(),z=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var A=mxUtils.bind(this,function(){var b=y.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=z.value;""==c&&(c="master");this.gitHubDialog.fn(v.value,
-x.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,A);this.gitHubDialog.init=function(a,b,c){var d=y.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));y.setAttribute("placeholder",b?"folder/filename.ext":"root");y.value=c||"";v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};
-EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";
-q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var t=document.createElement("span");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(t);mxUtils.br(g);g.appendChild(q);t=document.createElement("span");mxUtils.write(t,mxResources.get("publicDiagramUrl"));g.appendChild(t);var u=this.getCurrentFile();null==c&&null!=u&&u.constructor==DriveFile&&(t=document.createElement("a"),
-t.style.paddingLeft="12px",t.style.color="gray",t.setAttribute("href","javascript:void(0);"),mxUtils.write(t,mxResources.get("share")),g.appendChild(t),mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(u.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var v=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var y=document.createElement("input");
-y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value="100%";e.appendChild(y);var z=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,A=A=this.addCheckbox(e,mxResources.get("allPages"),g,!g),E=this.addCheckbox(e,mxResources.get("layers"),!0),C=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addCheckbox(e,mxResources.get("showEditButton"),!0);D.style.marginLeft="24px";D.style.marginBottom=
-"16px";mxEvent.addListener(C,"change",function(){C.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(q.checked?c:null,x.checked,y.value,v.getTarget(),v.getColor(),z.checked,A.checked,E.checked,C.checked,D.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");
-mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(g);var q=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",t=document.createElement("div");
-t.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var u=document.createElement("div");u.style.whiteSpace="normal";mxUtils.write(u,mxResources.get("linkAccountRequired"));t.appendChild(u);u=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));u.style.marginTop="12px";u.className="geBtn";t.appendChild(u);f.appendChild(t);u=document.createElement("a");u.style.paddingLeft=
-"12px";u.style.color="gray";u.style.fontSize="11px";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("check"));t.appendChild(u);mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
+e=document.createElement("td");e.style.padding="4px";var g=e.cloneNode(!0);mxUtils.write(e,a||"");a=document.createElement("input");a.setAttribute("type","text");a.style.width="230px";a.style.marginLeft="4px";a.value=c||"";g.appendChild(a);null!=b&&a.setAttribute("placeholder",b);mxEvent.addListener(a,"keypress",mxUtils.bind(this,function(a){13==a.keyCode&&!mxEvent.isConsumed(a)&&(mxEvent.consume(a),this.hideDialog(),x())}));d.appendChild(e);d.appendChild(g);f.appendChild(d);return a}),q=g(mxResources.get("organisation")+
+":","org"),s=g(mxResources.get("repository")+":","repo"),t=g(),v=g(mxResources.get("ref")+":","master");e.appendChild(f);d.appendChild(e);var x=mxUtils.bind(this,function(){var b=t.value;"/"==b.charAt(0)&&(b=b.substring(1));!a&&"/"==b.charAt(b.length)&&(b=b.substring(0,b.length-1));var c=v.value;""==c&&(c="master");this.gitHubDialog.fn(q.value,s.value,c,b)});this.gitHubDialog=new CustomDialog(this,d,x);var z=this;this.gitHubDialog.init=function(a,b,c){var d=z.getCurrentFile();null!=d&&d.constructor==
+GitHubFile&&(""==q.value&&(q.value=d.meta.org||""),""==s.value&&(s.value=d.meta.repo||""));d=t.parentNode.previousSibling;d.innerHTML="";mxUtils.write(d,mxResources.get(b?"path":"folder"));t.setAttribute("placeholder",b?"folder/filename.ext":"root");t.value=c||"";q.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null);this.fn=a}}this.showDialog(this.gitHubDialog.container,340,200,!0,!0);this.gitHubDialog.init(b,a,c)};EditorUi.prototype.showHtmlDialog=
+function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";q.setAttribute("value",
+"url");q.setAttribute("type","radio");q.setAttribute("name","type-embedhtmldialog");f=q.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var s=document.createElement("span");mxUtils.write(s,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(s);mxUtils.br(g);g.appendChild(q);s=document.createElement("span");mxUtils.write(s,mxResources.get("publicDiagramUrl"));g.appendChild(s);var t=this.getCurrentFile();null==c&&null!=t&&t.constructor==DriveFile&&(s=document.createElement("a"),s.style.paddingLeft=
+"12px",s.style.color="gray",s.setAttribute("href","javascript:void(0);"),mxUtils.write(s,mxResources.get("share")),g.appendChild(s),mxEvent.addListener(s,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(t.getId())})));f.setAttribute("checked","checked");null==c&&q.setAttribute("disabled","disabled");e.appendChild(g);var v=this.addLinkSection(e),x=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var z=document.createElement("input");z.setAttribute("type",
+"text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.style.marginRight="12px";z.value="100%";e.appendChild(z);var y=this.addCheckbox(e,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,E=E=this.addCheckbox(e,mxResources.get("allPages"),g,!g),A=this.addCheckbox(e,mxResources.get("layers"),!0),D=this.addCheckbox(e,mxResources.get("lightbox"),!0),C=this.addCheckbox(e,mxResources.get("showEditButton"),!0);C.style.marginLeft="24px";C.style.marginBottom="16px";
+mxEvent.addListener(D,"change",function(){D.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(q.checked?c:null,x.checked,z.value,v.getTarget(),v.getColor(),y.checked,E.checked,A.checked,D.checked,C.checked)}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,a||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(g);var q=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941-how-to-publicly-publish-a-copy-of-your-draw-io-diagram";a=0;if(null!=q&&q.constructor==DriveFile&&!b){a=80;var g="https://desk.draw.io/support/solutions/articles/16000039384-how-to-publicly-publish-a-copy-of-your-draw-io-diagram-stored-in-google-drive",s=document.createElement("div");
+s.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));s.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(q.getId())}));t.style.marginTop="12px";t.className="geBtn";s.appendChild(t);f.appendChild(s);t=document.createElement("a");t.style.paddingLeft=
+"12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));s.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,
300,80,!0,!1);a.init()}))}))}var v=null,x=null;if(null!=c||null!=d)a+=30,mxUtils.write(f,mxResources.get("width")+":"),v=document.createElement("input"),v.setAttribute("type","text"),v.style.marginRight="16px",v.style.width="50px",v.style.marginLeft="6px",v.style.marginRight="16px",v.style.marginBottom="10px",v.value="100%",f.appendChild(v),mxUtils.write(f,mxResources.get("height")+":"),x=document.createElement("input"),x.setAttribute("type","text"),x.style.width="50px",x.style.marginLeft="6px",x.style.marginBottom=
-"10px",x.value=d+"px",f.appendChild(x),mxUtils.br(f);var y=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var z=null;if(null==q||q.constructor!=DriveFile||b)z=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var A=this.addCheckbox(f,mxResources.get("lightbox"),!0),E=this.addCheckbox(f,mxResources.get("showEditButton"),!0);E.style.marginLeft="24px";var C=this.addCheckbox(f,mxResources.get("layers"),!0);C.style.marginLeft=E.style.marginLeft;C.style.marginBottom="16px";mxEvent.addListener(A,
-"change",function(){A.checked?(C.removeAttribute("disabled"),E.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(y.getTarget(),y.getColor(),null==z?!0:z.checked,A.checked,E.checked,C.checked,null!=v?v.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=v?(v.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
-v.select():document.execCommand("selectAll",!1,null)):y.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
-!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var q=this.editor.graph,t=246,u=document.createElement("h3");mxUtils.write(u,a);u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(u);mxUtils.write(g,mxResources.get("zoom")+
-":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";g.appendChild(v);mxUtils.br(g);var x=this.addCheckbox(g,mxResources.get("transparentBackground"),q.background==mxConstants.NONE||null==q.background),y=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";
-z.setAttribute("type","checkbox");f&&(g.appendChild(z),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),t+=26);q.isSelectionEmpty()?z.setAttribute("disabled","disabled"):(z.setAttribute("checked","checked"),z.defaultChecked=!0);var A=this.addCheckbox(g,mxResources.get("shadow"),q.shadowVisible),E=document.createElement("input");E.style.marginTop="16px";E.style.marginRight="8px";E.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&E.setAttribute("disabled","disabled");
-b&&(g.appendChild(E),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),t+=26);var C=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);C.style.marginBottom="16px";a=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.value,x.checked,!y.checked,A.checked,C.checked,E.checked,z.checked)}),null,c,d);this.showDialog(a.container,320,t,!0,!0);v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
-function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(q)}var t=this.addCheckbox(f,mxResources.get("fit"),!0),u=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),x=this.addCheckbox(f,mxResources.get("lightbox"),!0),y=this.addCheckbox(f,mxResources.get("showEditButton"),
-!0);y.style.marginLeft="24px";var z=1<g.model.getChildCount(g.model.getRoot()),A=this.addCheckbox(f,mxResources.get("layers"),z,!z);A.style.marginLeft=y.style.marginLeft;A.style.marginBottom="12px";mxEvent.addListener(x,"change",function(){x.checked?(z&&A.removeAttribute("disabled"),y.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(t.checked,u.checked,v.checked,x.checked,y.checked,
-A.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,q){function t(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");var t="";c&&(t=' width\x3d"'+Math.round(u.width)+'" height\x3d"'+Math.round(u.height)+'"');g('\x3cimg src\x3d"'+b+'"'+t+(""!=q?' style\x3d"'+q+'"':"")+l+"/\x3e")}var u=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);t(a)}),null,null,null,mxUtils.bind(this,
-function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),u.width*u.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var v="";c&&(v="\x26w\x3d"+Math.round(2*u.width)+"\x26h\x3d"+Math.round(2*u.height));var x=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));x.send(mxUtils.bind(this,function(){200<=x.getStatus()&&299>=x.getStatus()?t("data:image/png;base64,"+x.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),t=q.getElementsByTagName("a");if(null!=t)for(var u=0;u<t.length;u++){var v=t[u].getAttribute("href");null!=v&&"#"==v.charAt(0)&&"_blank"==t[u].getAttribute("target")&&t[u].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var x=" ",y="";d&&(x="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",y+="cursor:pointer;");a&&(y+="max-width:100%;");this.convertImages(q,function(a){g('\x3cimg src\x3d"'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=y?' style\x3d"'+y+'"':"")+x+"/\x3e")})}else y="",d&&(q.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
-(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}}})(this);"),y+="cursor:pointer;"),a&&(a=parseInt(q.getAttribute("width")),b=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+a+" "+b),y+="max-width:100%;max-height:"+b+"px;",q.removeAttribute("height")),""!=y&&q.setAttribute("style",y),g(mxUtils.getXml(q))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);
+"10px",x.value=d+"px",f.appendChild(x),mxUtils.br(f);var z=this.addLinkSection(f);c=null!=this.pages&&1<this.pages.length;var y=null;if(null==q||q.constructor!=DriveFile||b)y=this.addCheckbox(f,mxResources.get("allPages"),c,!c);var E=this.addCheckbox(f,mxResources.get("lightbox"),!0),A=this.addCheckbox(f,mxResources.get("showEditButton"),!0);A.style.marginLeft="24px";var D=this.addCheckbox(f,mxResources.get("layers"),!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";mxEvent.addListener(E,
+"change",function(){E.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){e(z.getTarget(),z.getColor(),null==y?!0:y.checked,E.checked,A.checked,D.checked,null!=v?v.value:null,null!=x?x.value:null)}),null,mxResources.get("create"),g);this.showDialog(b.container,340,246+a,!0,!0);null!=v?(v.focus(),mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+v.select():document.execCommand("selectAll",!1,null)):z.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c){var d=document.createElement("div");d.style.whiteSpace="nowrap";var e=document.createElement("h3");mxUtils.write(e,mxResources.get("image"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(e);var f=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),
+!0);g.style.marginBottom="16px";a=new CustomDialog(this,d,mxUtils.bind(this,function(){c(!f.checked,g.checked)}),null,a,b);this.showDialog(a.container,300,146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,e,f){var g=document.createElement("div");g.style.whiteSpace="nowrap";var q=this.editor.graph,s=246,t=document.createElement("h3");mxUtils.write(t,a);t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";g.appendChild(t);mxUtils.write(g,mxResources.get("zoom")+
+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.marginRight="16px";v.style.width="60px";v.style.marginLeft="4px";v.style.marginRight="12px";v.value="100%";g.appendChild(v);mxUtils.br(g);var x=this.addCheckbox(g,mxResources.get("transparentBackground"),q.background==mxConstants.NONE||null==q.background),z=this.addCheckbox(g,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";
+y.setAttribute("type","checkbox");f&&(g.appendChild(y),mxUtils.write(g,mxResources.get("crop")),mxUtils.br(g),s+=26);q.isSelectionEmpty()?y.setAttribute("disabled","disabled"):(y.setAttribute("checked","checked"),y.defaultChecked=!0);var E=this.addCheckbox(g,mxResources.get("shadow"),q.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");(this.isOffline()||!this.canvasSupported)&&A.setAttribute("disabled","disabled");
+b&&(g.appendChild(A),mxUtils.write(g,mxResources.get("embedImages")),mxUtils.br(g),s+=26);var D=this.addCheckbox(g,mxResources.get("includeCopyOfMyDiagram"),!0);D.style.marginBottom="16px";a=new CustomDialog(this,g,mxUtils.bind(this,function(){e(v.value,x.checked,!z.checked,E.checked,D.checked,A.checked,y.checked)}),null,c,d);this.showDialog(a.container,320,s,!0,!0);v.focus();mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=
+function(a,b,c,d,e){var f=document.createElement("div");f.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=b){var q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";f.appendChild(q)}var s=this.addCheckbox(f,mxResources.get("fit"),!0),t=this.addCheckbox(f,mxResources.get("shadow"),g.shadowVisible&&d,!d),v=this.addCheckbox(f,c),x=this.addCheckbox(f,mxResources.get("lightbox"),!0),z=this.addCheckbox(f,mxResources.get("showEditButton"),
+!0);z.style.marginLeft="24px";var y=1<g.model.getChildCount(g.model.getRoot()),E=this.addCheckbox(f,mxResources.get("layers"),y,!y);E.style.marginLeft=z.style.marginLeft;E.style.marginBottom="12px";mxEvent.addListener(x,"change",function(){x.checked?(y&&E.removeAttribute("disabled"),z.removeAttribute("disabled")):(E.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"))});b=new CustomDialog(this,f,mxUtils.bind(this,function(){a(s.checked,t.checked,v.checked,x.checked,z.checked,
+E.checked)}),null,mxResources.get("embed"),e);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,e,f,g,q){function s(b){var l=" ",q="";d&&(l=" onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",q+="cursor:pointer;");a&&(q+="max-width:100%;");var s="";c&&(s=' width\x3d"'+Math.round(t.width)+'" height\x3d"'+Math.round(t.height)+'"');g('\x3cimg src\x3d"'+b+'"'+s+(""!=q?' style\x3d"'+q+'"':"")+l+"/\x3e")}var t=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createPngDataUri(a,b);s(a)}),null,null,null,mxUtils.bind(this,
+function(a){q({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),t.width*t.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var v="";c&&(v="\x26w\x3d"+Math.round(2*t.width)+"\x26h\x3d"+Math.round(2*t.height));var x=new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26base64\x3d1\x26embedXml\x3d"+(d?"1":"0")+v+"\x26xml\x3d"+encodeURIComponent(b));x.send(mxUtils.bind(this,function(){200<=x.getStatus()&&299>=x.getStatus()?s("data:image/png;base64,"+x.getText()):q({message:mxResources.get("unknownError")})}))}else q({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,d,e,f,g){var q=this.editor.graph.getSvg(),s=q.getElementsByTagName("a");if(null!=s)for(var t=0;t<s.length;t++){var v=s[t].getAttribute("href");null!=v&&"#"==v.charAt(0)&&"_blank"==s[t].getAttribute("target")&&s[t].removeAttribute("target")}d&&q.setAttribute("content",this.getFileData(!0));b&&this.editor.addSvgShadow(q);if(c){var x=" ",z="";d&&(x="onclick\x3d\"(function(img){if(img.wnd!\x3dnull\x26\x26!img.wnd.closed){img.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dimg.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}})(this);\"",z+="cursor:pointer;");a&&(z+="max-width:100%;");this.convertImages(q,function(a){g('\x3cimg src\x3d"'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=z?' style\x3d"'+z+'"':"")+x+"/\x3e")})}else z="",d&&(q.setAttribute("onclick","(function(svg){var src\x3dwindow.event.target||window.event.srcElement;while (src!\x3dnull\x26\x26src.nodeName.toLowerCase()!\x3d'a'){src\x3dsrc.parentNode;}if(src\x3d\x3dnull){if(svg.wnd!\x3dnull\x26\x26!svg.wnd.closed){svg.wnd.focus();}else{var r\x3dfunction(evt){if(evt.data\x3d\x3d'ready'\x26\x26evt.source\x3d\x3dsvg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd\x3dwindow.open('https://www.draw.io/?client\x3d1\x26lightbox\x3d1\x26chrome\x3d0"+
+(e?"\x26edit\x3d_blank":"")+(f?"\x26layers\x3d1":"")+"');}}})(this);"),z+="cursor:pointer;"),a&&(a=parseInt(q.getAttribute("width")),b=parseInt(q.getAttribute("height")),q.setAttribute("viewBox","0 0 "+a+" "+b),z+="max-width:100%;max-height:"+b+"px;",q.removeAttribute("height")),""!=z&&q.setAttribute("style",z),g(mxUtils.getXml(q))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);
if(1<b)return b+" "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,d,e,f,g){g=null;null!=b&&(g=b.background,g==mxConstants.NONE&&(g=null));b=b.getSvg(g,null,null,null,null,f);null!=
a&&b.setAttribute("content",encodeURIComponent(a));null!=c&&b.setAttribute("resource",c);if(null!=e)this.convertImages(b,mxUtils.bind(this,function(a){e((!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':"")+mxUtils.getXml(a))}));else return(!d?'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e\n\x3c!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"\x3e\n':
"")+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,e,f){if(this.spinner.spin(document.body,mxResources.get("exporting"))){var g=this.editor.graph.isSelectionEmpty();c=null!=c?c:g;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,e?this.getFileData(!0,null,null,null,c):null)}catch(b){"Invalid image"==b.message?this.downloadFile("png"):this.handleError(b)}}),null,this.thumbImageCache,
-null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,null,f)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,t,u,v,x,y,z){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;y=null!=y?y:0;var A=t?null:x.background;A==mxConstants.NONE&&(A=null);null==A&&(A=d);null==A&&!1==t&&(A="#ffffff");this.convertImages(x.getSvg(A,null,null,z,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;
-d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));g=Math.ceil(q*g)+2*y;m=Math.ceil(q*m)+2*y;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.getContext("2d");null!=A&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=A,n.fill());n.scale(q,q);n.drawImage(d,y/q,y/q);a(e)});d.onerror=function(a){null!=e&&e(a)};try{u&&this.editor.addSvgShadow(c),
+null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,null,f)}catch(q){this.spinner.stop(),this.handleError(q)}}};EditorUi.prototype.exportToCanvas=function(a,b,c,d,e,f,g,q,s,t,v,x,z,y){f=null!=f?f:!0;x=null!=x?x:this.editor.graph;z=null!=z?z:0;var E=s?null:x.background;E==mxConstants.NONE&&(E=null);null==E&&(E=d);null==E&&!1==s&&(E="#ffffff");this.convertImages(x.getSvg(E,null,null,y,null,null!=g?g:!0),mxUtils.bind(this,function(c){var d=new Image;
+d.onload=mxUtils.bind(this,function(){var e=document.createElement("canvas"),g=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));q=null!=q?q:1;null!=b&&(q=!f?b/g:Math.min(1,Math.min(3*b/(4*m),b/g)));g=Math.ceil(q*g)+2*z;m=Math.ceil(q*m)+2*z;e.setAttribute("width",g);e.setAttribute("height",m);var n=e.getContext("2d");null!=E&&(n.beginPath(),n.rect(0,0,g,m),n.fillStyle=E,n.fill());n.scale(q,q);n.drawImage(d,z/q,z/q);a(e)});d.onerror=function(a){null!=e&&e(a)};try{t&&this.editor.addSvgShadow(c),
this.convertMath(x,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))}catch(g){null!=e&&e(g)}}),c,v)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&(("http://"==c.substring(0,7)||"https://"==c.substring(0,8))&&c.substring(0,a.baseUrl.length)!=a.baseUrl?c=PROXY_URL+"?url\x3d"+encodeURIComponent(c):"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)));return c};
-return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),u=0;u<m.length;u++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var s=f[m];null==s?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,s)}})(m[u])});c("image","xlink:href");c("img","src");
+return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var m=a.getElementsByTagName(c),t=0;t<m.length;t++)mxUtils.bind(this,function(c){var m=d.convert(c.getAttribute(g));if(null!=m&&"data:"!=m.substring(0,5)){var u=f[m];null==u?(e++,this.convertImageToDataUri(m,function(d){null!=d&&(f[m]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,u)}})(m[t])});c("image","xlink:href");c("img","src");
0==e&&b(a)};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https://raw.githubusercontent.com/"===a.substring(0,34)||/^https:\/\/.*\.github\.io\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};
-c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),t=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=t&&"mxfile"==t.nodeName&&null!=this.pages){var u=t.getElementsByTagName("diagram");if(1==u.length)t=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(u[0]))).documentElement;else if(1<u.length){g.model.beginUpdate();try{for(var v=
-0;v<u.length;v++){var x=this.updatePageRoot(new DiagramPage(u[v])),y=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[y+1]));g.model.execute(new ChangePage(this,x,x,y))}}finally{g.model.endUpdate()}}}if(null!=t&&"mxGraphModel"===t.nodeName){var z=new mxGraphModel;(new mxCodec(t.ownerDocument)).decode(t,z);var A=z.getChildCount(z.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<A;v++){var E=z.getChildAt(z.getRoot(),v);if(1==
-A&&!g.isCellLocked(g.getDefaultParent()))var C=z.getChildren(E),f=f.concat(g.importCells(C,b,c,g.getDefaultParent(),null,a));else E=g.importCells([E],0,0,g.model.getRoot(),null,a)[0],C=g.model.getChildren(E),g.moveCells(C,b,c),f=f.concat(C)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(f,!0);null!=D&&g.moveCells(f,b-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return f};EditorUi.prototype.insertLucidChart=
+c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,e){b=null!=b?b:0;c=null!=c?c:0;var f=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var q=mxUtils.parseXml(a),s=this.editor.extractGraphModel(q.documentElement,null!=this.pages);if(null!=s&&"mxfile"==s.nodeName&&null!=this.pages){var t=s.getElementsByTagName("diagram");if(1==t.length)s=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(t[0]))).documentElement;else if(1<t.length){g.model.beginUpdate();try{for(var v=
+0;v<t.length;v++){var x=this.updatePageRoot(new DiagramPage(t[v])),z=this.pages.length;null==x.getName()&&x.setName(mxResources.get("pageWithNumber",[z+1]));g.model.execute(new ChangePage(this,x,x,z))}}finally{g.model.endUpdate()}}}if(null!=s&&"mxGraphModel"===s.nodeName){var y=new mxGraphModel;(new mxCodec(s.ownerDocument)).decode(s,y);var E=y.getChildCount(y.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(v=0;v<E;v++){var A=y.getChildAt(y.getRoot(),v);if(1==
+E&&!g.isCellLocked(g.getDefaultParent()))var D=y.getChildren(A),f=f.concat(g.importCells(D,b,c,g.getDefaultParent(),null,a));else A=g.importCells([A],0,0,g.model.getRoot(),null,a)[0],D=g.model.getChildren(A),g.moveCells(D,b,c),f=f.concat(D)}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var C=g.getBoundingBoxFromGeometry(f,!0);null!=C&&g.moveCells(f,b-C.x,c-C.y)}}finally{g.model.endUpdate()}}}}catch(F){throw e||this.handleError(F,mxResources.get("invalidOrMissingFile")),F;}return f};EditorUi.prototype.insertLucidChart=
function(a,b,c,d){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.pasteLucidChart(a,b,c,d)}catch(e){}});!this.pasteLucidChart&&!this.loadingExtensions&&!this.isOffline()?(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("/js/diagramly/Extensions.js",e):mxscript("/js/extensions.min.js",e)):window.setTimeout(e,0)};EditorUi.prototype.insertTextAt=function(a,b,c,d,e,f){f=null!=f?f:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g,
-" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),t=this.importXml(q,b,c,f,!0);if(0<t.length)return t}if("data:image/svg+xml;"==a.substring(0,
-19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),t=this.importXml(q,b,c,f,!0),0<t.length)return t}catch(u){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
+" ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(e||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var g=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var q=this.extractGraphModelFromPng(a),s=this.importXml(q,b,c,f,!0);if(0<s.length)return s}if("data:image/svg+xml;"==a.substring(0,
+19))try{if(q=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(q=a.substring(a.indexOf(",")+1),q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0)):q=decodeURIComponent(a.substring(a.indexOf(",")+1)),s=this.importXml(q,b,c,f,!0),0<s.length)return s}catch(t){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,e){g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),d,e,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
this.convertDataUri(a)+";"))}),!0,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/d.height)),f=Math.round(d.width*e);d=Math.round(d.height*e);g.setSelectionCell(g.insertVertex(null,null,"",g.snap(b),g.snap(c),f,d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";"))}}),mxUtils.bind(this,function(){var e=null;g.getModel().beginUpdate();try{e=g.insertVertex(g.getDefaultParent(),
-null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var q=null,v;for(v in e.Pages)if(t=e.Pages[v],null!=t&&"0"==t.Properties.Order){q=t;break}null!=
+null,a,g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.updateCellSize(e),g.fireEvent(new mxEventObject("textInserted","cells",[e]))}finally{g.getModel().endUpdate()}g.setSelectionCell(e)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,f);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26)){e=JSON.parse(JSON.parse(a).state);var q=null,v;for(v in e.Pages)if(s=e.Pages[v],null!=s&&"0"==s.Properties.Order){q=s;break}null!=
q&&this.insertLucidChart(q,b,c,f)}else{g=this.editor.graph;f=null;g.getModel().beginUpdate();try{f=g.insertVertex(g.getDefaultParent(),null,"",g.snap(b),g.snap(c),1,1,"text;"+(d?"html\x3d1;":"")),g.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=a,g.updateCellSize(f),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i.test(f.value)&&
g.setLinkForCell(f,f.value),f.geometry.width+=g.gridSize,f.geometry.height+=g.gridSize}finally{g.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,0.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=
-function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,t,u,v){u=null!=u?u:!0;var x=!1,y=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(y=this.importXml(b,c,d,u),g=!0)),g||(y=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
-1))),u&&y.isGridEnabled()&&(c=y.snap(c),d=y.snap(d)),y=[y.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=t?t:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(b=this.importXml(a.responseText,
-c,d,u));null!=q&&q(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(y=this.insertTextAt(this.validateFileData(a),c,d,!0,null,u));!x&&null!=q&&q(y);return y};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,e,f,g,q,s,t,v){t=null!=t?t:!0;var x=!1,z=null;"image"==b.substring(0,5)?(g=!1,"image/png"==b.substring(0,9)&&(b=v?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(z=this.importXml(b,c,d,t),g=!0)),g||(z=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+
+1))),t&&z.isGridEnabled()&&(c=z.snap(c),d=z.snap(d)),z=[z.insertVertex(null,null,"",c,d,e,f,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+a+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,g)?(x=!0,this.parseFile(null!=s?s:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(b=this.importXml(a.responseText,
+c,d,t));null!=q&&q(b)}}),g)):/(\.vsd)($|\?)/i.test(g)||(z=this.insertTextAt(this.validateFileData(a),c,d,!0,null,t));!x&&null!=q&&q(z);return z};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="\x3d\x3d";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="\x3d";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>
-6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,q,t,u,v,x){var y=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;u=null!=u?u:this.maxImageBytes;t=null!=t?t:!0;var z=this.editor.graph,A=z.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
-this.importFile(a,b,c,d,e,f,g,k,l,y,x)});f=null!=f?f:mxUtils.bind(this,function(a){z.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var E=a.length,C=E,D=[],F=mxUtils.bind(this,function(a,b){D[a]=b;if(0==--C){this.spinner.stop();if(null!=q)q(D);else{var c=[];z.getModel().beginUpdate();try{for(var d=0;d<D.length;d++){var e=D[d]();null!=e&&(c=c.concat(e))}}finally{z.getModel().endUpdate()}}f(c)}}),G=0;G<E;G++)mxUtils.bind(this,function(f){var r=a[f],q=new FileReader;
-q.onload=mxUtils.bind(this,function(a){if(null==g||g(r))if("image/"==r.type.substring(0,6))if("image/svg"==r.type.substring(0,9)){var k=a.target.result,q=k.indexOf(","),y=atob(k.substring(q+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],C=x?null:y.getAttribute("content");null!=C&&"\x3c"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null!=C&&("\x3cmxfile "===C.substring(0,
-8)||"\x3cmxGraphModel "===C.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(C,"text/xml",b+f*A,c+f*A,0,0,r.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,q+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],s=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),u=g.getAttribute("viewBox");if(null==u||0==u.length)g.setAttribute("viewBox","0 0 "+s+" "+t);else if(isNaN(s)||isNaN(t)){var v=u.split(" ");3<v.length&&(s=parseFloat(v[2]),
-t=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,s)),d/Math.max(1,t));return e(k,r.type,b+f*A,c+f*A,Math.max(1,Math.round(s*x)),Math.max(1,Math.round(t*x)),r.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==r.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var E=new Image;E.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*A,c+f*A,E.width,E.height,r.name)}));y=
-!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,q){F(f,mxUtils.bind(this,function(){if(null!=
-g&&g.length<u){var s=!t||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/q));return e(g,r.type,b+f*A,c+f*A,Math.round(k*s),Math.round(q*s),r.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),t,d,v)})))}else e(a.target.result,r.type,b+f*A,c+f*A,240,160,r.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(r.name)?e(null,r.type,b+f*A,c+f*A,240,160,r.name,function(a){F(f,function(){return a})},r):"image"==r.type.substring(0,5)?q.readAsDataURL(r):
-q.readAsText(r)})(G)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
-f))try{var t=Math.max(g/e,q/e);if(1<t){var u=Math.round(g/t),v=Math.round(q/t),x=document.createElement("canvas");x.width=u;x.height=v;x.getContext("2d").drawImage(a,0,0,u,v);var y=x.toDataURL();if(y.length<b.length){var z=document.createElement("canvas");z.width=u;z.height=v;var A=z.toDataURL();y!==A&&(b=y,g=u,q=v)}}}catch(E){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=
+6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,e,f,g,q,s,t,v,x){var z=null!=b&&null!=c;b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;t=null!=t?t:this.maxImageBytes;s=null!=s?s:!0;var y=this.editor.graph,E=y.gridSize;e=null!=e?e:mxUtils.bind(this,function(a,b,c,d,e,f,g,k,l){return null!=a&&"\x3cmxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,g)),null):
+this.importFile(a,b,c,d,e,f,g,k,l,z,x)});f=null!=f?f:mxUtils.bind(this,function(a){y.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=a.length,D=A,C=[],F=mxUtils.bind(this,function(a,b){C[a]=b;if(0==--D){this.spinner.stop();if(null!=q)q(C);else{var c=[];y.getModel().beginUpdate();try{for(var d=0;d<C.length;d++){var e=C[d]();null!=e&&(c=c.concat(e))}}finally{y.getModel().endUpdate()}}f(c)}}),H=0;H<A;H++)mxUtils.bind(this,function(f){var q=a[f],r=new FileReader;
+r.onload=mxUtils.bind(this,function(a){if(null==g||g(q))if("image/"==q.type.substring(0,6))if("image/svg"==q.type.substring(0,9)){var k=a.target.result,r=k.indexOf(","),y=atob(k.substring(r+1)),z=mxUtils.parseXml(y),y=z.getElementsByTagName("svg");if(0<y.length){var y=y[0],A=x?null:y.getAttribute("content");null!=A&&"\x3c"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null!=A&&("\x3cmxfile "===A.substring(0,
+8)||"\x3cmxGraphModel "===A.substring(0,14))?F(f,mxUtils.bind(this,function(){return e(A,"text/xml",b+f*E,c+f*E,0,0,q.name)})):F(f,mxUtils.bind(this,function(){try{if(k.substring(0,r+1),null!=z){var a=z.getElementsByTagName("svg");if(0<a.length){var g=a[0],u=parseFloat(g.getAttribute("width")),s=parseFloat(g.getAttribute("height")),t=g.getAttribute("viewBox");if(null==t||0==t.length)g.setAttribute("viewBox","0 0 "+u+" "+s);else if(isNaN(u)||isNaN(s)){var v=t.split(" ");3<v.length&&(u=parseFloat(v[2]),
+s=parseFloat(v[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var x=Math.min(1,Math.min(d/Math.max(1,u)),d/Math.max(1,s));return e(k,q.type,b+f*E,c+f*E,Math.max(1,Math.round(u*x)),Math.max(1,Math.round(s*x)),q.name)}}}catch(y){}return null}))}}else{y=!1;if("image/png"==q.type){var D=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=D&&0<D.length){var C=new Image;C.src=a.target.result;F(f,mxUtils.bind(this,function(){return e(D,"text/xml",b+f*E,c+f*E,C.width,C.height,q.name)}));y=
+!0}}y||(null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,k,r){F(f,mxUtils.bind(this,function(){if(null!=
+g&&g.length<t){var u=!s||!this.isResampleImage(a.target.result)?1:Math.min(1,Math.min(d/k,d/r));return e(g,q.type,b+f*E,c+f*E,Math.round(k*u),Math.round(r*u),q.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),s,d,v)})))}else e(a.target.result,q.type,b+f*E,c+f*E,240,160,q.name,function(a){F(f,function(){return a})})});/(\.vsdx)($|\?)/i.test(q.name)?e(null,q.type,b+f*E,c+f*E,240,160,q.name,function(a){F(f,function(){return a})},q):"image"==q.type.substring(0,5)?r.readAsDataURL(q):
+r.readAsText(q)})(H)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,e,f){e=null!=e?e:this.maxImageSize;var g=Math.max(1,a.width),q=Math.max(1,a.height);if(d&&this.isResampleImage(b,
+f))try{var s=Math.max(g/e,q/e);if(1<s){var t=Math.round(g/s),v=Math.round(q/s),x=document.createElement("canvas");x.width=t;x.height=v;x.getContext("2d").drawImage(a,0,0,t,v);var z=x.toDataURL();if(z.length<b.length){var y=document.createElement("canvas");y.width=t;y.height=v;var E=y.toDataURL();z!==E&&(b=z,g=t,q=v)}}}catch(A){}c(b,g,q)};EditorUi.prototype.crcTable=[];for(var b=0;256>b;b++)for(var c=b,d=0;8>d;d++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[b]=c;EditorUi.prototype.updateCRC=
function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,e){function f(a,b){var c=q;q+=b;return a.substring(c,q)}function g(a){a=f(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var q=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,
-4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,q);do{var t=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);t=4294967295;t=this.updateCRC(t,b,0,4);t=this.updateCRC(t,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((t^4294967295)>>24&255,(t^4294967295)>>
-16&255,(t^4294967295)>>8&255,(t^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+t);d=f(a,t);f(a,4)}while(t);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
+4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);e=a.substring(0,q);do{var s=g(a);if("IDAT"==f(a,4)){e=a.substring(0,q-8);s=4294967295;s=this.updateCRC(s,b,0,4);s=this.updateCRC(s,d,0,d.length);e+=String.fromCharCode(c.length+d.length+1+("zTXt"==b?1:0)>>24&255,c.length+d.length+1+("zTXt"==b?1:0)>>16&255,c.length+d.length+1+("zTXt"==b?1:0)>>8&255,c.length+d.length+1+("zTXt"==b?1:0)&255)+b+c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d+String.fromCharCode((s^4294967295)>>24&255,(s^4294967295)>>
+16&255,(s^4294967295)>>8&255,(s^4294967295)&255);e+=a.substring(q-8,a.length);break}e+=a.substring(q-8,q-4+s);d=f(a,s);f(a,4)}while(s);return"data:image/png;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),
"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(e){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,c){var d=new Image;d.onload=function(){b(d)};null!=c&&(d.onerror=
c);d.src=a};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);var a=this.editor.graph,b=this;mxClient.IS_SVG&&this.editor.addSvgShadow(a.view.canvas.ownerSVGElement,null,!0);this.defaultFilename=mxResources.get("untitledDiagram");var c=a.getGlobalVariable;a.getGlobalVariable=function(a){return"page"==a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:c.apply(this,arguments)};
this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var d=this.actions.get("print");d.setEnabled(!mxClient.IS_IOS||!navigator.standalone);d.visible=d.isEnabled();if(!this.editor.chromeless){this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,
!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||a.container.addEventListener("paste",mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],
0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(l){}}),!1);var f=document.createElement("div");f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.display="block";f.contentEditable=!0;mxUtils.setOpacity(f,
0);f.style.width="1px";f.style.height="1px";f.innerHTML="\x26nbsp;";var g=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var c=mxEvent.getSource(b);if(null!=a.container&&a.isEnabled()&&!a.isMouseDown&&!a.isEditing()&&null==this.dialog&&"INPUT"!=c.nodeName&&"TEXTAREA"!=c.nodeName&&(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)&&
-!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var s=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
-function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),s())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),s())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
+!g)f.style.left=a.container.scrollLeft+10+"px",f.style.top=a.container.scrollTop+10+"px",a.container.appendChild(f),g=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){f.focus();document.execCommand("selectAll",!1,null)},0):(f.focus(),document.execCommand("selectAll",!1,null))}));var u=function(){window.setTimeout(function(){f.innerHTML="\x26nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)};mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var c=b.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){if(g&&(224==c||17==c||91==c))g=!1,!a.isEditing()&&null==this.dialog&&null!=a.container&&a.container.focus(),f.parentNode.removeChild(f)}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(b){a.isEnabled()&&(mxClipboard.copy(a),this.copyCells(f),u())}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(b){a.isEnabled()&&(this.copyCells(f,!0),u())}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(b){a.isEnabled()&&!a.isCellLocked(a.getDefaultParent())&&(f.innerHTML=
"\x26nbsp;",f.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,f);f.innerHTML="\x26nbsp;"}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==f?!0:q.apply(this,arguments)}}d=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2;this.spinner=this.createSpinner(document.body.clientWidth/2-2,d,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=
this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){if(null==d&&(!mxClient.IS_IE||10<document.documentMode))d=this.highlightElement(c);a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,
0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,
Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.test){d=document.getElementById("geFooter");
null!=d&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),d.appendChild(this.styleInput),
-this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var t=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:t.apply(this,arguments)}}d=document.getElementById("geInfo");
-null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var u=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=u&&(u.parentNode.removeChild(u),u=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==u&&(!mxClient.IS_IE||10<document.documentMode))u=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
-"drop",mxUtils.bind(this,function(b){null!=u&&(u.parentNode.removeChild(u),u=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
+this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var s=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:s.apply(this,arguments)}}d=document.getElementById("geInfo");
+null!=d&&d.parentNode.removeChild(d);if(Graph.fileSupport){var t=null;mxEvent.addListener(a.container,"dragleave",function(b){a.isEnabled()&&(null!=t&&(t.parentNode.removeChild(t),t=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(a.container,"dragover",mxUtils.bind(this,function(b){if(null==t&&(!mxClient.IS_IE||10<document.documentMode))t=this.highlightElement(a.container);null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(a.container,
+"drop",mxUtils.bind(this,function(b){null!=t&&(t.parentNode.removeChild(t),t=null);if(a.isEnabled()){var c=mxUtils.convertPoint(a.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=a.view.translate,e=a.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var l=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
b.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(b);if(null!=c)a.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){c=b.dataTransfer.getData("text/html");e=document.createElement("div");e.innerHTML=c;var d=null,m=e.getElementsByTagName("img");null!=m&&1==m.length?(c=m[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)||(d=!0)):(e=e.getElementsByTagName("a"),null!=e&&1==e.length&&(c=e[0].getAttribute("href")));
a.setSelectionCells(this.insertTextAt(c,f,g,!0,d))}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(b){var c=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,b));a.setSelectionCell(a.insertVertex(null,null,"",f,g,c*d,b*d,"shape\x3dimage;verticalLabelPosition\x3dbottom;labelBackgroundColor\x3d#ffffff;verticalAlign\x3dtop;aspect\x3dfixed;imageAspect\x3d0;image\x3d"+
l+";"))}),mxUtils.bind(this,function(b){a.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&a.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode()};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),
e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&
-(this.insertLucidChart(JSON.parse(d)),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(q){}try{var c=b.getElementsByTagName("span"),t=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(t)&&(f=!0,e=t)}catch(u){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=
+(this.insertLucidChart(JSON.parse(d)),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(q){}try{var c=b.getElementsByTagName("span"),s=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(s)&&(f=!0,e=s)}catch(t){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=
e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};
EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){if(null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode))b=this.highlightElement();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,
function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=
@@ -2810,32 +2810,32 @@ c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.
function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.diagramContainer.style.visibility="";this.formatContainer.style.visibility="";this.editor.graph.setEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.showLayersDialog()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};
EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),
bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){!this.editor.modified||"0"==urlParams.modified?this.editor.setStatus(""):null!=urlParams.modified&&this.editor.setStatus(mxResources.get(urlParams.modified))});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function r(a){if(null!=a&&"function"===typeof a.charAt&&"\x3c"!=a.charAt(0))try{"data:image/svg+xml;base64,"==
-a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var u=f.data;if("json"==urlParams.proto){try{u=JSON.parse(u)}catch(v){u=null}if(null==u)return;if("dialog"==u.action){this.showError(null!=u.titleKey?mxResources.get(u.titleKey):u.title,null!=u.messageKey?mxResources.get(u.messageKey):u.message,null!=u.buttonKey?mxResources.get(u.buttonKey):
-u.button);null!=u.modified&&(this.editor.modified=u.modified);return}if("prompt"==u.action){var x=new FilenameDialog(this,u.defaultValue||"",null!=u.okKey?mxResources.get(u.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:u}),"*")},null!=u.titleKey?mxResources.get(u.titleKey):u.title);this.showDialog(x.container,300,80,!0,!1);x.init();return}if("draft"==u.action){x=null;x="data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):
-r(u.xml);x=new DraftDialog(this,mxResources.get("draftFound",[u.name||this.defaultFilename]),x,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:u}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:u}),"*")}),u.editKey?mxResources.get(u.editKey):null,u.discardKey?mxResources.get(u.discardKey):null);this.showDialog(x.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&
-this.actions.get("exit").funct()}));try{x.init()}catch(y){g.postMessage(JSON.stringify({event:"draft",error:y.toString(),message:u}),"*")}return}if("template"==u.action){x=new NewDialog(this,!1,null!=u.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=u.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(x.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));x.init();return}if("status"==u.action){null!=u.messageKey?this.editor.setStatus(mxResources.get(u.messageKey)):null!=u.message&&this.editor.setStatus(u.message);null!=u.modified&&(this.editor.modified=u.modified);return}if("spinner"==u.action){var z=null!=u.messageKey?mxResources.get(u.messageKey):u.message;null!=u.show&&!u.show?this.spinner.stop():this.spinner.spin(document.body,z);return}if("export"==u.action){if("png"==
-u.format||"xmlpng"==u.format){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin)){var A=null!=u.xml?u.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var E=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=u.format;b.xml=encodeURIComponent(A);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var C=this.editor.graph;
-if(null!=this.pages&&this.currentPage!=this.pages[0]){var C=this.createTemporaryGraph(C.getStylesheet()),D=C.getGlobalVariable,F=this.pages[0];C.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:D.apply(this,arguments)};document.body.appendChild(C.container);C.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==u.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(A))));C!=this.editor.graph&&
-C.container.parentNode.removeChild(C.container);E(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,C)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==u.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(A)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&E(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
-u.xml&&0<u.xml.length&&this.setFileData(u.xml);z=this.createLoadMessage("export");if("html2"==u.format||"html"==u.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))x=this.getXmlFileData(),z.xml=mxUtils.getXml(x),z.data=this.getFileData(null,null,!0,null,null,null,x),z.format=u.format;else if("html"==u.format)A=this.editor.getGraphXml(),z.data=this.getHtml(A,this.editor.graph),z.xml=mxUtils.getXml(A),z.format=u.format;else{mxSvgCanvas2D.prototype.foAltText=null;x=this.editor.graph.background;
-x==mxConstants.NONE&&(x=null);z.xml=this.getFileData(!0);z.format="svg";if(u.embedImages||null==u.embedImages){if(null==u.spin&&null==u.spinKey||this.spinner.spin(document.body,null!=u.spinKey?mxResources.get(u.spinKey):u.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==u.format?this.getEmbeddedSvg(z.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(z),"*")})):this.convertImages(this.editor.graph.getSvg(x),
-mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();z.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(z),"*")}));return}x="xmlsvg"==u.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(x));z.data=this.createSvgDataUri(x)}g.postMessage(JSON.stringify(z),"*")}return}if("load"==u.action)d=1==u.autosave,this.hideDialog(),null!=u.modified&&null==urlParams.modified&&(urlParams.modified=
-u.modified),null!=u.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=u.saveAndExit),null!=u.title&&null!=this.buttonContainer&&(x=document.createElement("span"),mxUtils.write(x,u.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(x)),u=null!=u.xmlpng?this.extractGraphModelFromPng(u.xmlpng):null!=
-u.xml&&"data:image/png;base64,"==u.xml.substring(0,22)?this.extractGraphModelFromPng(u.xml):u.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(u)}),"*");return}}u=r(u);c=!0;try{a(u,f)}catch(G){this.handleError(G)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,
-function(a,b){var d=H();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
+a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"\x3c"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(b){}return a}var t=f.data;if("json"==urlParams.proto){try{t=JSON.parse(t)}catch(v){t=null}if(null==t)return;if("dialog"==t.action){this.showError(null!=t.titleKey?mxResources.get(t.titleKey):t.title,null!=t.messageKey?mxResources.get(t.messageKey):t.message,null!=t.buttonKey?mxResources.get(t.buttonKey):
+t.button);null!=t.modified&&(this.editor.modified=t.modified);return}if("prompt"==t.action){var x=new FilenameDialog(this,t.defaultValue||"",null!=t.okKey?mxResources.get(t.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:t}),"*")},null!=t.titleKey?mxResources.get(t.titleKey):t.title);this.showDialog(x.container,300,80,!0,!1);x.init();return}if("draft"==t.action){x=null;x="data:image/png;base64,"==t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):
+r(t.xml);x=new DraftDialog(this,mxResources.get("draftFound",[t.name||this.defaultFilename]),x,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:t}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:t}),"*")}),t.editKey?mxResources.get(t.editKey):null,t.discardKey?mxResources.get(t.discardKey):null);this.showDialog(x.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&
+this.actions.get("exit").funct()}));try{x.init()}catch(z){g.postMessage(JSON.stringify({event:"draft",error:z.toString(),message:t}),"*")}return}if("template"==t.action){x=new NewDialog(this,!1,null!=t.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=t.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(x.container,620,440,
+!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));x.init();return}if("status"==t.action){null!=t.messageKey?this.editor.setStatus(mxResources.get(t.messageKey)):null!=t.message&&this.editor.setStatus(t.message);null!=t.modified&&(this.editor.modified=t.modified);return}if("spinner"==t.action){var y=null!=t.messageKey?mxResources.get(t.messageKey):t.message;null!=t.show&&!t.show?this.spinner.stop():this.spinner.spin(document.body,y);return}if("export"==t.action){if("png"==
+t.format||"xmlpng"==t.format){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin)){var E=null!=t.xml?t.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=mxUtils.bind(this,function(a){var b=this.createLoadMessage("export");b.format=t.format;b.xml=encodeURIComponent(E);b.data="data:image/png;base64,"+a;g.postMessage(JSON.stringify(b),"*");this.editor.graph.setEnabled(!0)});if(this.isExportToCanvas()){var D=this.editor.graph;
+if(null!=this.pages&&this.currentPage!=this.pages[0]){var D=this.createTemporaryGraph(D.getStylesheet()),C=D.getGlobalVariable,F=this.pages[0];D.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:C.apply(this,arguments)};document.body.appendChild(D.container);D.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){a=a.toDataURL("image/png");"xmlpng"==t.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(E))));D!=this.editor.graph&&
+D.container.parentNode.removeChild(D.container);A(a.substring(a.lastIndexOf(",")+1))}),null,null,null,null,null,null,null,null,null,null,D)}else(new mxXmlRequest(EXPORT_URL,"format\x3dpng\x26embedXml\x3d"+("xmlpng"==t.format?"1":"0")+"\x26base64\x3d1\x26xml\x3d"+encodeURIComponent(encodeURIComponent(E)))).send(mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();200<=a.getStatus()&&299>=a.getStatus()&&A(a.getText())}),mxUtils.bind(this,function(){this.spinner.stop()}))}}else{null!=
+t.xml&&0<t.xml.length&&this.setFileData(t.xml);y=this.createLoadMessage("export");if("html2"==t.format||"html"==t.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length))x=this.getXmlFileData(),y.xml=mxUtils.getXml(x),y.data=this.getFileData(null,null,!0,null,null,null,x),y.format=t.format;else if("html"==t.format)E=this.editor.getGraphXml(),y.data=this.getHtml(E,this.editor.graph),y.xml=mxUtils.getXml(E),y.format=t.format;else{mxSvgCanvas2D.prototype.foAltText=null;x=this.editor.graph.background;
+x==mxConstants.NONE&&(x=null);y.xml=this.getFileData(!0);y.format="svg";if(t.embedImages||null==t.embedImages){if(null==t.spin&&null==t.spinKey||this.spinner.spin(document.body,null!=t.spinKey?mxResources.get(t.spinKey):t.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==t.format?this.getEmbeddedSvg(y.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(y),"*")})):this.convertImages(this.editor.graph.getSvg(x),
+mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();y.data=this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(y),"*")}));return}x="xmlsvg"==t.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(x));y.data=this.createSvgDataUri(x)}g.postMessage(JSON.stringify(y),"*")}return}if("load"==t.action)d=1==t.autosave,this.hideDialog(),null!=t.modified&&null==urlParams.modified&&(urlParams.modified=
+t.modified),null!=t.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=t.saveAndExit),null!=t.title&&null!=this.buttonContainer&&(x=document.createElement("span"),mxUtils.write(x,t.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),this.buttonContainer.appendChild(x)),t=null!=t.xmlpng?this.extractGraphModelFromPng(t.xmlpng):null!=
+t.xml&&"data:image/png;base64,"==t.xml.substring(0,22)?this.extractGraphModelFromPng(t.xml):t.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(t)}),"*");return}}t=r(t);c=!0;try{a(t,f)}catch(H){this.handleError(H)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var G=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=G();d&&null==b&&(b=mxUtils.bind(this,
+function(a,b){var d=G();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",
b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));("1"==urlParams.returnbounds||"json"==urlParams.proto)&&g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=
document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" (Ctrl+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));
a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));
b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
-":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",q=40,t=40,u=0,v=this.editor.graph;v.getGraphBounds();for(var x=function(){v.setSelectionCells(Y);v.scrollCellToVisible(v.getSelectionCell())},y=v.getFreeInsertPoint(),
-z=y.x,A=y.y,y=A,E=null,C="auto",D=[],F=null,G=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var K=mxUtils.trim(a.substring(1,N)),R=mxUtils.trim(a.substring(N+1));"label"==K?E=v.sanitizeHtml(R):"style"==K?e=R:"width"==K?f=R:"height"==K?g=R:"ignore"==K?G=R.split(","):"connect"==K?D.push(JSON.parse(R)):"link"==K?F=R:
-"padding"==K?u=parseFloat(R):"edgespacing"==K?q=parseFloat(R):"nodespacing"==K?t=parseFloat(R):"layout"==K&&(C=R)}}}var X=this.editor.csvToArray(b[H]);null==E&&(E="%"+X[0]+"%");if(null!=D)for(var V=0;V<D.length;V++)null==d[D[V].to]&&(d[D[V].to]={});v.model.beginUpdate();try{for(a=H+1;a<b.length;a++){var W=this.editor.csvToArray(b[a]);if(W.length==X.length){var B=new mxCell(E,new mxGeometry(z,y,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");B.vertex=!0;for(var T=0;T<W.length;T++)v.setAttributeForCell(B,
-X[T],W[T]);v.setAttributeForCell(B,"placeholders","1");B.style=v.replacePlaceholders(B,B.style);for(V=0;V<D.length;V++)d[D[V].to][B.getAttribute(D[V].to)]=B;null!=F&&"link"!=F&&(v.setLinkForCell(B,B.getAttribute(F)),v.setAttributeForCell(B,F,null));var M=this.editor.graph.getPreferredSizeForCell(B);B.geometry.width="auto"==f?M.width+u:parseFloat(f);B.geometry.height="auto"==g?M.height+u:parseFloat(g);y+=B.geometry.height+t;c.push(v.addCell(B))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted",
-"cells",c));for(var I=c.slice(),Y=c.slice(),V=0;V<D.length;V++){var L=D[V];for(a=0;a<c.length;a++){var B=c[a],J=B.getAttribute(L.from);if(null!=J){v.setAttributeForCell(B,L.from,null);for(var O=J.split(","),T=0;T<O.length;T++){var S=d[L.to][O[T]];null!=S&&(Y.push(v.insertEdge(null,null,L.label||"",L.invert?S:B,L.invert?B:S,L.style||v.createCurrentEdgeStyle())),mxUtils.remove(L.invert?B:S,I))}}}}if(null!=G)for(a=0;a<c.length;a++){B=c[a];for(T=0;T<G.length;T++)v.setAttributeForCell(B,mxUtils.trim(G[T]),
-null)}var ca=new mxParallelEdgeLayout(v);ca.spacing=q;var ba=function(){ca.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==C){var P=new mxCircleLayout(v);P.resetEdges=!1;var Z=P.isVertexIgnored;P.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(v.getDefaultParent());
-ba()},!0,x);x=null}else if("horizontaltree"==C||"verticaltree"==C||"auto"==C&&Y.length==2*c.length-1&&1==I.length){v.view.validate();var aa=new mxCompactTreeLayout(v,"horizontaltree"==C);aa.levelDistance=t;aa.edgeRouting=!1;this.executeLayout(function(){aa.execute(v.getDefaultParent(),0<I.length?I[0]:null)},!0,x);x=null}else if("horizontalflow"==C||"verticalflow"==C||"auto"==C&&1==I.length){v.view.validate();var U=new mxHierarchicalLayout(v,"horizontalflow"==C?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
-U.intraCellSpacing=t;this.executeLayout(function(){U.execute(v.getDefaultParent(),Y);v.moveCells(Y,z,A)},!0,x);x=null}else if("organic"==C||"auto"==C&&Y.length>c.length){v.view.validate();var Q=new mxFastOrganicLayout(v);Q.forceConstant=3*t;Q.resetEdges=!1;var ga=Q.isVertexIgnored;Q.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=q;this.executeLayout(function(){Q.execute(v.getDefaultParent());ba()},!0,x);x=null}this.hideDialog()}finally{v.model.endUpdate()}null!=
+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,f="auto",g="auto",q=40,s=40,t=0,v=this.editor.graph;v.getGraphBounds();for(var x=function(){v.setSelectionCells(Y);v.scrollCellToVisible(v.getSelectionCell())},z=v.getFreeInsertPoint(),
+y=z.x,E=z.y,z=E,A=null,D="auto",C=[],F=null,H=null,G=0;G<b.length&&"#"==b[G].charAt(0);){a=b[G];for(G++;G<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[G].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[G].substring(1)),G++;if("#"!=a.charAt(1)){var N=a.indexOf(":");if(0<N){var K=mxUtils.trim(a.substring(1,N)),R=mxUtils.trim(a.substring(N+1));"label"==K?A=v.sanitizeHtml(R):"style"==K?e=R:"width"==K?f=R:"height"==K?g=R:"ignore"==K?H=R.split(","):"connect"==K?C.push(JSON.parse(R)):"link"==K?F=R:
+"padding"==K?t=parseFloat(R):"edgespacing"==K?q=parseFloat(R):"nodespacing"==K?s=parseFloat(R):"layout"==K&&(D=R)}}}var X=this.editor.csvToArray(b[G]);null==A&&(A="%"+X[0]+"%");if(null!=C)for(var V=0;V<C.length;V++)null==d[C[V].to]&&(d[C[V].to]={});v.model.beginUpdate();try{for(a=G+1;a<b.length;a++){var W=this.editor.csvToArray(b[a]);if(W.length==X.length){var B=new mxCell(A,new mxGeometry(y,z,0,0),e||"whiteSpace\x3dwrap;html\x3d1;");B.vertex=!0;for(var T=0;T<W.length;T++)v.setAttributeForCell(B,
+X[T],W[T]);v.setAttributeForCell(B,"placeholders","1");B.style=v.replacePlaceholders(B,B.style);for(V=0;V<C.length;V++)d[C[V].to][B.getAttribute(C[V].to)]=B;null!=F&&"link"!=F&&(v.setLinkForCell(B,B.getAttribute(F)),v.setAttributeForCell(B,F,null));var M=this.editor.graph.getPreferredSizeForCell(B);B.geometry.width="auto"==f?M.width+t:parseFloat(f);B.geometry.height="auto"==g?M.height+t:parseFloat(g);z+=B.geometry.height+s;c.push(v.addCell(B))}}null==e&&v.fireEvent(new mxEventObject("cellsInserted",
+"cells",c));for(var I=c.slice(),Y=c.slice(),V=0;V<C.length;V++){var L=C[V];for(a=0;a<c.length;a++){var B=c[a],J=B.getAttribute(L.from);if(null!=J){v.setAttributeForCell(B,L.from,null);for(var O=J.split(","),T=0;T<O.length;T++){var S=d[L.to][O[T]];null!=S&&(Y.push(v.insertEdge(null,null,L.label||"",L.invert?S:B,L.invert?B:S,L.style||v.createCurrentEdgeStyle())),mxUtils.remove(L.invert?B:S,I))}}}}if(null!=H)for(a=0;a<c.length;a++){B=c[a];for(T=0;T<H.length;T++)v.setAttributeForCell(B,mxUtils.trim(H[T]),
+null)}var ca=new mxParallelEdgeLayout(v);ca.spacing=q;var ba=function(){ca.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==f&&(b.width=Math.round(v.snap(b.width)));"auto"==g&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==D){var P=new mxCircleLayout(v);P.resetEdges=!1;var Z=P.isVertexIgnored;P.isVertexIgnored=function(a){return Z.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){P.execute(v.getDefaultParent());
+ba()},!0,x);x=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&Y.length==2*c.length-1&&1==I.length){v.view.validate();var aa=new mxCompactTreeLayout(v,"horizontaltree"==D);aa.levelDistance=s;aa.edgeRouting=!1;this.executeLayout(function(){aa.execute(v.getDefaultParent(),0<I.length?I[0]:null)},!0,x);x=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==I.length){v.view.validate();var U=new mxHierarchicalLayout(v,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);
+U.intraCellSpacing=s;this.executeLayout(function(){U.execute(v.getDefaultParent(),Y);v.moveCells(Y,y,E)},!0,x);x=null}else if("organic"==D||"auto"==D&&Y.length>c.length){v.view.validate();var Q=new mxFastOrganicLayout(v);Q.forceConstant=3*s;Q.resetEdges=!1;var ga=Q.isVertexIgnored;Q.isVertexIgnored=function(a){return ga.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=q;this.executeLayout(function(){Q.execute(v.getDefaultParent());ba()},!0,x);x=null}this.hideDialog()}finally{v.model.endUpdate()}null!=
x&&x()}}catch(ea){this.handleError(ea)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"\x3d"+urlParams[d],c="\x26")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"\x26",null!=urlParams[d]&&(a+=d+"\x3d"+urlParams[d],b++))}return a};var f=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=f.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-
2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&
@@ -2849,8 +2849,8 @@ this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isOfflineApp()){if((mxClient.I
function(){};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),c=null!=b&&b.isEditable()||"1"==urlParams.embed;this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);
this.actions.get("copyStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed||
null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(c&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,e,f){var g=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),
-"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var q=a.getFileData(!0,null,null,null,null,!0),t=g.getGraphBounds(),u=Math.floor(t.width*e/g.view.scale),v=Math.floor(t.height*e/g.view.scale);q.length<=MAX_REQUEST_SIZE&&u*v<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format\x3d"+c+"\x26base64\x3d"+(b||"0")+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+"\x26bg\x3d"+(null!=d?
-d:"none")+"\x26w\x3d"+u+"\x26h\x3d"+v+"\x26border\x3d"+f+"\x26xml\x3d"+encodeURIComponent(q))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
+"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(g.getSvg(d,e,f)),"image/svg+xml");else{var q=a.getFileData(!0,null,null,null,null,!0),s=g.getGraphBounds(),t=Math.floor(s.width*e/g.view.scale),v=Math.floor(s.height*e/g.view.scale);q.length<=MAX_REQUEST_SIZE&&t*v<MAX_AREA?(a.hideDialog(),a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format\x3d"+c+"\x26base64\x3d"+(b||"0")+(null!=a?"\x26filename\x3d"+encodeURIComponent(a):"")+"\x26bg\x3d"+(null!=d?
+d:"none")+"\x26w\x3d"+t+"\x26h\x3d"+v+"\x26border\x3d"+f+"\x26xml\x3d"+encodeURIComponent(q))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};
function RenamePage(a,b,c){this.ui=a;this.page=b;this.previous=c}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(a,b,c){this.ui=a;this.oldIndex=b;this.newIndex=c}
MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
SelectPage.prototype.execute=function(){var a=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=a){var a=this.ui.currentPage,b=this.ui.editor,c=b.graph,d=b.graph.compress(c.zapGremlins(mxUtils.getXml(b.getGraphXml(!0))));mxUtils.setTextContent(a.node,d);a.viewState=c.getViewState();a.root=c.model.root;c.view.clear(a.root,!0);c.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=a;a=this.ui.currentPage;c.model.rootChanged(a.root);c.setViewState(a.viewState);
@@ -2918,17 +2918,17 @@ function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cur
c.style.whiteSpace="nowrap";c.style.zIndex=this.toolbarZIndex;c.style.backgroundColor="#eee";c.style.height=this.toolbarHeight+"px";this.toolbar=c;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(c.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(c,30);var d=null,e=null,f=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(c,
0);d=null;e=window.setTimeout(mxUtils.bind(this,function(){c.style.display="none";e=null}),100)}),a||200)}),g=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=e&&(window.clearTimeout(e),fadeThead2=null);c.style.display="";mxUtils.setOpacity(c,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(g(30),f())}));mxEvent.addListener(c,mxClient.IS_POINTER?"pointermove":
"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(a){g(100)}));mxEvent.addListener(c,"mousemove",mxUtils.bind(this,function(a){g(100);mxEvent.consume(a)}));mxEvent.addListener(c,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||g(30)}));var k=this.graph,l=k.getTolerance();k.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,r=null,s=0;s<m.length;s++){var q=m[s];if("pages"==q){var t=[],r=b.ownerDocument.createElement("div");
-r.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(r,70);var u=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
-"Previous Page");u.style.borderRightStyle="none";u.style.paddingLeft="0px";u.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,t.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+t.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(t[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
-"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)t=[];this.xmlNode!=x&&(t=this.xmlNode.getElementsByTagName("diagram"),r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+t.length),x=this.xmlNode);r.style.display=1<t.length?"inline-block":"none";u.style.display=r.style.display;v.style.display=r.style.display});this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
-Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var y=this.graph.getModel(),z=a(mxUtils.bind(this,function(a){if(null!=
-p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=z.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
-p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");y.addListener(mxEvent.CHANGE,function(){z.style.display=1<y.getChildCount(y.root)?"inline-block":"none"});z.style.display=1<y.getChildCount(y.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
+k.container.scrollLeft;this.scrollTop=k.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-k.container.scrollLeft)<l&&Math.abs(this.scrollTop-k.container.scrollTop)<l&&Math.abs(this.startX-b.getGraphX())<l&&Math.abs(this.startY-b.getGraphY())<l&&(0<parseFloat(c.style.opacity||0)?f():g(30))}})}for(var m=this.toolbarItems,n=0,p=null,r=null,u=0;u<m.length;u++){var q=m[u];if("pages"==q){var s=[],r=b.ownerDocument.createElement("div");
+r.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(r,70);var t=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage-1,s.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+s.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(s[this.currentPage]))).documentElement)}),Editor.previousImage,mxResources.get("previousPage")||
+"Previous Page");t.style.borderRightStyle="none";t.style.paddingLeft="0px";t.style.paddingRight="0px";c.appendChild(r);var v=a(mxUtils.bind(this,function(){this.currentPage=mxUtils.mod(this.currentPage+1,s.length);r.innerHTML="";mxUtils.write(r,this.currentPage+1+" / "+s.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(s[this.currentPage]))).documentElement)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight=
+"0px";var x=null,q=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)s=[];this.xmlNode!=x&&(s=this.xmlNode.getElementsByTagName("diagram"),r.innerHTML="",mxUtils.write(r,this.currentPage+1+" / "+s.length),x=this.xmlNode);r.style.display=1<s.length?"inline-block":"none";t.style.display=r.style.display;v.style.display=r.style.display});this.addListener("xmlNodeChanged",q);q()}else if("zoom"==q)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),
+Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==q){if(this.layersEnabled){var z=this.graph.getModel(),y=a(mxUtils.bind(this,function(a){if(null!=
+p)p.parentNode.removeChild(p),p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=y.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);
+p.style.left=b.x+a.left+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");z.addListener(mxEvent.CHANGE,function(){y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"});y.style.display=1<z.getChildCount(z.root)?"inline-block":"none"}}else"lightbox"==q?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&
(q=this.graphConfig["toolbar-buttons"][q],null!=q&&a(null==q.enabled||q.enabled?q.handler:function(){},q.image,q.title,q.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*n);null!=this.graphConfig.title&&(m=b.ownerDocument.createElement("div"),m.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",m.setAttribute("title",this.graphConfig.title),mxUtils.write(m,
-this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var A=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
-b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==A&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
-p=null),b.style.border=A)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
+this.graphConfig.title),mxUtils.setOpacity(m,70),c.appendChild(m));this.minToolbarWidth=34*n;var E=b.style.border,m=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},a={left:a.left-d.left,top:a.top-d.top,bottom:a.bottom-d.top,right:a.right-d.left};c.style.left=a.left+"px";c.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,
+b.offsetWidth)+"px";c.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?c.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(c.style.marginTop=-this.toolbarHeight+"px",c.style.top=a.top+1+"px"):c.style.top=a.top+"px";"1px solid transparent"==E&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(c);var e=mxUtils.bind(this,function(){!0!=this.graphConfig["toolbar-nohide"]&&(null!=c.parentNode&&c.parentNode.removeChild(c),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=E)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==c||a==p)return;a=a.parentNode}e()});mxEvent.addListener(document,"mouseleave",function(a){e()})});mxEvent.addListener(b,"mouseenter",m)};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,function(a){null!=b&&b.destroy()},mxUtils.bind(this,function(a){null==b&&this.lightboxClickEnabled&&(!mxEvent.isTouchEvent(a)||0==this.toolbarItems.length)&&this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(){if("open"==this.graphConfig.lightbox||window.self!==window.top){var a=this.layersEnabled?"\x26layers\x3d1":"";if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var b=null,c=mxUtils.bind(this,function(a){"ready"==a.data&&a.source==b&&(b.postMessage(this.xml,"*"),mxEvent.removeListener(window,"message",c))});mxEvent.addListener(window,"message",c);b=window.open("https://www.draw.io/?client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26close\x3d1\x26edit\x3d_blank"+
a)}else window.drawdata=this.xml,window.open("https://www.draw.io/?client\x3d1\x26chrome\x3d0\x26lightbox\x3d1\x26edit\x3d_blank"+a)}else this.showLocalLightbox()};
@@ -2947,5 +2947,5 @@ GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,c){if(null!=GraphViewe
(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(c,d){function e(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function f(b,c){if(b.resizedAttached){if(b.resizedAttached){b.resizedAttached.add(c);return}}else b.resizedAttached=new e,b.resizedAttached.add(c);b.resizeSensor=document.createElement("div");
b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='\x3cdiv class\x3d"resize-sensor-expand" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"resize-sensor-shrink" style\x3d"position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"\x3e\x3cdiv style\x3d"position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"\x3e\x3c/div\x3e\x3c/div\x3e';
b.appendChild(b.resizeSensor);if("static"==(b.currentStyle?b.currentStyle.position:window.getComputedStyle?window.getComputedStyle(b,null).getPropertyValue("position"):b.style.position))b.style.position="relative";var d=b.resizeSensor.childNodes[0],f=d.childNodes[0],g=b.resizeSensor.childNodes[1],k=function(){f.style.width="100000px";f.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;g.scrollLeft=1E5;g.scrollTop=1E5};k();var l=!1,m=function(){b.resizedAttached&&(l&&(b.resizedAttached.call(),
-l=!1),a(m))};a(m);var x,y,z,A,E=function(){if((z=b.offsetWidth)!=x||(A=b.offsetHeight)!=y)l=!0,x=z,y=A;k()},C=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};C(d,"scroll",E);C(g,"scroll",E)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
+l=!1),a(m))};a(m);var x,z,y,E,A=function(){if((y=b.offsetWidth)!=x||(E=b.offsetHeight)!=z)l=!0,x=y,z=E;k()},D=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};D(d,"scroll",A);D(g,"scroll",A)}var g=function(){GraphViewer.resizeSensorEnabled&&d()},k=Object.prototype.toString.call(c),l="[object Array]"===k||"[object NodeList]"===k||"[object HTMLCollection]"===k||"undefined"!==typeof jQuery&&c instanceof jQuery||"undefined"!==typeof Elements&&c instanceof Elements;if(l)for(var k=
0,m=c.length;k<m;k++)f(c[k],g);else f(c,g);this.detach=function(){if(l)for(var a=0,d=c.length;a<d;a++)b.detach(c[a]);else b.detach(c)}};b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();(function(){Editor.initMath();GraphViewer.initCss();mxStencilRegistry.dynamicLoading=!1;if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})(); \ No newline at end of file