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:
Diffstat (limited to 'src/main/webapp/js/viewer-static.min.js')
-rw-r--r--src/main/webapp/js/viewer-static.min.js2110
1 files changed, 1054 insertions, 1056 deletions
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 4a5a761a..46946425 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -1,5 +1,5 @@
-window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.SHAPES_PATH=window.SHAPES_PATH||"https://viewer.diagrams.net/shapes";window.STENCIL_PATH=window.STENCIL_PATH||"https://viewer.diagrams.net/stencils";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"https://viewer.diagrams.net/img";window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";
-window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
+window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.STYLE_PATH=window.STYLE_PATH||"https://viewer.diagrams.net/styles";window.SHAPES_PATH=window.SHAPES_PATH||"https://viewer.diagrams.net/shapes";window.STENCIL_PATH=window.STENCIL_PATH||"https://viewer.diagrams.net/stencils";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"https://viewer.diagrams.net/img";window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";
+window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.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),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}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 h(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*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"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 o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
/*! @license DOMPurify 2.3.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.6/LICENSE */
@@ -111,7 +111,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.6",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.3.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&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:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,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:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2006,8 +2006,8 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,d=new mxUndoManager;this.undoListener=function(l,B){d.undoableEditHappened(B.getProperty("edit"))};var k=mxUtils.bind(this,function(l,B){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,B){l=b.getSelectionCellsForChanges(B.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();B=[];for(var p=0;p<l.length;p++)null!=
b.view.getState(l[p])&&B.push(l[p]);b.setSelectionCells(B)}};d.addListener(mxEvent.UNDO,k);d.addListener(mxEvent.REDO,k);return d};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,d,k,l,B,p,E,M,S,H,K){var Q=S?57:0,e=k,f=l,g=S?0:64,u=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(u.height=window.innerHeight);var y=u.height,C=Math.max(1,Math.round((u.width-k-g)/2)),I=Math.max(1,Math.round((y-l-b.footerHeight)/3));d.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,y-g);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";C+=u.x;I+=u.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+function Dialog(b,d,k,l,B,p,E,M,S,H,K){var Q=S?57:0,e=k,f=l,g=S?0:64,v=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(v.height=window.innerHeight);var y=v.height,C=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((y-l-b.footerHeight)/3));d.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,y-g);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=y+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));v=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=v.x+"px";this.bg.style.top=v.y+"px";C+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
I+=b.embedViewport.y,C+=b.embedViewport.x);B&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");B=this.getPosition(C,I,k,l);C=B.x;I=B.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=C+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(d);document.body.appendChild(D);!M&&d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");d.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),
p.setAttribute("title",mxResources.get("close")),p.className="geDialogClose",p.style.top=I+14+"px",p.style.left=C+k+38-Q+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!K)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(G){N=!0}),null,mxUtils.bind(this,function(G){N&&(b.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=H){var G=H();
null!=G&&(e=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();y=G.height;this.bg.style.height=y+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");C=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((y-l-b.footerHeight)/3));k=null!=document.body?Math.min(e,document.body.scrollWidth-g):e;l=Math.min(f,y-g);G=this.getPosition(C,I,k,l);C=G.x;I=G.y;D.style.left=C+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
@@ -2019,7 +2019,7 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
var ErrorDialog=function(b,d,k,l,B,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=d){var e=document.createElement("div");e.style.padding="0px";e.style.margin="0px";e.style.fontSize="18px";e.style.paddingBottom="16px";e.style.marginBottom="10px";e.style.borderBottom="1px solid #c0c0c0";e.style.color="gray";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,d);e.setAttribute("title",d);Q.appendChild(e)}d=
document.createElement("div");d.style.lineHeight="1.2em";d.style.padding="6px";d.innerHTML=k;Q.appendChild(d);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(d=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),d.className="geBtn",k.appendChild(d),k.style.textAlign="center");null!=H&&(H=mxUtils.button(H,function(){null!=K&&K()}),H.className="geBtn",k.appendChild(H));var f=mxUtils.button(l,function(){S&&b.hideDialog();null!=B&&B()});
f.className="geBtn";k.appendChild(f);null!=E&&(l=mxUtils.button(E,function(){S&&b.hideDialog();null!=M&&M()}),l.className="geBtn gePrimaryBtn",k.appendChild(l));this.init=function(){f.focus()};Q.appendChild(k);this.container=Q},PrintDialog=function(b,d){this.create(b,d)};
-PrintDialog.prototype.create=function(b){function d(f){var g=E.checked||H.checked,u=parseInt(Q.value)/100;isNaN(u)&&(u=1,Q.value="100%");u*=.75;var y=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(C=mxUtils.getScaleForPageCount(I,k,y))}k.getGraphBounds();var D=I=0;y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*u);y.height=Math.ceil(y.height*u);C*=u;!g&&k.pageVisible?(u=k.getPageLayout(),I-=u.x*y.width,D-=u.y*y.height):
+PrintDialog.prototype.create=function(b){function d(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var y=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,C=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(C=mxUtils.getScaleForPageCount(I,k,y))}k.getGraphBounds();var D=I=0;y=mxRectangle.fromRectangle(y);y.width=Math.ceil(y.width*v);y.height=Math.ceil(y.height*v);C*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*y.width,D-=v.y*y.height):
g=!0;g=PrintDialog.createPrintPreview(k,C,y,0,I,D,g);g.open();f&&PrintDialog.printPreview(g)}var k=b.editor.graph,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var B=document.createElement("tbody");var p=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var M=document.createElement("td");M.setAttribute("colspan","2");M.style.fontSize="10pt";M.appendChild(E);var S=document.createElement("span");mxUtils.write(S," "+mxResources.get("fitPage"));
M.appendChild(S);mxEvent.addListener(S,"click",function(f){E.checked=!E.checked;H.checked=!E.checked;mxEvent.consume(f)});mxEvent.addListener(E,"change",function(){H.checked=!E.checked});p.appendChild(M);B.appendChild(p);p=p.cloneNode(!1);var H=document.createElement("input");H.setAttribute("type","checkbox");M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(H);S=document.createElement("span");mxUtils.write(S," "+mxResources.get("posterPrint")+":");M.appendChild(S);mxEvent.addListener(S,
"click",function(f){H.checked=!H.checked;E.checked=!H.checked;mxEvent.consume(f)});p.appendChild(M);var K=document.createElement("input");K.setAttribute("value","1");K.setAttribute("type","number");K.setAttribute("min","1");K.setAttribute("size","4");K.setAttribute("disabled","disabled");K.style.width="50px";M=document.createElement("td");M.style.fontSize="10pt";M.appendChild(K);mxUtils.write(M," "+mxResources.get("pages")+" (max)");p.appendChild(M);B.appendChild(p);mxEvent.addListener(H,"change",
@@ -2033,27 +2033,27 @@ var PageSetupDialog=function(b){function d(){null==K||K==mxConstants.NONE?(H.sty
mxUtils.write(M,mxResources.get("background")+":");E.appendChild(M);M=document.createElement("td");M.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var H=document.createElement("button");H.style.width="22px";H.style.height="22px";H.style.cursor="pointer";H.style.marginRight="20px";H.style.backgroundPosition="center center";H.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(H.style.position="relative",H.style.top="-6px");var K=l.background;d();mxEvent.addListener(H,
"click",function(y){b.pickColor(K||"none",function(C){K=C;d()});mxEvent.consume(y)});M.appendChild(H);mxUtils.write(M,mxResources.get("gridSize")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="6px";Q.value=l.getGridSize();M.appendChild(Q);mxEvent.addListener(Q,"change",function(){var y=parseInt(Q.value);Q.value=Math.max(1,isNaN(y)?l.getGridSize():y)});E.appendChild(M);p.appendChild(E);E=document.createElement("tr");
M=document.createElement("td");mxUtils.write(M,mxResources.get("image")+":");E.appendChild(M);M=document.createElement("td");var e=document.createElement("button");e.className="geBtn";e.style.margin="0px";mxUtils.write(e,mxResources.get("change")+"...");var f=document.createElement("img");f.setAttribute("valign","middle");f.style.verticalAlign="middle";f.style.border="1px solid lightGray";f.style.borderRadius="4px";f.style.marginRight="14px";f.style.maxWidth="100px";f.style.cursor="pointer";f.style.height=
-"60px";f.style.padding="4px";var g=l.backgroundImage,u=function(y){b.showBackgroundImageDialog(function(C,I){I||(g=C,k())},g);mxEvent.consume(y)};mxEvent.addListener(e,"click",u);mxEvent.addListener(f,"click",u);k();M.appendChild(f);M.appendChild(e);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
-b.editor.cancelFirst&&M.appendChild(e);u=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var y=parseInt(Q.value);isNaN(y)||l.gridSize===y||l.setGridSize(y);y=new ChangePageSetup(b,K,g,S.get());y.ignoreColor=l.background==K;y.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==y.previousFormat.width&&l.pageFormat.height==y.previousFormat.height&&y.ignoreColor&&y.ignoreImage||l.model.execute(y)});u.className="geBtn gePrimaryBtn";
-M.appendChild(u);b.editor.cancelFirst||M.appendChild(e);E.appendChild(M);p.appendChild(E);B.appendChild(p);this.container=B};
-PageSetupDialog.addPageFormatPanel=function(b,d,k,l){function B(G,ha,ka){if(ka||Q!=document.activeElement&&e!=document.activeElement){G=!1;for(ha=0;ha<g.length;ha++)ka=g[ha],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+"60px";f.style.padding="4px";var g=l.backgroundImage,v=function(y){b.showBackgroundImageDialog(function(C,I){I||(g=C,k())},g);mxEvent.consume(y)};mxEvent.addListener(e,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(e);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");M.colSpan=2;M.style.paddingTop="16px";M.setAttribute("align","right");e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";
+b.editor.cancelFirst&&M.appendChild(e);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var y=parseInt(Q.value);isNaN(y)||l.gridSize===y||l.setGridSize(y);y=new ChangePageSetup(b,K,g,S.get());y.ignoreColor=l.background==K;y.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==y.previousFormat.width&&l.pageFormat.height==y.previousFormat.height&&y.ignoreColor&&y.ignoreImage||l.model.execute(y)});v.className="geBtn gePrimaryBtn";
+M.appendChild(v);b.editor.cancelFirst||M.appendChild(e);E.appendChild(M);p.appendChild(E);B.appendChild(p);this.container=B};
+PageSetupDialog.addPageFormatPanel=function(b,d,k,l){function B(G,ia,ka){if(ka||Q!=document.activeElement&&e!=document.activeElement){G=!1;for(ia=0;ia<g.length;ia++)ka=g[ia],I?"custom"==ka.key&&(M.value=ka.key,I=!1):null!=ka.format&&("a4"==ka.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==ka.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
k.width==ka.format.width&&k.height==ka.format.height?(M.value=ka.key,p.setAttribute("checked","checked"),p.defaultChecked=!0,p.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,G=!0):k.width==ka.format.height&&k.height==ka.format.width&&(M.value=ka.key,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,G=E.checked=!0));G?(S.style.display="",K.style.display="none"):(Q.value=k.width/100,e.value=k.height/100,p.setAttribute("checked",
"checked"),M.value="custom",S.style.display="none",K.style.display="")}}d="format-"+d;var p=document.createElement("input");p.setAttribute("name",d);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",d);E.setAttribute("type","radio");E.setAttribute("value","landscape");var M=document.createElement("select");M.style.marginBottom="8px";M.style.borderRadius="4px";M.style.border="1px solid rgb(160, 160, 160)";M.style.width="206px";
var S=document.createElement("div");S.style.marginLeft="4px";S.style.width="210px";S.style.height="24px";p.style.marginRight="6px";S.appendChild(p);d=document.createElement("span");d.style.maxWidth="100px";mxUtils.write(d,mxResources.get("portrait"));S.appendChild(d);E.style.marginLeft="10px";E.style.marginRight="6px";S.appendChild(E);var H=document.createElement("span");H.style.width="100px";mxUtils.write(H,mxResources.get("landscape"));S.appendChild(H);var K=document.createElement("div");K.style.marginLeft=
-"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";K.appendChild(e);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),u=0;u<g.length;u++){var y=g[u];f[y.key]=y;var C=document.createElement("option");C.setAttribute("value",
-y.key);mxUtils.write(C,y.title);M.appendChild(C)}var I=!1;B();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ha){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,e.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(e.value);if(isNaN(G)||0>=G)e.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
-Math.floor(100*parseFloat(e.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ha&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(d,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(e,"blur",N);mxEvent.addListener(e,"click",N);mxEvent.addListener(E,"change",N);
+"4px";K.style.width="210px";K.style.height="24px";var Q=document.createElement("input");Q.setAttribute("size","7");Q.style.textAlign="right";K.appendChild(Q);mxUtils.write(K," in x ");var e=document.createElement("input");e.setAttribute("size","7");e.style.textAlign="right";K.appendChild(e);mxUtils.write(K," in");S.style.display="none";K.style.display="none";for(var f={},g=PageSetupDialog.getFormats(),v=0;v<g.length;v++){var y=g[v];f[y.key]=y;var C=document.createElement("option");C.setAttribute("value",
+y.key);mxUtils.write(C,y.title);M.appendChild(C)}var I=!1;B();b.appendChild(M);mxUtils.br(b);b.appendChild(S);b.appendChild(K);var D=k,N=function(G,ia){G=f[M.value];null!=G.format?(Q.value=G.format.width/100,e.value=G.format.height/100,K.style.display="none",S.style.display=""):(S.style.display="none",K.style.display="");G=parseFloat(Q.value);if(isNaN(G)||0>=G)Q.value=k.width/100;G=parseFloat(e.value);if(isNaN(G)||0>=G)e.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(e.value)));"custom"!=M.value&&E.checked&&(G=new mxRectangle(0,0,G.height,G.width));ia&&I||G.width==D.width&&G.height==D.height||(D=G,null!=l&&l(D))};mxEvent.addListener(d,"click",function(G){p.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(H,"click",function(G){E.checked=!0;N(G);mxEvent.consume(G)});mxEvent.addListener(Q,"blur",N);mxEvent.addListener(Q,"click",N);mxEvent.addListener(e,"blur",N);mxEvent.addListener(e,"click",N);mxEvent.addListener(E,"change",N);
mxEvent.addListener(p,"change",N);mxEvent.addListener(M,"change",function(G){I="custom"==M.value;N(G,!0)});N();return{set:function(G){k=G;B(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:e}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var u=document.createElement("tr");var y=document.createElement("td");y.style.textOverflow="ellipsis";y.style.textAlign="right";y.style.maxWidth=(e?e+15:100)+"px";y.style.fontSize="10pt";y.style.width=(e?e:84)+"px";mxUtils.write(y,(B||mxResources.get("filename"))+":");u.appendChild(y);var C=
+var FilenameDialog=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){S=null!=S?S:!0;var f=document.createElement("table"),g=document.createElement("tbody");f.style.position="absolute";f.style.top="30px";f.style.left="20px";var v=document.createElement("tr");var y=document.createElement("td");y.style.textOverflow="ellipsis";y.style.textAlign="right";y.style.maxWidth=(e?e+15:100)+"px";y.style.fontSize="10pt";y.style.width=(e?e:84)+"px";mxUtils.write(y,(B||mxResources.get("filename"))+":");v.appendChild(y);var C=
document.createElement("input");C.setAttribute("value",d||"");C.style.marginLeft="4px";C.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(C.value))S&&b.hideDialog(),l(C.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=B||null==E)if(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var D=f.parentNode;if(null!=D){var N=null;mxEvent.addListener(D,"dragleave",
function(G){null!=N&&(N.style.backgroundColor="",N=null);G.stopPropagation();G.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(G){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=C,N.style.backgroundColor="#ebf2f9");G.stopPropagation();G.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(G){null!=N&&(N.style.backgroundColor="",N=null);0<=mxUtils.indexOf(G.dataTransfer.types,"text/uri-list")&&(C.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
-I.click());G.stopPropagation();G.preventDefault()}))}}};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);u.appendChild(y);if(null!=B||null==E)g.appendChild(u),null!=K&&(y.appendChild(FilenameDialog.createTypeHint(b,C,K)),null!=b.editor.diagramFileTypes&&(u=document.createElement("tr"),y=document.createElement("td"),y.style.textOverflow="ellipsis",y.style.textAlign="right",y.style.maxWidth="100px",y.style.fontSize="10pt",y.style.width="84px",mxUtils.write(y,mxResources.get("type")+
-":"),u.appendChild(y),y=document.createElement("td"),y.style.whiteSpace="nowrap",u.appendChild(y),d=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",y.appendChild(d),C.style.width=null!=Q?Q-40+"px":"190px",u.appendChild(y),g.appendChild(u)));null!=E&&(u=document.createElement("tr"),y=document.createElement("td"),y.colSpan=2,y.appendChild(E),u.appendChild(y),g.appendChild(u));u=document.createElement("tr");y=document.createElement("td");y.colSpan=
+I.click());G.stopPropagation();G.preventDefault()}))}}};y=document.createElement("td");y.style.whiteSpace="nowrap";y.appendChild(C);v.appendChild(y);if(null!=B||null==E)g.appendChild(v),null!=K&&(y.appendChild(FilenameDialog.createTypeHint(b,C,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),y=document.createElement("td"),y.style.textOverflow="ellipsis",y.style.textAlign="right",y.style.maxWidth="100px",y.style.fontSize="10pt",y.style.width="84px",mxUtils.write(y,mxResources.get("type")+
+":"),v.appendChild(y),y=document.createElement("td"),y.style.whiteSpace="nowrap",v.appendChild(y),d=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),d.style.marginLeft="4px",d.style.width="198px",y.appendChild(d),C.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(y),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),y=document.createElement("td"),y.colSpan=2,y.appendChild(E),v.appendChild(y),g.appendChild(v));v=document.createElement("tr");y=document.createElement("td");y.colSpan=
2;y.style.paddingTop=null!=K?"12px":"20px";y.style.whiteSpace="nowrap";y.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&y.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",y.appendChild(Q));mxEvent.addListener(C,"keypress",function(D){13==D.keyCode&&I.click()});y.appendChild(I);b.editor.cancelFirst||y.appendChild(K);
-u.appendChild(y);g.appendChild(u);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
+v.appendChild(y);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,d,k){var l=document.createElement("img");l.style.backgroundPosition="center bottom";l.style.backgroundRepeat="no-repeat";l.style.margin="2px 0 0 4px";l.style.verticalAlign="top";l.style.cursor="pointer";l.style.height="16px";l.style.width="16px";mxUtils.setOpacity(l,70);var B=function(){l.setAttribute("src",Editor.helpImage);l.setAttribute("title",mxResources.get("help"));for(var p=0;p<k.length;p++)if(0<k[p].ext.length&&d.value.toLowerCase().substring(d.value.length-
k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(d,"keyup",B);mxEvent.addListener(d,"change",B);mxEvent.addListener(l,"click",function(p){var E=l.getAttribute("title");l.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(p)});
B();return l};
@@ -2068,9 +2068,9 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,M=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",S.style.backgroundImage="none",S.style.backgroundColor="",Editor.isDarkMode()||"simple"!=Editor.currentTheme?E.container.style.backgroundColor="":E.container.style.backgroundColor=E.simpleBackgroundColor):(E.container.className="geDiagramContainer",S.style.backgroundPosition=K,S.style.backgroundImage=H,null!=E.background&&E.background!=mxConstants.NONE||Editor.isDarkMode()||"simple"!=Editor.currentTheme?S.style.backgroundColor=
M:(S.style.backgroundColor=E.simpleBackgroundColor,E.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E){for(var M=this.graph.gridSize*this.scale;M<this.minGridSize;)M*=2;for(var S=this.gridSteps*M,H=[],K=1;K<this.gridSteps;K++){var Q=K*M;H.push("M 0 "+Q+" L "+S+" "+Q+" M "+Q+" 0 L "+Q+" "+S)}return'<svg width="'+S+'" height="'+S+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+S+'" height="'+S+'" patternUnits="userSpaceOnUse"><path d="'+H.join(" ")+
'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+S+" 0 L 0 0 0 "+S+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var H=this.gridSize*this.view.scale*this.view.gridSteps;H=-Math.round(H-mxUtils.mod(this.view.translate.x*
-this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,e=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*e,Q.height*e),u=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,y=E?Math.ceil(M/g.width)-1:0,C=f.x+M,
-I=f.y+S;null==this.horizontalPageBreaks&&0<u&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?u:y,G=0;G<=N;G++){var ha=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(C),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
-Math.round(I))];null!=D[G]?(D[G].points=ha,D[G].redraw()):(ha=new mxPolyline(ha,this.pageBreakColor),ha.dialect=this.dialect,ha.isDashed=this.pageBreakDashed,ha.pointerEvents=!1,ha.init(this.view.backgroundPane),ha.redraw(),D[G]=ha)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
+this.view.scale+E,H))+"px "+-Math.round(H-mxUtils.mod(this.view.translate.y*this.view.scale+M,H))+"px";S.style.backgroundPosition=H}};mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.view.scale,K=this.view.translate,Q=this.pageFormat,e=H*this.pageScale,f=this.view.getBackgroundPageBounds();M=f.width;S=f.height;var g=new mxRectangle(H*K.x,H*K.y,Q.width*e,Q.height*e),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,y=E?Math.ceil(M/g.width)-1:0,C=f.x+M,
+I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<y&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:y,G=0;G<=N;G++){var ia=D==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(G+1)*g.height)),new mxPoint(Math.round(C),Math.round(f.y+(G+1)*g.height))]:[new mxPoint(Math.round(f.x+(G+1)*g.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(G+1)*g.width),
+Math.round(I))];null!=D[G]?(D[G].points=ia,D[G].redraw()):(ia=new mxPolyline(ia,this.pageBreakColor),ia.dialect=this.dialect,ia.isDashed=this.pageBreakDashed,ia.pointerEvents=!1,ia.init(this.view.backgroundPane),ia.redraw(),D[G]=ia)}for(G=N;G<D.length;G++)D[G].destroy();D.splice(N,D.length-N)}});E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var d=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,M,S){for(var H=0;H<M.length;H++){if(this.graph.isTableCell(M[H])||
this.graph.isTableRow(M[H]))return!1;if(this.graph.getModel().isVertex(M[H])){var K=this.graph.getCellGeometry(M[H]);if(null!=K&&K.relative)return!1}}return d.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(M,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=
function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),M=0<E.width?E.x/this.scale-this.translate.x:0,S=0<E.height?E.y/this.scale-this.translate.y:0,H=this.graph.pageFormat,K=this.graph.pageScale,Q=H.width*K;H=H.height*K;K=Math.floor(Math.min(0,M)/Q);var e=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+e*H),this.scale*
(Math.ceil(Math.max(1,M+E.width/this.scale)/Q)-K)*Q,this.scale*(Math.ceil(Math.max(1,S+E.height/this.scale)/H)-e)*H)};var l=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,M){l.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=M+"px")};var B=mxPopupMenu.prototype.addItem;
@@ -2082,17 +2082,17 @@ l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListen
this.createMenus();if(!l.standalone){var p="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents strokeColor strokeWidth".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
M="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),S=!1,H=!1;this.setDefaultStyle=function(R){try{l.getModel().isEdge(R)?H=!1:S=!1;var Y=l.getCellStyle(R,!1),Z=[],la=[],q;for(q in Y)Z.push(Y[q]),la.push(q);l.getModel().isEdge(R)?l.currentEdgeStyle={}:l.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",Z,"cells",[R]));l.getModel().isEdge(R)?H=!0:S=!0}catch(F){this.handleError(F)}};this.clearDefaultStyle=
function(){l.currentEdgeStyle=mxUtils.clone(l.defaultEdgeStyle);l.currentVertexStyle=mxUtils.clone(l.defaultVertexStyle);S=H=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var K=["fontFamily","fontSource","fontSize","fontColor"];for(d=0;d<K.length;d++)0>mxUtils.indexOf(p,K[d])&&p.push(K[d]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),e=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
-"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(k=0;k<e[d].length;k++)p.push(e[d][k]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var ba=0;ba<R.length;ba++)T=T.concat(Z.getDescendants(R[ba]));R=T}Z.beginUpdate();try{for(ba=0;ba<R.length;ba++){var U=R[ba];
-if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<e.length;T++){var Aa=e[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Ma=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
-da[sa];var Ia=T[Ba];null!=Ia&&"edgeStyle"!=Ba&&("shape"!=Ba||Oa)&&(!Oa||F||0>mxUtils.indexOf(M,Ba))&&(Ma=mxUtils.setStyle(Ma,Ba,Ia))}Editor.simpleLabels&&(Ma=mxUtils.setStyle(mxUtils.setStyle(Ma,"html",null),"whiteSpace",null));Z.setStyle(U,Ma)}}finally{Z.endUpdate()}return R};l.addListener("cellsInserted",function(R,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(R,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(d=0;d<e.length;d++)for(k=0;k<e[d].length;k++)p.push(e[d][k]);for(d=0;d<E.length;d++)0>mxUtils.indexOf(p,E[d])&&p.push(E[d]);var f=function(R,Y,Z,la,q,F,T){la=null!=la?la:l.currentVertexStyle;q=null!=q?q:l.currentEdgeStyle;F=null!=F?F:!0;Z=null!=Z?Z:l.getModel();if(T){T=[];for(var aa=0;aa<R.length;aa++)T=T.concat(Z.getDescendants(R[aa]));R=T}Z.beginUpdate();try{for(aa=0;aa<R.length;aa++){var U=R[aa];
+if(Y)var da=["fontSize","fontFamily","fontColor"];else{var fa=Z.getStyle(U),na=null!=fa?fa.split(";"):[];da=p.slice();for(var sa=0;sa<na.length;sa++){var za=na[sa],ua=za.indexOf("=");if(0<=ua){var Ba=za.substring(0,ua),oa=mxUtils.indexOf(da,Ba);0<=oa&&da.splice(oa,1);for(T=0;T<e.length;T++){var Aa=e[T];if(0<=mxUtils.indexOf(Aa,Ba))for(var ya=0;ya<Aa.length;ya++){var La=mxUtils.indexOf(da,Aa[ya]);0<=La&&da.splice(La,1)}}}}}var Oa=Z.isEdge(U);T=Oa?q:la;var Na=Z.getStyle(U);for(sa=0;sa<da.length;sa++){Ba=
+da[sa];var Ia=T[Ba];null!=Ia&&"edgeStyle"!=Ba&&("shape"!=Ba||Oa)&&(!Oa||F||0>mxUtils.indexOf(M,Ba))&&(Na=mxUtils.setStyle(Na,Ba,Ia))}Editor.simpleLabels&&(Na=mxUtils.setStyle(mxUtils.setStyle(Na,"html",null),"whiteSpace",null));Z.setStyle(U,Na)}}finally{Z.endUpdate()}return R};l.addListener("cellsInserted",function(R,Y){f(Y.getProperty("cells"),null,null,null,null,!0,!0)});l.addListener("textInserted",function(R,Y){f(Y.getProperty("cells"),!0)});this.insertHandler=f;this.createDivs();this.createUi();
this.refresh();var g=mxUtils.bind(this,function(R){null==R&&(R=window.event);return l.isEditing()||null!=R&&this.isSelectionAllowed(R)});this.container==document.body&&(this.menubarContainer.onselectstart=g,this.menubarContainer.onmousedown=g,this.toolbarContainer.onselectstart=g,this.toolbarContainer.onmousedown=g,this.diagramContainer.onselectstart=g,this.diagramContainer.onmousedown=g,this.sidebarContainer.onselectstart=g,this.sidebarContainer.onmousedown=g,this.formatContainer.onselectstart=g,
this.formatContainer.onmousedown=g,this.footerContainer.onselectstart=g,this.footerContainer.onmousedown=g,null!=this.tabContainer&&(this.tabContainer.onselectstart=g));!this.editor.chromeless||this.editor.editable?(d=function(R){if(null!=R){var Y=mxEvent.getSource(R);if("A"==Y.nodeName)for(;null!=Y;){if("geHint"==Y.className)return!0;Y=Y.parentNode}}return g(R)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var u=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
+d):this.diagramContainer.oncontextmenu=d):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(d=l.view.getDrawPane().ownerSVGElement,null!=d&&(d.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=l.graphHandler){var v=l.graphHandler.start;l.graphHandler.start=function(){null!=pa.hoverIcons&&pa.hoverIcons.reset();v.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(R){var Y=
mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(R)-Y.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(R)-Y.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var y=!1,C=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return y||C.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(R){32!=R.which||l.isEditing()?mxEvent.isConsumed(R)||
27!=R.keyCode||this.hideDialog(null,!0):(y=!0,this.hoverIcons.reset(),l.container.style.cursor="move",l.isEditing()||mxEvent.getSource(R)!=l.container||mxEvent.consume(R))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(R){l.container.style.cursor="";y=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||y||mxEvent.isMouseEvent(R.getEvent())&&
(this.usePopupTrigger||!mxEvent.isPopupTrigger(R.getEvent()))&&(!mxEvent.isControlDown(R.getEvent())&&mxEvent.isRightMouseButton(R.getEvent())||mxEvent.isMiddleMouseButton(R.getEvent()))};var D=l.cellEditor.isStopEditingEvent;l.cellEditor.isStopEditingEvent=function(R){return D.apply(this,arguments)||13==R.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(R)||mxClient.IS_MAC&&mxEvent.isMetaDown(R)||mxClient.IS_SF&&mxEvent.isShiftDown(R))};var N=l.isZoomWheelEvent;l.isZoomWheelEvent=function(){return y||
-N.apply(this,arguments)};var G=!1,ha=null,ka=null,ja=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var R=this.toolbar.container.firstChild,Y=[];null!=R;){var Z=R.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,R)&&(R.parentNode.removeChild(R),Y.push(R));R=Z}R=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var la=0;la<ja.length;la++)this.toolbar.container.appendChild(ja[la]);this.toolbar.fontMenu=
-ha;this.toolbar.sizeMenu=ka}G=l.cellEditor.isContentEditing();ha=R;ka=Z;ja=Y}}),pa=this,qa=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){qa.apply(this,arguments);ca();if(l.cellEditor.isContentEditing()){var R=!1,Y=function(){R||(R=!0,window.setTimeout(function(){var Z=l.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=pa.toolbar&&(pa.toolbar.setFontName(Graph.stripQuotes(Z.fontFamily)),pa.toolbar.setFontSize(parseInt(Z.fontSize))));R=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
+N.apply(this,arguments)};var G=!1,ia=null,ka=null,ja=null,ca=mxUtils.bind(this,function(){if(null!=this.toolbar&&G!=l.cellEditor.isContentEditing()){for(var R=this.toolbar.container.firstChild,Y=[];null!=R;){var Z=R.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,R)&&(R.parentNode.removeChild(R),Y.push(R));R=Z}R=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;if(null==ja)this.toolbar.createTextToolbar();else{for(var la=0;la<ja.length;la++)this.toolbar.container.appendChild(ja[la]);this.toolbar.fontMenu=
+ia;this.toolbar.sizeMenu=ka}G=l.cellEditor.isContentEditing();ia=R;ka=Z;ja=Y}}),pa=this,ra=l.cellEditor.startEditing;l.cellEditor.startEditing=function(){ra.apply(this,arguments);ca();if(l.cellEditor.isContentEditing()){var R=!1,Y=function(){R||(R=!0,window.setTimeout(function(){var Z=l.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=pa.toolbar&&(pa.toolbar.setFontName(Graph.stripQuotes(Z.fontFamily)),pa.toolbar.setFontSize(parseInt(Z.fontSize))));R=!1},0))};mxEvent.addListener(l.cellEditor.textarea,
"input",Y);mxEvent.addListener(l.cellEditor.textarea,"touchend",Y);mxEvent.addListener(l.cellEditor.textarea,"mouseup",Y);mxEvent.addListener(l.cellEditor.textarea,"keyup",Y);Y()}};var L=l.cellEditor.stopEditing;l.cellEditor.stopEditing=function(R,Y){try{L.apply(this,arguments),ca()}catch(Z){pa.handleError(Z)}};l.container.setAttribute("tabindex","0");l.container.style.cursor="default";if(window.self===window.top&&null!=l.container.parentNode)try{l.container.focus()}catch(R){}var V=l.fireMouseEvent;
l.fireMouseEvent=function(R,Y,Z){R==mxEvent.MOUSE_DOWN&&this.container.focus();V.apply(this,arguments)};l.popupMenuHandler.autoExpand=!0;null!=this.menus&&(l.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(R,Y,Z){this.menus.createPopupMenu(R,Y,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(R){l.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};l.connectionHandler.addListener(mxEvent.CONNECT,function(R,
Y){var Z=[Y.getProperty("cell")];Y.getProperty("terminalInserted")&&(Z.push(Y.getProperty("terminal")),window.setTimeout(function(){null!=pa.hoverIcons&&pa.hoverIcons.update(l.view.getState(Z[Z.length-1]))},0));f(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(R,Y){var Z=Y.getProperty("cells"),la=R=!1;if(0<Z.length)for(var q=0;q<Z.length&&(R=l.getModel().isVertex(Z[q])||R,!(la=l.getModel().isEdge(Z[q])||la)||!R);q++);else la=R=!0;R=R&&!S;la=la&&!H;Z=Y.getProperty("keys");Y=Y.getProperty("values");
@@ -2119,9 +2119,9 @@ b.vertices.push(d);var B=k.getCellGeometry(d);if(null!=B&&(0<B.width?null==b.wid
!1);d=k.view.getState(d);null!=d&&(b.autoSize=b.autoSize||k.isAutoSizeState(d),b.glass=b.glass&&k.isGlassState(d),b.rounded=b.rounded&&k.isRoundedState(d),b.lineJumps=b.lineJumps&&k.isLineJumpState(d),b.image=b.image&&k.isImageState(d),b.shadow=b.shadow&&k.isShadowState(d),b.fill=b.fill&&k.isFillState(d),b.stroke=b.stroke&&k.isStrokeState(d),p=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(d.style,b.style,l))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,d=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&d.hideShapePicker()}));var k=mxUtils.bind(this,function(){d.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var l=b.popupMenuHandler.isMenuShowing;
b.popupMenuHandler.isMenuShowing=function(){return l.apply(this,arguments)||null!=d.shapePicker};var B=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==d.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))B.apply(this,arguments);else{var K=mxUtils.convertPoint(this.container,mxEvent.getClientX(S),mxEvent.getClientY(S));mxEvent.consume(S);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,g){var u=b.getCompositeParent(S.cell);e=b.getCellGeometry(u);for(K.consume();null!=u&&b.model.isVertex(u)&&null!=e&&e.relative;)cell=
-u,u=b.model.getParent(cell),e=b.getCellGeometry(u);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.getGraphX(),K.getGraphY(),u,mxUtils.bind(this,function(y){g(y);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(y))}),H)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
-H.getProperty("arrow"),Q=H.getProperty("direction"),e=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var u=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),y=d.showShapePicker(g,f,u,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(u,Q,b.defaultEdgeLength,e,!0,!0,function(I,D,N){N(C);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(C))},
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){d.hideShapePicker();p.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(S,H,K){var Q=K.getEvent();this.graph.isCloneEvent(Q)||mxEvent.isShiftDown(Q)?E.apply(this,arguments):this.graph.connectVertex(S.cell,H,this.graph.defaultEdgeLength,Q,null,null,mxUtils.bind(this,function(e,f,g){var v=b.getCompositeParent(S.cell);e=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=e&&e.relative;)cell=
+v,v=b.model.getParent(cell),e=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){d.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(y){g(y);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(y))}),H)}),30)}),mxUtils.bind(this,function(e){this.graph.selectCellsForConnectVertex(e,Q,this)}))};var M=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M);M=window.setTimeout(mxUtils.bind(this,function(){var K=
+H.getProperty("arrow"),Q=H.getProperty("direction"),e=H.getProperty("event");K=K.getBoundingClientRect();var f=mxUtils.getOffset(b.container),g=b.container.scrollLeft+K.x-f.x;f=b.container.scrollTop+K.y-f.y;var v=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),y=d.showShapePicker(g,f,v,mxUtils.bind(this,function(C){null!=C&&b.connectVertex(v,Q,b.defaultEdgeLength,e,!0,!0,function(I,D,N){N(C);null!=d.hoverIcons&&d.hoverIcons.update(b.view.getState(C))},
function(I){b.selectCellsForConnectVertex(I)},e,this.hoverIcons)}),Q,!0);this.centerShapePicker(y,K,g,f,Q);mxUtils.setOpacity(y,30);mxEvent.addListener(y,"mouseenter",function(){mxUtils.setOpacity(y,100)});mxEvent.addListener(y,"mouseleave",function(){d.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
EditorUi.prototype.centerShapePicker=function(b,d,k,l,B){if(B==mxConstants.DIRECTION_EAST||B==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();B==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):B==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=d.height+6):B==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):B==mxConstants.DIRECTION_EAST&&(k+=d.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
EditorUi.prototype.showShapePicker=function(b,d,k,l,B,p){b=this.createShapePicker(b,d,k,l,B,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,p),p);null!=b&&(null==this.hoverIcons||p||this.hoverIcons.reset(),p=this.editor.graph,p.popupMenuHandler.hideMenu(),p.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=l,this.shapePicker=b);return b};
@@ -2148,9 +2148,9 @@ EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipb
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var l=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){l.apply(this,arguments);b.updatePasteActionStates()};var B=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){B.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var Z=this.graph.getPageLayout(),la=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+Z.x*la.width),this.scale*(this.translate.y+Z.y*la.height),this.scale*Z.width*la.width,
-this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var d=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),ba=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
-fa=mxRectangle.fromRectangle(T);fa.x=fa.x/da-U.x;fa.y=fa.y/da-U.y;fa.width/=da;fa.height/=da;U=b.container.scrollTop;var na=b.container.scrollLeft,sa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)sa+=3;var za=b.container.offsetWidth-sa;sa=b.container.offsetHeight-sa;Z=Z?Math.max(.3,Math.min(la||1,za/fa.width)):da;la=(za-Z*fa.width)/2/Z;var ua=0==this.lightboxVerticalDivider?0:(sa-Z*fa.height)/this.lightboxVerticalDivider/Z;ba&&(la=Math.max(la,0),ua=Math.max(ua,
-0));if(ba||T.width<za||T.height<sa)b.view.scaleAndTranslate(Z,Math.floor(la-fa.x),Math.floor(ua-fa.y)),b.container.scrollTop=U*Z/da,b.container.scrollLeft=na*Z/da;else if(0!=q||0!=F)T=b.view.translate,b.view.setTranslate(Math.floor(T.x+q/da),Math.floor(T.y+F/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+this.scale*Z.height*la.height)};b.getPreferredPageSize=function(Z,la,q){Z=this.getPageLayout();la=this.getPageSize();return new mxRectangle(0,0,Z.width*la.width,Z.height*la.height)};var d=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=d=mxUtils.bind(this,function(Z,la,q,F){if(null!=b.container&&!b.isViewer()){q=null!=q?q:0;F=null!=F?F:0;var T=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
+fa=mxRectangle.fromRectangle(T);fa.x=fa.x/da-U.x;fa.y=fa.y/da-U.y;fa.width/=da;fa.height/=da;U=b.container.scrollTop;var na=b.container.scrollLeft,sa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)sa+=3;var za=b.container.offsetWidth-sa;sa=b.container.offsetHeight-sa;Z=Z?Math.max(.3,Math.min(la||1,za/fa.width)):da;la=(za-Z*fa.width)/2/Z;var ua=0==this.lightboxVerticalDivider?0:(sa-Z*fa.height)/this.lightboxVerticalDivider/Z;aa&&(la=Math.max(la,0),ua=Math.max(ua,
+0));if(aa||T.width<za||T.height<sa)b.view.scaleAndTranslate(Z,Math.floor(la-fa.x),Math.floor(ua-fa.y)),b.container.scrollTop=U*Z/da,b.container.scrollLeft=na*Z/da;else if(0!=q||0!=F)T=b.view.translate,b.view.setTranslate(Math.floor(T.x+q/da),Math.floor(T.y+F/da))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var l=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",l);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",l)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(Z){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(Z){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var B=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var Z=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=Z?parseInt(Z["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var E=0;p=mxUtils.bind(this,function(Z,la,q){E++;
@@ -2158,7 +2158,7 @@ var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRi
M;mxEvent.consume(Z)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(Z){this.actions.get("previousPage").funct();mxEvent.consume(Z)}),Editor.previousImage,mxResources.get("previousPage")),H=document.createElement("div");H.style.fontFamily=Editor.defaultHtmlFont;H.style.display="inline-block";H.style.verticalAlign="top";H.style.fontWeight="bold";H.style.marginTop="8px";H.style.fontSize="14px";H.style.color=mxClient.IS_IE||mxClient.IS_IE11?
"#000000":"#ffffff";this.chromelessToolbar.appendChild(H);var K=p(mxUtils.bind(this,function(Z){this.actions.get("nextPage").funct();mxEvent.consume(Z)}),Editor.nextImage,mxResources.get("nextPage")),Q=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(H.innerText="",mxUtils.write(H,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});S.style.paddingLeft="0px";S.style.paddingRight="4px";K.style.paddingLeft="4px";K.style.paddingRight=
"0px";var e=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(K.style.display="",S.style.display="",H.style.display="inline-block"):(K.style.display="none",S.style.display="none",H.style.display="none");Q()});this.editor.addListener("resetGraphView",e);this.editor.addListener("pageSelected",Q)}p(mxUtils.bind(this,function(Z){this.actions.get("zoomOut").funct();mxEvent.consume(Z)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,
-function(Z){this.actions.get("zoomIn").funct();mxEvent.consume(Z)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(Z){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Z)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,g=null,u=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);f=window.setTimeout(mxUtils.bind(this,
+function(Z){this.actions.get("zoomIn").funct();mxEvent.consume(Z)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(Z){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(Z)}),Editor.zoomFitImage,mxResources.get("fit"));var f=null,g=null,v=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);f=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(this.chromelessToolbar,0);f=null;g=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";g=null}),600)}),Z||200)}),y=mxUtils.bind(this,function(Z){null!=f&&(window.clearTimeout(f),f=null);null!=g&&(window.clearTimeout(g),g=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,Z||30)});if("1"==urlParams.layers){this.layersDialog=null;var C=p(mxUtils.bind(this,function(Z){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var la=C.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
"4px 2px 4px 2px";this.layersDialog.style.left=la.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));la=mxUtils.getCurrentStyle(this.editor.graph.container);
@@ -2166,21 +2166,21 @@ this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDi
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(Z)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(e=0;e<this.lightboxToolbarActions.length;e++){var D=this.lightboxToolbarActions[e];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=B.refreshBtn){var N=null==B.refreshBtn.url?null:Graph.sanitizeLink(B.refreshBtn.url);
p(mxUtils.bind(this,function(Z){null!=N?window.location.href=N:window.location.reload();mxEvent.consume(Z)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=B.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){B.fullscreenBtn.url?b.openLink(B.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(B.closeBtn&&window.self===window.top||b.lightbox&&("1"==
urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||B.closeBtn?window.close():(this.destroy(),mxEvent.consume(Z))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,
-function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||y(30),u())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?u():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?u():y(100);
+function(Z){mxEvent.isTouchEvent(Z)||(mxEvent.isShiftDown(Z)||y(30),v())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(Z){mxEvent.consume(Z)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(Z){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(Z)?v():y(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():y(100);
mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||y(30)}));var G=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(Z,la){this.startX=la.getGraphX();this.startY=la.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(Z,la){},mouseUp:function(Z,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<
-G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?u():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ha=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
-0)*la.width;this.translate.y=Z.y-(this.y0||0)*la.height}ha.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Z=this.getPageLayout(),la=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*la.x+Z.width*q.width),T=Math.ceil(2*la.y+Z.height*q.height),ba=b.minimumGraphSize;if(null==ba||ba.width!=F||ba.height!=T)b.minimumGraphSize=new mxRectangle(0,0,F,T);F=la.x-Z.x*q.width;la=la.y-Z.y*q.height;
+G&&Math.abs(this.scrollTop-b.container.scrollTop)<G&&Math.abs(this.startX-la.getGraphX())<G&&Math.abs(this.startY-la.getGraphY())<G&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?v():y(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var ia=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var Z=this.graph.getPagePadding(),la=this.graph.getPageSize();this.translate.x=Z.x-(this.x0||
+0)*la.width;this.translate.y=Z.y-(this.y0||0)*la.height}ia.apply(this,arguments)};if(!b.isViewer()){var ka=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var Z=this.getPageLayout(),la=this.getPagePadding(),q=this.getPageSize(),F=Math.ceil(2*la.x+Z.width*q.width),T=Math.ceil(2*la.y+Z.height*q.height),aa=b.minimumGraphSize;if(null==aa||aa.width!=F||aa.height!=T)b.minimumGraphSize=new mxRectangle(0,0,F,T);F=la.x-Z.x*q.width;la=la.y-Z.y*q.height;
this.autoTranslate||this.view.translate.x==F&&this.view.translate.y==la?ka.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=Z.x,this.view.y0=Z.y,Z=b.view.translate.x,q=b.view.translate.y,b.view.setTranslate(F,la),b.container.scrollLeft+=Math.round((F-Z)*b.view.scale),b.container.scrollTop+=Math.round((la-q)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ja=b.view.getBackgroundPane(),ca=b.view.getDrawPane();b.cumulativeZoomFactor=
-1;var pa=null,qa=null,L=null,V=null,R=null,Y=function(Z){null!=pa&&window.clearTimeout(pa);0<=Z&&window.setTimeout(function(){if(!b.isMouseDown||V)pa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin=
-"",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var la=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,T=0,ba=0;null!=qa&&(T=b.container.offsetWidth/2-qa.x+q.x,ba=b.container.offsetHeight/2-qa.y+q.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,ba+=la.y-L.y),null!=d&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),ba*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==ba||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=ba*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=qa=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(Z,la,q,F){F=null!=F?F:this.zoomFactor;(la=la||!b.scrollbars)&&(qa=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Z?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==R&&""!=ca.getAttribute("filter")&&(R=ca.getAttribute("filter"),ca.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Z=la||null==qa?b.container.scrollLeft+
-b.container.clientWidth/2:qa.x+b.container.scrollLeft-b.container.offsetLeft,F=la||null==qa?b.container.scrollTop+b.container.clientHeight/2:qa.y+b.container.scrollTop-b.container.offsetTop,ca.style.transformOrigin=Z+"px "+F+"px",ca.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=Z+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,
-"transform-origin",(la||null==qa?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":qa.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(la||null==qa?b.container.clientHeight/2+b.container.scrollTop-Z.offsetTop+"px":qa.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+1;var pa=null,ra=null,L=null,V=null,R=null,Y=function(Z){null!=pa&&window.clearTimeout(pa);0<=Z&&window.setTimeout(function(){if(!b.isMouseDown||V)pa=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),ca.style.transformOrigin="",ja.style.transformOrigin=
+"",mxClient.IS_SF?(ca.style.transform="scale(1)",ja.style.transform="scale(1)",window.setTimeout(function(){ca.style.transform="";ja.style.transform=""},0)):(ca.style.transform="",ja.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var la=new mxPoint(b.container.scrollLeft,b.container.scrollTop),q=mxUtils.getOffset(b.container),F=b.view.scale,T=0,aa=0;null!=ra&&(T=b.container.offsetWidth/2-ra.x+q.x,aa=b.container.offsetHeight/2-ra.y+q.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=d&&k.chromelessResize(!1,null,T*(b.cumulativeZoomFactor-1),aa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==T&&0==aa||(b.container.scrollLeft-=T*(b.cumulativeZoomFactor-1),b.container.scrollTop-=aa*(b.cumulativeZoomFactor-1)));null!=R&&ca.setAttribute("filter",R);b.cumulativeZoomFactor=1;R=V=ra=L=pa=null}),null!=Z?Z:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(Z,la,q,F){F=null!=F?F:this.zoomFactor;(la=la||!b.scrollbars)&&(ra=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));Z?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=F,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==R&&""!=ca.getAttribute("filter")&&(R=ca.getAttribute("filter"),ca.removeAttribute("filter")),L=new mxPoint(b.container.scrollLeft,b.container.scrollTop),Z=la||null==ra?b.container.scrollLeft+
+b.container.clientWidth/2:ra.x+b.container.scrollLeft-b.container.offsetLeft,F=la||null==ra?b.container.scrollTop+b.container.clientHeight/2:ra.y+b.container.scrollTop-b.container.offsetTop,ca.style.transformOrigin=Z+"px "+F+"px",ca.style.transform="scale("+this.cumulativeZoomFactor+")",ja.style.transformOrigin=Z+"px "+F+"px",ja.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(Z=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(Z.style,
+"transform-origin",(la||null==ra?b.container.clientWidth/2+b.container.scrollLeft-Z.offsetLeft+"px":ra.x+b.container.scrollLeft-Z.offsetLeft-b.container.offsetLeft+"px")+" "+(la||null==ra?b.container.clientHeight/2+b.container.scrollTop-Z.offsetTop+"px":ra.y+b.container.scrollTop-Z.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(Z.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
k.hoverIcons.reset());Y(b.isFastZoomEnabled()?q:0)};mxEvent.addGestureListeners(b.container,function(Z){null!=pa&&window.clearTimeout(pa)},null,function(Z){1!=b.cumulativeZoomFactor&&Y(0)});mxEvent.addListener(b.container,"scroll",function(Z){null==pa||b.isMouseDown||1==b.cumulativeZoomFactor||Y(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(Z,la,q,F,T){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!q&&b.isScrollWheelEvent(Z))q=
-b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(Z)?b.view.setTranslate(q.x+(la?-F:F),q.y):b.view.setTranslate(q.x,q.y+(la?F:-F));else if(q||b.isZoomWheelEvent(Z))for(var ba=mxEvent.getSource(Z);null!=ba;){if(ba==b.container)return b.tooltipHandler.hideTooltip(),qa=null!=F&&null!=T?new mxPoint(F,T):new mxPoint(mxEvent.getClientX(Z),mxEvent.getClientY(Z)),V=q,q=b.zoomFactor,F=null,Z.ctrlKey&&null!=Z.deltaY&&40>Math.abs(Z.deltaY)&&Math.round(Z.deltaY)!=Z.deltaY?q=1+Math.abs(Z.deltaY)/20*
-(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;ba=ba.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
+b.view.getTranslate(),F=40/b.view.scale,mxEvent.isShiftDown(Z)?b.view.setTranslate(q.x+(la?-F:F),q.y):b.view.setTranslate(q.x,q.y+(la?F:-F));else if(q||b.isZoomWheelEvent(Z))for(var aa=mxEvent.getSource(Z);null!=aa;){if(aa==b.container)return b.tooltipHandler.hideTooltip(),ra=null!=F&&null!=T?new mxPoint(F,T):new mxPoint(mxEvent.getClientX(Z),mxEvent.getClientY(Z)),V=q,q=b.zoomFactor,F=null,Z.ctrlKey&&null!=Z.deltaY&&40>Math.abs(Z.deltaY)&&Math.round(Z.deltaY)!=Z.deltaY?q=1+Math.abs(Z.deltaY)/20*
+(q-1):null!=Z.movementY&&"pointermove"==Z.type&&(q=1+Math.max(1,Math.abs(Z.movementY))/20*(q-1),F=-1),b.lazyZoom(la,null,F,q),mxEvent.consume(Z),!1;aa=aa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(Z){b.cumulativeZoomFactor=Z.scale;b.lazyZoom(0<Z.scale,!0);mxEvent.consume(Z)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(d){this.actions.get("print").funct();mxEvent.consume(d)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var d=urlParams.border,k=60;null!=d&&(k=parseInt(d));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2258,13 +2258,13 @@ EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(thi
EditorUi.prototype.showBackgroundImageDialog=function(b,d){b=null!=b?b:mxUtils.bind(this,function(l){l=new ChangePageSetup(this,null,l);l.ignoreColor=!0;this.editor.graph.model.execute(l)});var k=mxUtils.prompt(mxResources.get("backgroundImage"),null!=d?d.src:"");null!=k&&0<k.length?(d=new Image,d.onload=function(){b(new mxImage(k,d.width,d.height),!1)},d.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},d.src=k):b(null)};
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,d,k){mxUtils.confirm(b)?null!=d&&d():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var d=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){d.update(!1)});return d};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var g=l.getCompositeParents(l.getSelectionCells()),u=0<g.length?g[0]:null;if(null!=u)if(f){l.getModel().beginUpdate();try{for(u=0;u<g.length;u++)if(l.getModel().isVertex(g[u])&&l.isCellResizable(g[u])){var y=l.getCellGeometry(g[u]);null!=y&&(y=y.clone(),37==Q?y.width=Math.max(0,y.width-e):38==Q?y.height=Math.max(0,y.height-e):39==Q?y.width+=e:40==Q&&(y.height+=e),l.getModel().setGeometry(g[u],
-y))}}finally{l.getModel().endUpdate()}}else{y=l.model.getParent(u);var C=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(u)&&null!=l.layoutManager&&!l.isCellLocked(u)&&(f=l.layoutManager.getLayout(y));if(null!=f&&f.constructor==mxStackLayout)e=y.getIndex(u),37==Q||38==Q?l.model.add(y,u,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(y,u,Math.min(l.model.getChildCount(y),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(u,0,0,g),null!=I.first&&(u=g=0,37==Q?g=-e:38==
-Q?u=-e:39==Q?g=e:40==Q&&(u=e),I.currentDx+=g*C,I.currentDy+=u*C,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/C),N=I.roundLength(I.currentDy/C);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,B=new mxKeyHandler(l),p=B.isEventIgnored;B.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
+EditorUi.prototype.createKeyHandler=function(b){function d(Q,e,f){if(!l.isSelectionEmpty()&&l.isEnabled()){e=null!=e?e:1;var g=l.getCompositeParents(l.getSelectionCells()),v=0<g.length?g[0]:null;if(null!=v)if(f){l.getModel().beginUpdate();try{for(v=0;v<g.length;v++)if(l.getModel().isVertex(g[v])&&l.isCellResizable(g[v])){var y=l.getCellGeometry(g[v]);null!=y&&(y=y.clone(),37==Q?y.width=Math.max(0,y.width-e):38==Q?y.height=Math.max(0,y.height-e):39==Q?y.width+=e:40==Q&&(y.height+=e),l.getModel().setGeometry(g[v],
+y))}}finally{l.getModel().endUpdate()}}else{y=l.model.getParent(v);var C=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(y));if(null!=f&&f.constructor==mxStackLayout)e=y.getIndex(v),37==Q||38==Q?l.model.add(y,v,Math.max(0,e-1)):(39==Q||40==Q)&&l.model.add(y,v,Math.min(l.model.getChildCount(y),e+1));else{var I=l.graphHandler;null!=I&&(null==I.first&&I.start(v,0,0,g),null!=I.first&&(v=g=0,37==Q?g=-e:38==
+Q?v=-e:39==Q?g=e:40==Q&&(v=e),I.currentDx+=g*C,I.currentDy+=v*C,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/C),N=I.roundLength(I.currentDy/C);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,B=new mxKeyHandler(l),p=B.isEventIgnored;B.isEventIgnored=function(Q){return!(mxEvent.isShiftDown(Q)&&9==Q.keyCode)&&(!this.isControlDown(Q)||mxEvent.isShiftDown(Q)||90!=Q.keyCode&&
89!=Q.keyCode&&188!=Q.keyCode&&190!=Q.keyCode&&85!=Q.keyCode)&&(66!=Q.keyCode&&73!=Q.keyCode||!this.isControlDown(Q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};B.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};B.isControlDown=function(Q){return mxEvent.isControlDown(Q)||mxClient.IS_MAC&&Q.metaKey};var E=null,M={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=B.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var e=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=e)return e.funct}if(null!=M[Q.keyCode]&&!l.isSelectionEmpty())if(!this.isControlDown(Q)&&mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){if(l.model.isVertex(l.getSelectionCell()))return function(){var f=l.connectVertex(l.getSelectionCell(),M[Q.keyCode],
l.defaultEdgeLength,Q,!0);null!=f&&0<f.length&&(1==f.length&&l.model.isEdge(f[0])?l.setSelectionCell(l.model.getTerminal(f[0],!1)):l.setSelectionCell(f[f.length-1]),l.scrollCellToVisible(l.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(l.view.getState(l.getSelectionCell())))}}else return this.isControlDown(Q)?function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){d(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};B.bindAction=mxUtils.bind(this,
-function(Q,e,f,g){var u=this.actions.get(f);null!=u&&(f=function(){u.isEnabled()&&u.funct.apply(this,arguments)},e?g?B.bindControlShiftKey(Q,f):B.bindControlKey(Q,f):g?B.bindShiftKey(Q,f):B.bindKey(Q,f))});var H=this,K=B.escape;B.escape=function(Q){K.apply(this,arguments)};B.enter=function(){};B.bindControlShiftKey(36,function(){l.exitGroup()});B.bindControlShiftKey(35,function(){l.enterGroup()});B.bindShiftKey(36,function(){l.home()});B.bindKey(35,function(){l.refresh()});B.bindAction(107,!0,"zoomIn");
+function(Q,e,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},e?g?B.bindControlShiftKey(Q,f):B.bindControlKey(Q,f):g?B.bindShiftKey(Q,f):B.bindKey(Q,f))});var H=this,K=B.escape;B.escape=function(Q){K.apply(this,arguments)};B.enter=function(){};B.bindControlShiftKey(36,function(){l.exitGroup()});B.bindControlShiftKey(35,function(){l.enterGroup()});B.bindShiftKey(36,function(){l.home()});B.bindKey(35,function(){l.refresh()});B.bindAction(107,!0,"zoomIn");
B.bindAction(109,!0,"zoomOut");B.bindAction(80,!0,"print");B.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)B.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),B.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),B.bindControlKey(13,function(){H.ctrlEnter()}),B.bindAction(8,!1,"delete"),B.bindAction(8,!0,"deleteAll"),B.bindAction(8,!1,"deleteLabels",!0),B.bindAction(46,!1,"delete"),B.bindAction(46,!0,"deleteAll"),B.bindAction(46,!1,"deleteLabels",
!0),B.bindAction(36,!1,"resetView"),B.bindAction(72,!0,"fitWindow",!0),B.bindAction(74,!0,"fitPage"),B.bindAction(74,!0,"fitTwoPages",!0),B.bindAction(48,!0,"customZoom"),B.bindAction(82,!0,"turn"),B.bindAction(82,!0,"clearDefaultStyle",!0),B.bindAction(83,!0,"save"),B.bindAction(83,!0,"saveAs",!0),B.bindAction(65,!0,"selectAll"),B.bindAction(65,!0,"selectNone",!0),B.bindAction(73,!0,"selectVertices",!0),B.bindAction(69,!0,"selectEdges",!0),B.bindAction(69,!0,"editStyle"),B.bindAction(66,!0,"bold"),
B.bindAction(66,!0,"toBack",!0),B.bindAction(70,!0,"toFront",!0),B.bindAction(68,!0,"duplicate"),B.bindAction(68,!0,"setAsDefaultStyle",!0),B.bindAction(90,!0,"undo"),B.bindAction(89,!0,"autosize",!0),B.bindAction(88,!0,"cut"),B.bindAction(67,!0,"copy"),B.bindAction(86,!0,"paste"),B.bindAction(71,!0,"group"),B.bindAction(77,!0,"editData"),B.bindAction(71,!0,"grid",!0),B.bindAction(73,!0,"italic"),B.bindAction(76,!0,"lockUnlock"),B.bindAction(76,!0,"layers",!0),B.bindAction(80,!0,"format",!0),B.bindAction(85,
@@ -2300,16 +2300,16 @@ this.connectionHandler.isValidSource=function(L,V){return!1};this.alternateEdgeS
R+Y.y)*la,Z*la,R*la));for(F=1;F<q.height;F++)V.push(new mxRectangle((q.x*Z+Y.x)*la,((q.y+F)*R+Y.y)*la,Z*la,R*la));L=V.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,V){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
arguments)};var e=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=e.apply(this,arguments),R=new mxDictionary,Y=[],Z=0;Z<V.length;Z++){var la=this.graph.isTableCell(L)&&this.graph.isTableCell(V[Z])&&this.graph.isCellSelected(V[Z])?this.graph.model.getParent(V[Z]):this.graph.isTableRow(L)&&this.graph.isTableRow(V[Z])&&this.graph.isCellSelected(V[Z])?V[Z]:this.graph.getCompositeParent(V[Z]);null==la||R.get(la)||(R.put(la,!0),Y.push(la))}return Y};var f=this.graphHandler.start;
this.graphHandler.start=function(L,V,R,Y){var Z=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?Z=!0:L=this.graph.model.getParent(L));Z||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));f.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(L,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var g=new mxRubberband(this);this.getRubberband=function(){return g};
-var u=(new Date).getTime(),y=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;C.apply(this,arguments);L!=this.currentState?(u=(new Date).getTime(),y=0):y=(new Date).getTime()-u};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<y||(null==this.currentState||
+var v=(new Date).getTime(),y=0,C=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;C.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),y=0):y=(new Date).getTime()-v};var I=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<y||(null==this.currentState||
"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&I.apply(this,arguments)};var D=this.isToggleEvent;this.isToggleEvent=function(L){return D.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var N=g.isForceRubberbandEvent;g.isForceRubberbandEvent=function(L){return N.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};
-var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=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=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var ha=this.click;this.click=function(L){var V=null==L.state&&null!=
-L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ha.apply(this,arguments);var R=V?L.sourceState.cell:L.getCell();null!=R&&(R=this.getClickableLinkForCell(R),null!=R&&(this.isCustomLink(R)?this.customLinkClicked(R):this.openLink(R)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var ka=this.tooltipHandler.show;this.tooltipHandler.show=function(){ka.apply(this,arguments);if(null!=
+var G=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(G=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=G)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var ia=this.click;this.click=function(L){var V=null==L.state&&null!=
+L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!V||L.isConsumed())return ia.apply(this,arguments);var R=V?L.sourceState.cell:L.getCell();null!=R&&(R=this.getClickableLinkForCell(R),null!=R&&(this.isCustomLink(R)?this.customLinkClicked(R):this.openLink(R)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var ka=this.tooltipHandler.show;this.tooltipHandler.show=function(){ka.apply(this,arguments);if(null!=
this.div)for(var L=this.div.getElementsByTagName("a"),V=0;V<L.length;V++)null!=L[V].getAttribute("href")&&null==L[V].getAttribute("target")&&L[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var V=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(V?L.sourceState.cell:L.getCell())};var ja=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||
this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ja.apply(this,arguments)};this.selectRegion=function(L,V){var R=mxEvent.isAltDown(V)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,R,function(Y){return"1"==mxUtils.getValue(Y.style,"locked","0")},!0);if(this.isToggleEvent(V))for(R=0;R<L.length;R++)this.selectCellForEvent(L[R],V);else this.selectCellsForEvent(L,V);return L};var ca=this.graphHandler.shouldRemoveCellsFromParent;
this.graphHandler.shouldRemoveCellsFromParent=function(L,V,R){return this.graph.isCellSelected(L)?!1:ca.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};var pa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){"mouseDown"==V.getProperty("eventName")&&(L=V.getProperty("event").getState(),pa=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?
null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,V){if(!mxEvent.isMultiTouchEvent(V)){L=V.getProperty("event");var R=V.getProperty("cell");null==R?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),g.start(L.x,L.y)):null!=pa?this.addSelectionCells(pa):1<this.getSelectionCount()&&this.isCellSelected(R)&&this.removeSelectionCell(R);pa=null;V.consume()}}));this.connectionHandler.selectCells=function(L,V){this.graph.setSelectionCell(V||
L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,V){var R=L.view.graph;return V&&(R.isCellSelected(L.cell)||R.isTableRow(L.cell)&&R.selectionCellsHandler.isHandled(R.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&
-this.initTouch();var qa=this.updateMouseEvent;this.updateMouseEvent=function(L){L=qa.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(L){L=ra.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};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);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
@@ -2381,8 +2381,8 @@ Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEve
Graph.prototype.getGlobalVariable=function(b){var d=null;"date"==b?d=(new Date).toLocaleDateString():"time"==b?d=(new Date).toLocaleTimeString():"timestamp"==b?d=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),d=this.formatDate(new Date,b));return d};
Graph.prototype.formatDate=function(b,d,k){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 l=this.dateFormatCache,B=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,p=/[^-+\dA-Z]/g,E=function(C,I){C=String(C);for(I=I||2;C.length<I;)C="0"+C;return C};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),e=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var u=k?0:b.getTimezoneOffset(),y={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
-12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:k?"UTC":(String(b).match(B)||[""]).pop().replace(p,""),o:(0<u?"-":"+")+E(100*Math.floor(Math.abs(u)/60)+Math.abs(u)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in y?y[C]:C.slice(1,
+/\d/.test(b)||(d=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");d=String(l.masks[d]||d||l.masks["default"]);"UTC:"==d.slice(0,4)&&(d=d.slice(4),k=!0);var M=k?"getUTC":"get",S=b[M+"Date"](),H=b[M+"Day"](),K=b[M+"Month"](),Q=b[M+"FullYear"](),e=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),y={d:S,dd:E(S),ddd:l.i18n.dayNames[H],dddd:l.i18n.dayNames[H+7],m:K+1,mm:E(K+1),mmm:l.i18n.monthNames[K],mmmm:l.i18n.monthNames[K+
+12],yy:String(Q).slice(2),yyyy:Q,h:e%12||12,hh:E(e%12||12),H:e,HH:E(e),M:f,MM:E(f),s:g,ss:E(g),l:E(M,3),L:E(99<M?Math.round(M/10):M),t:12>e?"a":"p",tt:12>e?"am":"pm",T:12>e?"A":"P",TT:12>e?"AM":"PM",Z:k?"UTC":(String(b).match(B)||[""]).pop().replace(p,""),o:(0<v?"-":"+")+E(100*Math.floor(Math.abs(v)/60)+Math.abs(v)%60,4),S:["th","st","nd","rd"][3<S%10?0:(10!=S%100-S%10)*S%10]};return d.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(C){return C in y?y[C]:C.slice(1,
C.length-1)})};Graph.prototype.getLayerForCells=function(b){var d=null;if(0<b.length){for(d=b[0];!this.model.isLayer(d);)d=this.model.getParent(d);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(d,b[k])){d=null;break}}return d};
Graph.prototype.createLayersDialog=function(b,d){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),B=l.getChildCount(l.root),p=0;p<B;p++)mxUtils.bind(this,function(E){function M(){l.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(H,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(H,25))}var S=this.convertValueToString(E)||mxResources.get("background")||"Background",H=document.createElement("div");H.style.overflow=
"hidden";H.style.textOverflow="ellipsis";H.style.padding="2px";H.style.whiteSpace="nowrap";H.style.cursor="pointer";H.setAttribute("title",mxResources.get(l.isVisible(E)?"hideIt":"show",[S]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";d&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
@@ -2397,9 +2397,9 @@ B)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect
Graph.prototype.isCloneConnectSource=function(b){var d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=d&&d.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,d,k,l,B,p,E,M){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),H=S?b:this.getCompositeParent(b),K=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(H.geometry.x,H.geometry.y);d==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):d==
mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=d==mxConstants.DIRECTION_WEST?K.x-k:K.x+(H.geometry.width+k),K.y+=H.geometry.height/2);var Q=this.view.getState(this.model.getParent(b));k=this.view.scale;var e=this.view.translate;H=e.x*k;e=e.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,e=Q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(K.x+=b.parent.geometry.x,K.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(H+K.x*k,e+K.y*k)).grow(40*k);p=null!=p?
-this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var u=0;u<p.length;u++)if(!this.isCellLocked(p[u])&&!this.model.isEdge(p[u])&&p[u]!=b)if(!this.model.isAncestor(b,p[u])&&this.isContainer(p[u])&&(null==f||p[u]==this.model.getParent(b)))f=p[u];else if(null==g&&this.isCellConnectable(p[u])&&!this.model.isAncestor(p[u],b)&&!this.isSwimlane(p[u])){var y=this.view.getState(p[u]);null==Q||null==y||mxUtils.intersects(Q,y)||(g=p[u])}}var C=
+this.getCells(0,0,0,0,null,null,p,null,!0):null;Q=this.view.getState(b);var f=null,g=null;if(null!=p){p=p.reverse();for(var v=0;v<p.length;v++)if(!this.isCellLocked(p[v])&&!this.model.isEdge(p[v])&&p[v]!=b)if(!this.model.isAncestor(b,p[v])&&this.isContainer(p[v])&&(null==f||p[v]==this.model.getParent(b)))f=p[v];else if(null==g&&this.isCellConnectable(p[v])&&!this.model.isAncestor(p[v],b)&&!this.isSwimlane(p[v])){var y=this.view.getState(p[v]);null==Q||null==y||mxUtils.intersects(Q,y)||(g=p[v])}}var C=
!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||B;C&&("1"!=urlParams.sketch||B)&&(d==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;B=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&C){var G=this.getAbsoluteParent(null!=N?N:b);G=S?b:this.getCompositeParent(G);D=null!=N?N:this.duplicateCells([G],
-!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ha=this.getCellGeometry(D);null!=ha&&(null!=N&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?K.y-=ha.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=ha.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-ha.width/2:K.x+ha.width/2),ha.x=K.x-ha.width/2,ha.y=K.y-ha.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):C&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
+!1)[0];null!=N&&this.addCells([D],this.model.getParent(b),null,null,null,!0);var ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(d==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:d==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=d==mxConstants.DIRECTION_WEST?K.x-ia.width/2:K.x+ia.width/2),ia.x=K.x-ia.width/2,ia.y=K.y-ia.height/2);null!=f?(this.addCells([D],f,null,null,null,!0),g=null):C&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
mxEvent.isShiftDown(l)&&C||null==g&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,D,this.createCurrentEdgeStyle());if(null!=ka&&this.connectionHandler.insertBeforeSource){var ja=null;for(N=b;null!=N.parent&&null!=N.geometry&&N.geometry.relative&&N.parent!=ka.parent;)N=this.model.getParent(N);null!=N&&null!=N.parent&&N.parent==ka.parent&&(ja=N.parent.getIndex(N),this.model.add(N.parent,ka,ja))}null==g&&null!=D&&null!=b.parent&&S&&d==mxConstants.DIRECTION_WEST&&(ja=b.parent.getIndex(b),this.model.add(b.parent,
D,ja));null!=ka&&I.push(ka);null==g&&null!=D&&I.push(D);null==D&&null!=ka&&ka.geometry.setTerminalPoint(K,!1);null!=ka&&this.fireEvent(new mxEventObject("cellsInserted","cells",[ka]))}finally{this.model.endUpdate()}}if(null!=M)M(I);else return I});if(null==E||null!=D||!C||null==g&&S)return B(D);E(H+K.x*k,e+K.y*k,B)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var d=document.createElement("div"),k=[],l,B=0;B<b.length;B++)if(l=b[B],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(d.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([d])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
@@ -2478,22 +2478,22 @@ TableLayout.prototype.getRowLayout=function(b,d){var k=this.graph.model.getChild
TableLayout.prototype.layoutRow=function(b,d,k,l){var B=this.graph.getModel(),p=B.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=d&&(d=d.slice(),d.splice(0,0,b.x));for(var S=0;S<p.length;S++){var H=this.graph.getCellGeometry(p[S]);null!=H&&(H=H.clone(),H.y=b.y,H.height=k-b.y-b.height,null!=d?(H.x=d[S],H.width=d[S+1]-H.x,S==p.length-1&&S<d.length-2&&(H.width=l-H.x-b.x-b.width)):(H.x=E,E+=H.width,S==p.length-1?H.width=l-b.x-b.width-M:M+=H.width),H.alternateBounds=new mxRectangle(0,
0,H.width,H.height),B.setGeometry(p[S],H))}return M};
TableLayout.prototype.execute=function(b){if(null!=b){var d=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),B="1"==mxUtils.getValue(l,"resizeLastRow","0"),p="1"==mxUtils.getValue(l,"resizeLast","0");l="1"==mxUtils.getValue(l,"fixedRows","0");var E=this.graph.getModel(),M=0;E.beginUpdate();try{for(var S=k.height-d.y-d.height,H=k.width-d.x-d.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var e=this.getSize(K,!1);if(0<S&&0<H&&0<
-K.length&&0<e){if(B){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-e+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),u=[],y=d.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=H,f.y=Math.round(y),y=B||l?y+f.height:y+f.height/e*S,f.height=Math.round(y)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,u));l&&S<e&&(k=k.clone(),k.height=y+d.height,E.setGeometry(b,
+K.length&&0<e){if(B){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-e+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],y=d.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=d.x,f.width=H,f.y=Math.round(y),y=B||l?y+f.height:y+f.height/e*S,f.height=Math.round(y)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<e&&(k=k.clone(),k.height=y+d.height,E.setGeometry(b,
k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+d.width+d.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(C){E.setVisible(C.cell,C.actual.cell==C.cell);if(C.actual.cell!=C.cell){if(C.actual.row==C.row){var I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo;C.actual.geo.width+=I.width}C.actual.col==C.col&&(I=null!=C.geo.alternateBounds?C.geo.alternateBounds:C.geo,C.actual.geo.height+=I.height)}}))}else for(Q=0;Q<K.length;Q++)E.setVisible(K[Q],
!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var d=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var e=this.getState(K);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&!e.invalid&&this.updateLineJumps(e)&&this.graph.cellRenderer.redraw(e,!1,this.isRendering());e=d.apply(this,
arguments);null!=e&&Q&&this.graph.model.isEdge(e.cell)&&null!=e.style&&1!=e.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(e);return e};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var K=this.node.getElementsByTagName("path");if(1<K.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&K[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var Q=this.state.view.graph.getFlowAnimationStyle();null!=Q&&K[1].setAttribute("class",Q.getAttribute("id"))}}};var l=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(K,Q){return l.apply(this,arguments)||null!=K.routedPoints&&null!=Q.routedPoints&&!mxUtils.equalPoints(Q.routedPoints,K.routedPoints)};var B=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(K){B.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,qa,L){var V=new mxPoint(qa,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
-pa||V.x!=qa||V.y!=L},u=.5*this.scale;e=!1;f=[];for(var y=0;y<Q.length-1;y++){for(var C=Q[y+1],I=Q[y],D=[],N=Q[y+2];y<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,C.x,C.y)<1*this.scale*this.scale;)C=N,y++,N=Q[y+2];e=g(0,I.x,I.y)||e;for(var G=0;G<this.validEdges.length;G++){var ha=this.validEdges[G],ka=ha.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ha)&&"1"!=ha.style.noJump)for(ha=0;ha<ka.length-1;ha++){var ja=ka[ha+1],ca=ka[ha];for(N=ka[ha+2];ha<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
-N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ha++,N=ka[ha+2];N=mxUtils.intersection(I.x,I.y,C.x,C.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>u||Math.abs(N.y-I.y)>u)&&(Math.abs(N.x-C.x)>u||Math.abs(N.y-C.y)>u)&&(Math.abs(N.x-ca.x)>u||Math.abs(N.y-ca.y)>u)&&(Math.abs(N.x-ja.x)>u||Math.abs(N.y-ja.y)>u)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
-1].y===N.y||D.push(N)}}}for(ha=0;ha<D.length;ha++)e=g(1,D[ha].x,D[ha].y)||e}N=Q[Q.length-1];e=g(0,N.x,N.y)||e}K.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,u=mxUtils.getValue(this.style,"jumpStyle","none"),y=!0,C=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ha=this.state.routedPoints[G],ka=new mxPoint(ha.x/this.scale,ha.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=C&&1==ha.type){var ca=this.state.routedPoints[G+1];ha=ca.x/this.scale-
-ka.x;ca=ca.y/this.scale-ka.y;ha=ha*ha+ca*ca;null==N&&(N=new mxPoint(ka.x-C.x,ka.y-C.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ha>g*g&&0<I&&(ha=C.x-ka.x,ca=C.y-ka.y,ha=ha*ha+ca*ca,ha>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ha=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,e,f,!1,null,y),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,y=!1,"sharp"==u?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ha.x-N.y*D,ha.y+N.x*D),K.lineTo(ha.x,ha.y)):"line"==
-u?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ha.x-N.y*D,ha.y+N.x*D),K.lineTo(ha.x+N.y*D,ha.y-N.x*D),K.moveTo(ha.x,ha.y)):"arc"==u?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ha.x-N.y*D,ha.y+N.x*D,ha.x,ha.y)):(K.moveTo(ha.x,ha.y),y=!0),D=[ha],ja=!0))}else N=null;ja||(D.push(ka),C=ka)}this.addPoints(K,D,e,f,!1,null,y);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,e,f){return null!=Q&&"centerPerimeter"==
-Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,e,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,e,f),u=this.graph.isOrthogonal(K),y=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(Q.getCenterX(),
-Q.getCenterY());if(0!=y){var I=Math.cos(-y),D=Math.sin(-y);g=mxUtils.getRotatedPoint(g,I,D,C)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==y&&u,I);0!=y&&(I=Math.cos(y),D=Math.sin(y),g=mxUtils.getRotatedPoint(g,I,D,C));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,e,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
-e,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=K)for(var u=0;u<K.length;u++){var y=this.graph.getConnectionPoint(Q,K[u]);if(null!=y){var C=(y.x-g.x)*(y.x-g.x)+(y.y-g.y)*(y.y-g.y);if(null==f||C<f)e=y,f=C}}null!=e&&(g=e)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,e){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
+function(K){B.apply(this,arguments);this.graph.model.isEdge(K.cell)&&1!=K.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(K)};mxGraphView.prototype.updateLineJumps=function(K){var Q=K.absolutePoints;if(Graph.lineJumpsEnabled){var e=null!=K.routedPoints,f=null;if(null!=Q&&null!=this.validEdges&&"none"!==mxUtils.getValue(K.style,"jumpStyle","none")){var g=function(pa,ra,L){var V=new mxPoint(ra,L);V.type=pa;f.push(V);V=null!=K.routedPoints?K.routedPoints[f.length-1]:null;return null==V||V.type!=
+pa||V.x!=ra||V.y!=L},v=.5*this.scale;e=!1;f=[];for(var y=0;y<Q.length-1;y++){for(var C=Q[y+1],I=Q[y],D=[],N=Q[y+2];y<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,C.x,C.y)<1*this.scale*this.scale;)C=N,y++,N=Q[y+2];e=g(0,I.x,I.y)||e;for(var G=0;G<this.validEdges.length;G++){var ia=this.validEdges[G],ka=ia.absolutePoints;if(null!=ka&&mxUtils.intersects(K,ia)&&"1"!=ia.style.noJump)for(ia=0;ia<ka.length-1;ia++){var ja=ka[ia+1],ca=ka[ia];for(N=ka[ia+2];ia<ka.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,N.x,
+N.y,ja.x,ja.y)<1*this.scale*this.scale;)ja=N,ia++,N=ka[ia+2];N=mxUtils.intersection(I.x,I.y,C.x,C.y,ca.x,ca.y,ja.x,ja.y);if(null!=N&&(Math.abs(N.x-I.x)>v||Math.abs(N.y-I.y)>v)&&(Math.abs(N.x-C.x)>v||Math.abs(N.y-C.y)>v)&&(Math.abs(N.x-ca.x)>v||Math.abs(N.y-ca.y)>v)&&(Math.abs(N.x-ja.x)>v||Math.abs(N.y-ja.y)>v)){ja=N.x-I.x;ca=N.y-I.y;N={distSq:ja*ja+ca*ca,x:N.x,y:N.y};for(ja=0;ja<D.length;ja++)if(D[ja].distSq>N.distSq){D.splice(ja,0,N);N=null;break}null==N||0!=D.length&&D[D.length-1].x===N.x&&D[D.length-
+1].y===N.y||D.push(N)}}}for(ia=0;ia<D.length;ia++)e=g(1,D[ia].x,D[ia].y)||e}N=Q[Q.length-1];e=g(0,N.x,N.y)||e}K.routedPoints=f;return e}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,e){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)p.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,g=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,v=mxUtils.getValue(this.style,"jumpStyle","none"),y=!0,C=null,I=null,D=[],N=null;K.begin();for(var G=0;G<this.state.routedPoints.length;G++){var ia=this.state.routedPoints[G],ka=new mxPoint(ia.x/this.scale,ia.y/this.scale);0==G?ka=Q[0]:G==this.state.routedPoints.length-1&&(ka=Q[Q.length-1]);var ja=!1;if(null!=C&&1==ia.type){var ca=this.state.routedPoints[G+1];ia=ca.x/this.scale-
+ka.x;ca=ca.y/this.scale-ka.y;ia=ia*ia+ca*ca;null==N&&(N=new mxPoint(ka.x-C.x,ka.y-C.y),I=Math.sqrt(N.x*N.x+N.y*N.y),0<I?(N.x=N.x*g/I,N.y=N.y*g/I):N=null);ia>g*g&&0<I&&(ia=C.x-ka.x,ca=C.y-ka.y,ia=ia*ia+ca*ca,ia>g*g&&(ja=new mxPoint(ka.x-N.x,ka.y-N.y),ia=new mxPoint(ka.x+N.x,ka.y+N.y),D.push(ja),this.addPoints(K,D,e,f,!1,null,y),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,y=!1,"sharp"==v?(K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.lineTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x,ia.y)):"line"==
+v?(K.moveTo(ja.x+N.y*D,ja.y-N.x*D),K.lineTo(ja.x-N.y*D,ja.y+N.x*D),K.moveTo(ia.x-N.y*D,ia.y+N.x*D),K.lineTo(ia.x+N.y*D,ia.y-N.x*D),K.moveTo(ia.x,ia.y)):"arc"==v?(D*=1.3,K.curveTo(ja.x-N.y*D,ja.y+N.x*D,ia.x-N.y*D,ia.y+N.x*D,ia.x,ia.y)):(K.moveTo(ia.x,ia.y),y=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),C=ka)}this.addPoints(K,D,e,f,!1,null,y);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,e,f){return null!=Q&&"centerPerimeter"==
+Q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(Q.getCenterX(),Q.getCenterY()):E.apply(this,arguments)};var M=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(K,Q,e,f){if(null==Q||null==K||"1"!=Q.style.snapToPoint&&"1"!=K.style.snapToPoint)M.apply(this,arguments);else{Q=this.getTerminalPort(K,Q,f);var g=this.getNextPoint(K,e,f),v=this.graph.isOrthogonal(K),y=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),C=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=y){var I=Math.cos(-y),D=Math.sin(-y);g=mxUtils.getRotatedPoint(g,I,D,C)}I=parseFloat(K.style[mxConstants.STYLE_PERIMETER_SPACING]||0);I+=parseFloat(K.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);g=this.getPerimeterPoint(Q,g,0==y&&v,I);0!=y&&(I=Math.cos(y),D=Math.sin(y),g=mxUtils.getRotatedPoint(g,I,D,C));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,e,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
+e,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=e=null;if(null!=K)for(var v=0;v<K.length;v++){var y=this.graph.getConnectionPoint(Q,K[v]);if(null!=y){var C=(y.x-g.x)*(y.x-g.x)+(y.y-g.y)*(y.y-g.y);if(null==f||C<f)e=y,f=C}}null!=e&&(g=e)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,e){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=e.state&&(f=e.state.view.graph.replacePlaceholders(e.state.cell,
f));return f};var H=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(K){if(null!=K.style&&"undefined"!==typeof pako){var Q=mxUtils.getValue(K.style,mxConstants.STYLE_SHAPE,null);if(null!=Q&&"string"===typeof Q&&"stencil("==Q.substring(0,8))try{var e=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(e));return new mxShape(new mxStencil(f.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return H.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var d=mxStencilRegistry.stencils[b];if(null==d&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){d=mxStencilRegistry.libraries[k];if(null!=d){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<d.length;l++){var B=d[l];if(!mxStencilRegistry.filesLoaded[B])if(mxStencilRegistry.filesLoaded[B]=!0,".xml"==B.toLowerCase().substring(B.length-4,B.length))mxStencilRegistry.loadStencilSet(B,
@@ -2511,140 +2511,141 @@ function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,n
return x};mxConnectionHandler.prototype.updatePreview=function(x){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var x=E.apply(this,arguments),O=x.getCell;x.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return x};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var x="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",O="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),P=0;P<O.length;P++)null!=this.currentEdgeStyle[O[P]]&&(x+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?x+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(x+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?x+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(x+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(x+="elbow="+this.currentEdgeStyle.elbow+";");return x=null!=this.currentEdgeStyle.html?x+("html="+this.currentEdgeStyle.html+";"):x+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,O){O=null!=O?O:{};for(var P=0;P<x.length;P++){var X=x[P];O[mxObjectIdentity.get(X)]=X.getId();for(var aa=this.model.getChildCount(X),
-W=0;W<aa;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(x,O,P){P=null!=P?P:{};for(var X in x){var aa=O[X];null==P[aa]&&(P[aa]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var aa=new mxCodec(x.ownerDocument),W=new mxGraphModel;aa.decode(x,W);x=[];aa={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),aa));if(null!=ta){var ra=this.createCellLookup([W.root]);
-ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(x=x.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(x=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(aa,ra,ea),this.updateCustomLinks(ea,x),X)){this.isGridEnabled()&&
-(O=this.snap(O),P=this.snap(P));var Ca=this.getBoundingBoxFromGeometry(x,!0);null!=Ca&&this.moveCells(x,O-Ca.x,P-Ca.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var O={},P=this.cloneCells(x,null,O),X=new mxDictionary,aa=0;aa<x.length;aa++)X.put(x[aa],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(aa=0;aa<P.length;aa++){ea.add(ta,P[aa]);var ra=this.view.getState(x[aa]);if(null!=ra){var va=this.getCellGeometry(P[aa]);null!=
-va&&va.relative&&!this.model.isEdge(x[aa])&&null==X.get(this.model.getParent(x[aa]))&&(va.offset=null,va.relative=!1,va.x=ra.x/ra.view.scale-ra.view.translate.x,va.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(x)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(x,O){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,O)[mxConstants.STYLE_SHAPE]);return P==
-mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var O=this.model.getParent(x);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,O,P,X,aa,W,ea,ta){null==ta&&(ta=this.model.getParent(x),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
-!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[x,O,P,X,aa,W,ea,ta]);this.model.setValue(P,"");var ra=this.getChildCells(P,!0);for(O=0;O<ra.length;O++){var va=this.getCellGeometry(ra[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(ra[O])}var Ca=this.getChildCells(x,!0);for(O=0;O<Ca.length;O++)va=this.getCellGeometry(Ca[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ca[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ea=this.model.getTerminal(P,!1);if(null!=Ea){var Na=this.getCurrentCellStyle(Ea);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
-var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),aa=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)aa=W.length-1;else if(x&&null==X&&0<W.length||null!=aa&&x&&W.length>aa||!x&&0<aa)return;for(var ra=0;ra<this.model.getChildCount(ta);ra++)ea(this.model.getChildAt(ta,ra))});ea(this.model.root);0<W.length&&(aa=
-null!=aa?mxUtils.mod(aa+(x?1:-1),W.length):0,this.setSelectionCell(W[aa]))}};Graph.prototype.swapShapes=function(x,O,P,X,aa,W,ea){O=!1;if(!X&&null!=aa&&1==x.length&&(X=this.view.getState(aa),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(aa),W=this.getCellGeometry(x[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(aa,
-O),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,O,P,X,aa,W,ea){if(this.swapShapes(x,O,P,X,aa,W,ea))return x;ea=null!=ea?ea:{};if(this.isTable(aa)){for(var ta=[],ra=0;ra<x.length;ra++)this.isTable(x[ra])?ta=ta.concat(this.model.getChildCells(x[ra],!0).reverse()):ta.push(x[ra]);x=ta}this.model.beginUpdate();try{ta=[];for(ra=0;ra<x.length;ra++)if(null!=aa&&this.isTableRow(x[ra])){var va=this.model.getParent(x[ra]),
-Ca=this.getCellGeometry(x[ra]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ca&&this.isTable(va)&&this.isTable(aa)&&(X||va!=aa)){if(!X){var Ea=this.getCellGeometry(va);null!=Ea&&(Ea=Ea.clone(),Ea.height-=Ca.height,this.model.setGeometry(va,Ea))}Ea=this.getCellGeometry(aa);null!=Ea&&(Ea=Ea.clone(),Ea.height+=Ca.height,this.model.setGeometry(aa,Ea));var Na=this.model.getChildCells(aa,!0);if(0<Na.length){x[ra]=X?this.cloneCell(x[ra]):x[ra];var Wa=this.model.getChildCells(x[ra],!0),Ra=this.model.getChildCells(Na[0],
-!0),Ga=Ra.length-Wa.length;if(0<Ga)for(var Ka=0;Ka<Ga;Ka++){var Pa=this.cloneCell(Wa[Wa.length-1]);null!=Pa&&(Pa.value="",this.model.add(x[ra],Pa))}else if(0>Ga)for(Ka=0;Ka>Ga;Ka--)this.model.remove(Wa[Wa.length+Ka-1]);Wa=this.model.getChildCells(x[ra],!0);for(Ka=0;Ka<Ra.length;Ka++){var $a=this.getCellGeometry(Ra[Ka]),eb=this.getCellGeometry(Wa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Wa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(ra=0;ra<ta.length;ra++)!X&&
-this.model.contains(ta[ra])&&0==this.model.getChildCount(ta[ra])&&this.model.remove(ta[ra]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var aa=this.model.getParent(x[X]),W=this.model.getParent(aa);1==this.model.getChildCount(aa)&&1==this.model.getChildCount(W)?
-0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(W=this.model.getParent(x[X]),0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,ra=0;ra<ea.length;ra++)0<=mxUtils.indexOf(x,ea[ra])&&ta++;ta==ea.length&&P.push(W)}P.push(x[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var x=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=x&&(new mxCodec(x.ownerDocument)).decode(x,this.getStylesheet())};Graph.prototype.createCellLookup=function(x,O){O=null!=O?O:{};for(var P=0;P<x.length;P++){var X=x[P];O[mxObjectIdentity.get(X)]=X.getId();for(var ba=this.model.getChildCount(X),
+W=0;W<ba;W++)this.createCellLookup([this.model.getChildAt(X,W)],O)}return O};Graph.prototype.createCellMapping=function(x,O,P){P=null!=P?P:{};for(var X in x){var ba=O[X];null==P[ba]&&(P[ba]=x[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(x,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(x.ownerDocument),W=new mxGraphModel;ba.decode(x,W);x=[];ba={};var ea={},ta=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),ba));if(null!=ta){var qa=this.createCellLookup([W.root]);
+ta=ta.slice();this.model.beginUpdate();try{if(1!=ta.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<ta.length;W++)va=this.model.getChildren(this.moveCells([ta[W]],O,P,!1,this.model.getRoot())[0]),null!=va&&(x=x.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(x=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=x&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,x),X)){this.isGridEnabled()&&
+(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(x,!0);null!=Ea&&this.moveCells(x,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return x};Graph.prototype.encodeCells=function(x){for(var O={},P=this.cloneCells(x,null,O),X=new mxDictionary,ba=0;ba<x.length;ba++)X.put(x[ba],!0);var W=new mxCodec,ea=new mxGraphModel,ta=ea.getChildAt(ea.getRoot(),0);for(ba=0;ba<P.length;ba++){ea.add(ta,P[ba]);var qa=this.view.getState(x[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
+va&&va.relative&&!this.model.isEdge(x[ba])&&null==X.get(this.model.getParent(x[ba]))&&(va.offset=null,va.relative=!1,va.x=qa.x/qa.view.scale-qa.view.translate.x,va.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(O,this.createCellLookup(x)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(x,O){var P=null;null==x||this.model.isEdge(x)||this.model.getParent(x)==this.model.getRoot()||(P=this.getCurrentCellStyle(x,O)[mxConstants.STYLE_SHAPE]);return P==
+mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(x){var O=this.model.getParent(x);if(null!=O){var P=this.getCurrentCellStyle(O);if(null!=P.expand)return"0"!=P.expand}return M.apply(this,arguments)&&(null==O||!this.isTable(O))};var S=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(x,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(x),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
+!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[x,O,P,X,ba,W,ea,ta]);this.model.setValue(P,"");var qa=this.getChildCells(P,!0);for(O=0;O<qa.length;O++){var va=this.getCellGeometry(qa[O]);null!=va&&va.relative&&0<va.x&&this.model.remove(qa[O])}var Ea=this.getChildCells(x,!0);for(O=0;O<Ea.length;O++)va=this.getCellGeometry(Ea[O]),null!=va&&va.relative&&0>=va.x&&this.model.remove(Ea[O]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[P]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[P]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[x]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[x]);var Ca=this.model.getTerminal(P,!1);if(null!=Ca){var Ma=this.getCurrentCellStyle(Ca);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[P]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[P]))}}finally{this.model.endUpdate()}return P};
+var H=Graph.prototype.selectCell;Graph.prototype.selectCell=function(x,O,P){if(O||P)H.apply(this,arguments);else{var X=this.getSelectionCell(),ba=null,W=[],ea=mxUtils.bind(this,function(ta){if(null!=this.view.getState(ta)&&(this.model.isVertex(ta)||this.model.isEdge(ta)))if(W.push(ta),ta==X)ba=W.length-1;else if(x&&null==X&&0<W.length||null!=ba&&x&&W.length>ba||!x&&0<ba)return;for(var qa=0;qa<this.model.getChildCount(ta);qa++)ea(this.model.getChildAt(ta,qa))});ea(this.model.root);0<W.length&&(ba=
+null!=ba?mxUtils.mod(ba+(x?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(x,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==x.length&&(X=this.view.getState(ba),P=this.view.getState(x[0]),null!=X&&null!=P&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==X.style.shape&&"umlLifeline"==P.style.shape)&&(X=this.getCellGeometry(ba),W=this.getCellGeometry(x[0]),null!=X&&null!=W))){O=X.clone();X=W.clone();X.x=O.x;X.y=O.y;O.x=W.x;O.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(ba,
+O),this.model.setGeometry(x[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(x,O,P,X,ba,W,ea){if(this.swapShapes(x,O,P,X,ba,W,ea))return x;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<x.length;qa++)this.isTable(x[qa])?ta=ta.concat(this.model.getChildCells(x[qa],!0).reverse()):ta.push(x[qa]);x=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<x.length;qa++)if(null!=ba&&this.isTableRow(x[qa])){var va=this.model.getParent(x[qa]),
+Ea=this.getCellGeometry(x[qa]);this.isTable(va)&&ta.push(va);if(null!=va&&null!=Ea&&this.isTable(va)&&this.isTable(ba)&&(X||va!=ba)){if(!X){var Ca=this.getCellGeometry(va);null!=Ca&&(Ca=Ca.clone(),Ca.height-=Ea.height,this.model.setGeometry(va,Ca))}Ca=this.getCellGeometry(ba);null!=Ca&&(Ca=Ca.clone(),Ca.height+=Ea.height,this.model.setGeometry(ba,Ca));var Ma=this.model.getChildCells(ba,!0);if(0<Ma.length){x[qa]=X?this.cloneCell(x[qa]):x[qa];var Sa=this.model.getChildCells(x[qa],!0),Qa=this.model.getChildCells(Ma[0],
+!0),Fa=Qa.length-Sa.length;if(0<Fa)for(var Ka=0;Ka<Fa;Ka++){var Pa=this.cloneCell(Sa[Sa.length-1]);null!=Pa&&(Pa.value="",this.model.add(x[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(x[qa],!0);for(Ka=0;Ka<Qa.length;Ka++){var $a=this.getCellGeometry(Qa[Ka]),eb=this.getCellGeometry(Sa[Ka]);null!=$a&&null!=eb&&(eb=eb.clone(),eb.width=$a.width,this.model.setGeometry(Sa[Ka],eb))}}}}var cb=K.apply(this,arguments);for(qa=0;qa<ta.length;qa++)!X&&
+this.model.contains(ta[qa])&&0==this.model.getChildCount(ta[qa])&&this.model.remove(ta[qa]);X&&this.updateCustomLinks(this.createCellMapping(ea,this.createCellLookup(x)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(x,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<x.length;X++)if(this.isTableCell(x[X])){var ba=this.model.getParent(x[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
+0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(x[X],"")}else{if(this.isTableRow(x[X])&&(W=this.model.getParent(x[X]),0>mxUtils.indexOf(x,W)&&0>mxUtils.indexOf(P,W))){for(var ea=this.model.getChildCells(W,!0),ta=0,qa=0;qa<ea.length;qa++)0<=mxUtils.indexOf(x,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(x[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(x,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
O[X]&&P.updateCustomLinksForCell(x,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(x,O){this.doUpdateCustomLinksForCell(x,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(x,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(x,O){};Graph.prototype.getAllConnectionConstraints=function(x,O){if(null!=x){O=mxUtils.getValue(x.style,"points",null);if(null!=O){x=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];x.push(new mxConnectionConstraint(new mxPoint(X[0],
-X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;O=x.shape.bounds;var aa=x.shape.scale;P=O.width/aa;O=O.height/aa;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=x.shape.getConstraints(x.style,P,O);if(null!=O)return O;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};
-Graph.prototype.flipEdge=function(x){if(null!=x){var O=this.getCurrentCellStyle(x);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[x])}};Graph.prototype.isValidRoot=function(x){for(var O=this.model.getChildCount(x),P=0,X=0;X<O;X++){var aa=this.model.getChildAt(x,X);this.model.isVertex(aa)&&(aa=this.getCellGeometry(aa),null==aa||aa.relative||
-P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,O,P){for(var X=this.getCurrentCellStyle(x),aa=!0,W=!0,ea=0;ea<O.length&&W;ea++)aa=aa&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&
-!this.isTableRow(x)&&(!this.isTable(x)||W||aa))&&!this.isCellLocked(x)};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
-function(x){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(x,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var aa=0;aa<x.length;aa++){var W=x[aa];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var ra=P.getGeometry(W);if(null!=ra){ra=ra.clone();null!=
-ra.points&&ra.points.reverse();var va=ra.getTerminalPoint(!0),Ca=ra.getTerminalPoint(!1);ra.setTerminalPoint(va,!1);ra.setTerminalPoint(Ca,!0);P.setGeometry(W,ra);var Ea=this.view.getState(W),Na=this.view.getState(ea),Wa=this.view.getState(ta);if(null!=Ea){var Ra=null!=Na?this.getConnectionConstraint(Ea,Na,!0):null,Ga=null!=Wa?this.getConnectionConstraint(Ea,Wa,!1):null;this.setConnectionConstraint(W,ea,!0,Ga);this.setConnectionConstraint(W,ta,!1,Ra);var Ka=mxUtils.getValue(Ea.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);
-this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ea.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[W]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[W])}X.push(W)}}else if(P.isVertex(W)&&(ra=this.getCellGeometry(W),null!=ra)){if(!(this.isTable(W)||this.isTableRow(W)||this.isTableCell(W)||this.isSwimlane(W))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var Pa=ra.width;ra.width=ra.height;ra.height=Pa;P.setGeometry(W,ra)}var $a=
+X[1]),2<X.length?"0"!=X[2]:!0,null,3<X.length?X[3]:0,4<X.length?X[4]:0))}}catch(W){}return x}if(null!=x.shape&&null!=x.shape.bounds){X=x.shape.direction;O=x.shape.bounds;var ba=x.shape.scale;P=O.width/ba;O=O.height/ba;if(X==mxConstants.DIRECTION_NORTH||X==mxConstants.DIRECTION_SOUTH)X=P,P=O,O=X;O=x.shape.getConstraints(x.style,P,O);if(null!=O)return O;if(null!=x.shape.stencil&&null!=x.shape.stencil.constraints)return x.shape.stencil.constraints;if(null!=x.shape.constraints)return x.shape.constraints}}return null};
+Graph.prototype.flipEdge=function(x){if(null!=x){var O=this.getCurrentCellStyle(x);O=mxUtils.getValue(O,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,O,[x])}};Graph.prototype.isValidRoot=function(x){for(var O=this.model.getChildCount(x),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(x,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
+P++)}return 0<P||this.isContainer(x)};Graph.prototype.isValidDropTarget=function(x,O,P){for(var X=this.getCurrentCellStyle(x),ba=!0,W=!0,ea=0;ea<O.length&&W;ea++)ba=ba&&this.isTable(O[ea]),W=W&&this.isTableRow(O[ea]);return(1==O.length&&null!=P&&mxEvent.isShiftDown(P)&&!mxEvent.isControlDown(P)&&!mxEvent.isAltDown(P)||("1"!=mxUtils.getValue(X,"part","0")||this.isContainer(x))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(x))&&
+!this.isTableRow(x)&&(!this.isTable(x)||W||ba))&&!this.isCellLocked(x)};Graph.prototype.createGroupCell=function(){var x=mxGraph.prototype.createGroupCell.apply(this,arguments);x.setStyle("group");return x};Graph.prototype.isExtendParentsOnAdd=function(x){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=x&&null!=this.layoutManager){var P=this.model.getParent(x);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
+function(x){var O=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=O&&(O.width+=10,O.height+=4,this.gridEnabled&&(O.width=this.snap(O.width),O.height=this.snap(O.height)));return O};Graph.prototype.turnShapes=function(x,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<x.length;ba++){var W=x[ba];if(P.isEdge(W)){var ea=P.getTerminal(W,!0),ta=P.getTerminal(W,!1);P.setTerminal(W,ta,!0);P.setTerminal(W,ea,!1);var qa=P.getGeometry(W);if(null!=qa){qa=qa.clone();null!=
+qa.points&&qa.points.reverse();var va=qa.getTerminalPoint(!0),Ea=qa.getTerminalPoint(!1);qa.setTerminalPoint(va,!1);qa.setTerminalPoint(Ea,!0);P.setGeometry(W,qa);var Ca=this.view.getState(W),Ma=this.view.getState(ea),Sa=this.view.getState(ta);if(null!=Ca){var Qa=null!=Ma?this.getConnectionConstraint(Ca,Ma,!0):null,Fa=null!=Sa?this.getConnectionConstraint(Ca,Sa,!1):null;this.setConnectionConstraint(W,ea,!0,Fa);this.setConnectionConstraint(W,ta,!1,Qa);var Ka=mxUtils.getValue(Ca.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);
+this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ca.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[W]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ka,[W])}X.push(W)}}else if(P.isVertex(W)&&(qa=this.getCellGeometry(W),null!=qa)){if(!(this.isTable(W)||this.isTableRow(W)||this.isTableCell(W)||this.isSwimlane(W))){qa=qa.clone();qa.x+=qa.width/2-qa.height/2;qa.y+=qa.height/2-qa.width/2;var Pa=qa.width;qa.width=qa.height;qa.height=Pa;P.setGeometry(W,qa)}var $a=
this.view.getState(W);if(null!=$a){var eb=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],cb=mxUtils.getValue($a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,eb[mxUtils.mod(mxUtils.indexOf(eb,cb)+(O?-1:1),eb.length)],[W])}X.push(W)}}}finally{P.endUpdate()}return X};Graph.prototype.stencilHasPlaceholders=function(x){if(null!=x&&null!=x.fgNode)for(x=x.fgNode.firstChild;null!=
x;){if("text"==x.nodeName&&"1"==x.getAttribute("placeholders"))return!0;x=x.nextSibling}return!1};var e=Graph.prototype.processChange;Graph.prototype.processChange=function(x){if(x instanceof mxGeometryChange&&(this.isTableCell(x.cell)||this.isTableRow(x.cell))&&(null==x.previous&&null!=x.geometry||null!=x.previous&&!x.previous.equals(x.geometry))){var O=x.cell;this.isTableCell(O)&&(O=this.model.getParent(O));this.isTableRow(O)&&(O=this.model.getParent(O));var P=this.view.getState(O);null!=P&&null!=
P.shape&&(this.view.invalidate(O),P.shape.bounds=null)}e.apply(this,arguments);x instanceof mxValueChange&&null!=x.cell&&null!=x.cell.value&&"object"==typeof x.cell.value&&this.invalidateDescendantsWithPlaceholders(x.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(x){x=this.model.getDescendants(x);if(0<x.length)for(var O=0;O<x.length;O++){var P=this.view.getState(x[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(x[O]):
this.isReplacePlaceholders(x[O])&&this.view.invalidate(x[O],!1,!1)}};Graph.prototype.replaceElement=function(x,O){O=x.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(x.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=x.innerHTML;x.parentNode.replaceChild(O,x)};Graph.prototype.processElements=function(x,O){if(null!=x){x=x.getElementsByTagName("*");for(var P=0;P<x.length;P++)O(x[P])}};Graph.prototype.updateLabelElements=function(x,
-O,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),aa=0;aa<x.length;aa++)if(this.isHtmlLabel(x[aa])){var W=this.convertValueToString(x[aa]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(x[aa],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&
-null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),aa=x;null!=aa;){if(aa==this.model.getRoot()||null!=aa.value&&"object"==typeof aa.value&&aa.hasAttribute(X)){this.setAttributeForCell(aa,X,O);break}aa=this.model.getParent(aa)}var W=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
-arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var O=new mxDictionary,P=0;P<x.length;P++)O.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var aa=this.model.getParent(x[P]);null==aa||O.get(aa)||(O.put(aa,!0),X.push(aa))}for(P=0;P<X.length;P++)if(aa=this.view.getState(X[P]),null!=aa&&(this.model.isEdge(aa.cell)||this.model.isVertex(aa.cell))&&this.isCellDeletable(aa.cell)&&this.isTransparentState(aa)){for(var W=!0,ea=0;ea<this.model.getChildCount(aa.cell)&&
-W;ea++)O.get(this.model.getChildAt(aa.cell,ea))||(W=!1);W&&x.push(aa.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var O=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&O.push(x[P]);x=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,O){this.setAttributeForCell(x,"link",O)};Graph.prototype.setTooltipForCell=function(x,
+O,P){x=null!=x?x:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<x.length;ba++)if(this.isHtmlLabel(x[ba])){var W=this.convertValueToString(x[ba]);if(null!=W&&0<W.length){X.innerHTML=W;for(var ea=X.getElementsByTagName(null!=P?P:"*"),ta=0;ta<ea.length;ta++)O(ea[ta]);X.innerHTML!=W&&this.cellLabelChanged(x[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(x,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=x.value&&"object"==typeof x.value){if(this.isReplacePlaceholders(x)&&
+null!=x.getAttribute("placeholder"))for(var X=x.getAttribute("placeholder"),ba=x;null!=ba;){if(ba==this.model.getRoot()||null!=ba.value&&"object"==typeof ba.value&&ba.hasAttribute(X)){this.setAttributeForCell(ba,X,O);break}ba=this.model.getParent(ba)}var W=x.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,O):W.setAttribute("label",O);O=W}mxGraph.prototype.cellLabelChanged.apply(this,
+arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(x){if(null!=x){for(var O=new mxDictionary,P=0;P<x.length;P++)O.put(x[P],!0);var X=[];for(P=0;P<x.length;P++){var ba=this.model.getParent(x[P]);null==ba||O.get(ba)||(O.put(ba,!0),X.push(ba))}for(P=0;P<X.length;P++)if(ba=this.view.getState(X[P]),null!=ba&&(this.model.isEdge(ba.cell)||this.model.isVertex(ba.cell))&&this.isCellDeletable(ba.cell)&&this.isTransparentState(ba)){for(var W=!0,ea=0;ea<this.model.getChildCount(ba.cell)&&
+W;ea++)O.get(this.model.getChildAt(ba.cell,ea))||(W=!1);W&&x.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(x){for(var O=[],P=0;P<x.length;P++)this.isCellDeletable(x[P])&&this.isTransparentState(this.view.getState(x[P]))&&O.push(x[P]);x=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(x,O){this.setAttributeForCell(x,"link",O)};Graph.prototype.setTooltipForCell=function(x,
O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(x.value)&&x.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(x,P,O)};Graph.prototype.getAttributeForCell=function(x,O,P){x=null!=x.value&&"object"===typeof x.value?x.value.getAttribute(O):null;return null!=x?x:P};Graph.prototype.setAttributeForCell=function(x,O,P){if(null!=x.value&&"object"==typeof x.value)var X=x.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
-X.setAttribute("label",x.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var aa=0;aa<x.length;aa++){var W=this.model.getParent(x[aa]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(x,W))return null}W=f.apply(this,arguments);var ea=!0;for(aa=0;aa<x.length&&ea;aa++)ea=ea&&this.isTableRow(x[aa]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
+X.setAttribute("label",x.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(x,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(x,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<x.length;ba++){var W=this.model.getParent(x[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(x,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<x.length&&ea;ba++)ea=ea&&this.isTableRow(x[ba]);ea&&(this.isTableCell(W)&&(W=this.model.getParent(W)),
this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));return W};Graph.prototype.click=function(x){mxGraph.prototype.click.call(this,x);this.firstClickState=x.getState();this.firstClickSource=x.getSource()};Graph.prototype.dblClick=function(x,O){this.isEnabled()&&(O=this.insertTextForEvent(x,O),mxGraph.prototype.dblClick.call(this,x,O))};Graph.prototype.insertTextForEvent=function(x,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(x),mxEvent.getClientY(x));if(null!=
-x&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,aa=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=aa||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&aa==this.view.getCanvas().ownerSVGElement)||(null==
-X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),aa=this.getPageSize();O=Math.max(O,X.x*aa.width);P=Math.max(P,X.y*aa.height)}return new mxPoint(this.snap(O+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=
+x&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(x);this.firstClickState!=X||this.firstClickSource!=ba||null!=X&&null!=X.text&&null!=X.text.node&&null!=X.text.boundingBox&&(mxUtils.contains(X.text.boundingBox,P.x,P.y)||mxUtils.isAncestorNode(X.text.node,mxEvent.getSource(x)))||(null!=X||this.isCellLocked(this.getDefaultParent()))&&(null==X||this.isCellLocked(X.cell))||!(null!=X||mxClient.IS_SVG&&ba==this.view.getCanvas().ownerSVGElement)||(null==
+X&&(X=this.view.getState(this.getCellAt(P.x,P.y))),O=this.addText(P.x,P.y,X))}return O};Graph.prototype.getInsertPoint=function(){var x=this.getGridSize(),O=this.container.scrollLeft/this.view.scale-this.view.translate.x,P=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var X=this.getPageLayout(),ba=this.getPageSize();O=Math.max(O,X.x*ba.width);P=Math.max(P,X.y*ba.height)}return new mxPoint(this.snap(O+x),this.snap(P+x))};Graph.prototype.getFreeInsertPoint=function(){var x=
this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/x.scale-x.translate.x+(0==O.width?2*this.gridSize:0))));x=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/x.scale-x.translate.y+2*this.gridSize)));return new mxPoint(X,x)};Graph.prototype.getCenterInsertPoint=function(x){x=null!=x?x:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-
x.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-x.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-x.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-x.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(x,O,P){var X=new mxCell;X.value="Text";X.geometry=new mxGeometry(0,
-0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var aa=this.view.getRelativePoint(P,x,O);X.geometry.x=Math.round(1E4*aa.x)/1E4;X.geometry.y=Math.round(aa.y);X.geometry.offset=new mxPoint(0,0);aa=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-aa.x)/W),Math.round((O-aa.y)/W))}else aa=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
-X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-aa.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-aa.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,O,P){var X=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");
-if(null!=ra)for(var va=0;va<ra.length;va++){var Ca=this.getAbsoluteUrl(ra[va].getAttribute("href"));null!=Ca&&(ra[va].setAttribute("rel",this.linkRelation),ra[va].setAttribute("href",Ca),null!=O&&mxEvent.addGestureListeners(ra[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var aa=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(ea,x,4):null,startX:0,
-startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var va=ra.sourceState;if(null==va||null==ea.getLinkForCell(va.cell))ra=ea.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ca,Ea,Na){return null==ea.getLinkForCell(Ca.cell)}),va=null==va||ea.model.isAncestor(ra,va.cell)?ea.view.getState(ra):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,va){this.startX=
-va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=ea.container.scrollLeft;this.scrollTop=ea.container.scrollTop;null==this.currentLink&&"auto"==ea.container.style.overflow&&(ea.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(ra,va){if(ea.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(ra>W||va>W)&&this.clear());else{for(ra=va.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;
-null!=ra?this.clear():(null!=ea.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ea.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!ea.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(ra,va){var Ca=va.getSource();for(ra=va.getEvent();null!=Ca&&"a"!=Ca.nodeName.toLowerCase();)Ca=Ca.parentNode;null==Ca&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<
-W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ca=ea.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ca||null==O||O(ra,this.currentLink),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Ca?ea.linkTarget:
-"_top",ea.openLink(this.currentLink,ra),va.consume())):null!=P&&!va.isConsumed()&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&Math.abs(this.startX-va.getGraphX())<W&&Math.abs(this.startY-va.getGraphY())<W&&P(va.getEvent()));this.clear()},activate:function(ra){this.currentLink=ea.getAbsoluteUrl(ea.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=ea.getLinkTargetForCell(ra.cell),ea.container.style.cursor="pointer",null!=
-this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=ea.container&&(ea.container.style.cursor=aa);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(ra){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(ra){ta.clear()})};Graph.prototype.duplicateCells=function(x,O){x=null!=x?x:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&
-(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);var X=this.getModel(),aa=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(x),ra=this.cloneCells(x,!1,ea,!0);for(P=0;P<x.length;P++){var va=X.getParent(x[P]);if(null!=va){var Ca=this.moveCells([ra[P]],aa,aa,!1)[0];W.push(Ca);if(O)X.add(va,ra[P]);else{var Ea=va.getIndex(x[P]);X.add(va,ra[P],Ea+1)}if(this.isTable(va)){var Na=this.getCellGeometry(ra[P]),Wa=this.getCellGeometry(va);null!=Na&&null!=Wa&&(Wa=Wa.clone(),
-Wa.height+=Na.height,X.setGeometry(va,Wa))}}else W.push(ra[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(x,O,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),aa=[],W=0;W<X.length;W++)aa.push(X[W]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");
-if(x.length==aa.length+1)for(W=x.length-1;0<=W;W--)if(0==W||x[W]!=aa[W-1]){x[W].setAttribute("width",O);x[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(x));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
+0,0,0);X.vertex=!0;if(null!=P&&this.model.isEdge(P.cell)){X.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";X.geometry.relative=!0;X.connectable=!1;var ba=this.view.getRelativePoint(P,x,O);X.geometry.x=Math.round(1E4*ba.x)/1E4;X.geometry.y=Math.round(ba.y);X.geometry.offset=new mxPoint(0,0);ba=this.view.getPoint(P,X.geometry);var W=this.view.scale;X.geometry.offset=new mxPoint(Math.round((x-ba.x)/W),Math.round((O-ba.y)/W))}else ba=this.view.translate,X.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",
+X.geometry.width=40,X.geometry.height=20,X.geometry.x=Math.round(x/this.view.scale)-ba.x-(null!=P?P.origin.x:0),X.geometry.y=Math.round(O/this.view.scale)-ba.y-(null!=P?P.origin.y:0),X.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([X],null!=P?P.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[X])),this.autoSizeCell(X)}finally{this.getModel().endUpdate()}return X};Graph.prototype.addClickHandler=function(x,O,P){var X=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");
+if(null!=qa)for(var va=0;va<qa.length;va++){var Ea=this.getAbsoluteUrl(qa[va].getAttribute("href"));null!=Ea&&(qa[va].setAttribute("rel",this.linkRelation),qa[va].setAttribute("href",Ea),null!=O&&mxEvent.addGestureListeners(qa[va],null,null,O))}});this.model.addListener(mxEvent.CHANGE,X);X();var ba=this.container.style.cursor,W=this.getTolerance(),ea=this,ta={currentState:null,currentLink:null,currentTarget:null,highlight:null!=x&&""!=x&&x!=mxConstants.NONE?new mxCellHighlight(ea,x,4):null,startX:0,
+startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var va=qa.sourceState;if(null==va||null==ea.getLinkForCell(va.cell))qa=ea.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ea,Ca,Ma){return null==ea.getLinkForCell(Ea.cell)}),va=null==va||ea.model.isAncestor(qa,va.cell)?ea.view.getState(qa):null;va!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=va,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,va){this.startX=
+va.getGraphX();this.startY=va.getGraphY();this.scrollLeft=ea.container.scrollLeft;this.scrollTop=ea.container.scrollTop;null==this.currentLink&&"auto"==ea.container.style.overflow&&(ea.container.style.cursor="move");this.updateCurrentState(va)},mouseMove:function(qa,va){if(ea.isMouseDown)null!=this.currentLink&&(qa=Math.abs(this.startX-va.getGraphX()),va=Math.abs(this.startY-va.getGraphY()),(qa>W||va>W)&&this.clear());else{for(qa=va.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;
+null!=qa?this.clear():(null!=ea.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&ea.tooltipHandler.reset(va,!0,this.currentState),(null==this.currentState||va.getState()!=this.currentState&&null!=va.sourceState||!ea.intersects(this.currentState,va.getGraphX(),va.getGraphY()))&&this.updateCurrentState(va))}},mouseUp:function(qa,va){var Ea=va.getSource();for(qa=va.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<
+W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&(null==va.sourceState||!va.isSource(va.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ea=ea.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ea||null==O||O(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ea?ea.linkTarget:
+"_top",ea.openLink(this.currentLink,qa),va.consume())):null!=P&&!va.isConsumed()&&Math.abs(this.scrollLeft-ea.container.scrollLeft)<W&&Math.abs(this.scrollTop-ea.container.scrollTop)<W&&Math.abs(this.startX-va.getGraphX())<W&&Math.abs(this.startY-va.getGraphY())<W&&P(va.getEvent()));this.clear()},activate:function(qa){this.currentLink=ea.getAbsoluteUrl(ea.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=ea.getLinkTargetForCell(qa.cell),ea.container.style.cursor="pointer",null!=
+this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=ea.container&&(ea.container.style.cursor=ba);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=ea.tooltipHandler&&ea.tooltipHandler.hide()}};ea.click=function(qa){};ea.addMouseListener(ta);mxEvent.addListener(document,"mouseleave",function(qa){ta.clear()})};Graph.prototype.duplicateCells=function(x,O){x=null!=x?x:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<x.length;P++)this.isTableCell(x[P])&&
+(x[P]=this.model.getParent(x[P]));x=this.model.getTopmostCells(x);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(x),qa=this.cloneCells(x,!1,ea,!0);for(P=0;P<x.length;P++){var va=X.getParent(x[P]);if(null!=va){var Ea=this.moveCells([qa[P]],ba,ba,!1)[0];W.push(Ea);if(O)X.add(va,qa[P]);else{var Ca=va.getIndex(x[P]);X.add(va,qa[P],Ca+1)}if(this.isTable(va)){var Ma=this.getCellGeometry(qa[P]),Sa=this.getCellGeometry(va);null!=Ma&&null!=Sa&&(Sa=Sa.clone(),
+Sa.height+=Ma.height,X.setGeometry(va,Sa))}}else W.push(qa[P])}this.updateCustomLinks(this.createCellMapping(ea,ta),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{X.endUpdate()}return W};Graph.prototype.insertImage=function(x,O,P){if(null!=x&&null!=this.cellEditor.textarea){for(var X=this.cellEditor.textarea.getElementsByTagName("img"),ba=[],W=0;W<X.length;W++)ba.push(X[W]);document.execCommand("insertimage",!1,x);x=this.cellEditor.textarea.getElementsByTagName("img");
+if(x.length==ba.length+1)for(W=x.length-1;0<=W;W--)if(0==W||x[W]!=ba[W-1]){x[W].setAttribute("width",O);x[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(x){if(null!=this.cellEditor.textarea)if(0==x.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var O=this.cellEditor.textarea.getElementsByTagName("a"),P=[],X=0;X<O.length;X++)P.push(O[X]);document.execCommand("createlink",!1,mxUtils.trim(x));O=this.cellEditor.textarea.getElementsByTagName("a");if(O.length==
P.length+1)for(X=O.length-1;0<=X;X--)if(O[X]!=P[X-1]){for(O=O[X].getElementsByTagName("a");0<O.length;){for(P=O[0].parentNode;null!=O[0].firstChild;)P.insertBefore(O[0].firstChild,O[0]);P.removeChild(O[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(x))};Graph.prototype.isCellResizable=function(x){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(x);return!this.isTableCell(x)&&!this.isTableRow(x)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
-"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,O){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var P=[],X=null,aa=null,W=0;W<O.length;W++)if(this.getModel().isVertex(O[W])){var ea=this.view.getState(O[W]);if(null!=ea){var ta=x?ea.getCenterX():ea.getCenterY();X=null!=X?Math.max(X,ta):ta;aa=null!=aa?Math.min(aa,ta):ta;P.push(ea)}}if(2<P.length){P.sort(function(Ea,Na){return x?Ea.x-Na.x:Ea.y-Na.y});ea=this.view.translate;ta=this.view.scale;
-aa=aa/ta-(x?ea.x:ea.y);X=X/ta-(x?ea.x:ea.y);this.getModel().beginUpdate();try{var ra=(X-aa)/(P.length-1);X=aa;for(W=1;W<P.length-1;W++){var va=this.view.getState(this.model.getParent(P[W].cell)),Ca=this.getCellGeometry(P[W].cell);X+=ra;null!=Ca&&null!=va&&(Ca=Ca.clone(),x?Ca.x=Math.round(X-Ca.width/2)-va.origin.x:Ca.y=Math.round(X-Ca.height/2)-va.origin.y,this.getModel().setGeometry(P[W].cell,Ca))}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&
-mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var O=null;null!=x&&0<x.length&&(x=JSON.parse(x),O=new mxImage(x.src,x.width,x.height));return O};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,O,P,X,aa,W,ea,ta,ra,va,Ca,Ea,Na,Wa){var Ra=
-null;if(null!=Wa)for(Ra=new mxDictionary,Ca=0;Ca<Wa.length;Ca++)Ra.put(Wa[Ca],!0);if(Wa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;aa=null!=aa?aa:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=va?va:!1;var Ga="page"==Na?this.view.getBackgroundPageBounds():W&&null==Ra||X||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Na&&null!=this.backgroundImage&&(Ga=mxRectangle.fromRectangle(Ga),
-Ga.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Ga)throw Error(mxResources.get("drawingEmpty"));X=O/Ka;Na=aa?-.5:0;var Pa=Graph.createSvgNode(Na,Na,Math.max(1,Math.ceil(Ga.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Ga.height*X)+2*P)+(va&&0==P?5:0),x),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");
-Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=aa?-.5:0;cb.textOffset=aa?-.5:0;cb.imageOffset=aa?-.5:0;cb.translate(Math.floor(P/O-Ga.x/Ka),Math.floor(P/O-Ga.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),
-xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ka/O;var vb=this.view.translate;Na=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Ga,Na)&&cb.image(mb.x+
-vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?null:hb};ta.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};ta.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Ra?Ra.get(Za.cell):hb.isCellSelected(Za.cell),
-kb=hb.model.getParent(Za.cell);!(W&&null==Ra||qb)&&null!=kb;)qb=null!=Ra?Ra.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(W&&null==Ra||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};ta.drawState(this.getView().getState(this.model.root),cb);this.updateSvgLinks(Pa,ra,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Wa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
-function(x,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var aa=x.createElement("a");aa.setAttribute("transform","translate(0,-5)");null==aa.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(aa.setAttribute("xlink:href",Graph.foreignObjectWarningLink),aa.setAttribute("target","_blank")):(aa.setAttributeNS(mxConstants.NS_XLINK,
-"xlink:href",Graph.foreignObjectWarningLink),aa.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);P.appendChild(X);aa.appendChild(x);P.appendChild(aa);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,O,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var aa=
-x[X].getAttribute("href");null==aa&&(aa=x[X].getAttribute("xlink:href"));null!=aa&&(null!=O&&/^https?:\/\//.test(aa)?x[X].setAttribute("target",O):P&&this.isCustomLink(aa)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&
-(x=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=
-function(x,O,P){for(;null!=x&&x.nodeName!=O;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,O,P){for(;null!=x&&!(0<=mxUtils.indexOf(O,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=function(x){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(x);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(x=O.createRange(),
-x.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,O,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var aa=0;aa<X.points.length;aa++)O?X.points[aa].x=P+(P-X.points[aa].x):X.points[aa].y=P+(P-X.points[aa].y);aa=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};aa(X.getTerminalPoint(!0));aa(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,O,P){this.model.beginUpdate();
-try{for(var X=this.model.getChildCount(x),aa=0;aa<X;aa++){var W=this.model.getChildAt(x,aa);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,O){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var aa=this.view.getState(x[X]);
-null!=aa&&this.flipEdgePoints(x[X],O,(O?aa.getCenterX():aa.getCenterY())/this.view.scale-(O?aa.origin.x:aa.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(x[X]);null!=W&&this.flipChildren(x[X],O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(x[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,O){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();
-try{for(var X=0;X<x.length;X++){var aa=this.model.getParent(x[X]);if(this.isTable(aa)){var W=this.getCellGeometry(x[X]),ea=this.getCellGeometry(aa);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(aa,ea))}}var ta=this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};
-Graph.prototype.insertTableColumn=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,aa=0;if(this.isTableCell(x)){var W=P.getParent(x);X=P.getParent(W);aa=mxUtils.indexOf(P.getChildCells(W,!0),x)}else this.isTableRow(x)?X=P.getParent(x):x=P.getChildCells(X,!0)[0],O||(aa=P.getChildCells(x,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(x=0;x<ea.length;x++){var ra=P.getChildCells(ea[x],!0)[aa],va=P.cloneCell(ra,!1),Ca=this.getCellGeometry(va);va.value=null;va.style=
-mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ca){null!=Ca.alternateBounds&&(Ca.width=Ca.alternateBounds.width,Ca.height=Ca.alternateBounds.height,Ca.alternateBounds=null);ta=Ca.width;var Ea=this.getCellGeometry(ea[x]);null!=Ea&&(Ca.height=Ea.height)}P.add(ea[x],va,aa+(O?0:1))}var Na=this.getCellGeometry(X);null!=Na&&(Na=Na.clone(),Na.width+=ta,P.setGeometry(X,Na))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var O=this.getModel();O.beginUpdate();
-try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:O.getParent(x);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==x&&(x=X[X.length-1]),O.remove(x))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var aa=P.getChildCells(X,!0);x=aa[O?0:aa.length-1]}else X=P.getParent(x);var W=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,W+(O?
-0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,aa=x;if(this.isTableCell(x))aa=P.getParent(x),X=P.getParent(aa);else if(this.isTableRow(x))X=P.getParent(x);else{var W=P.getChildCells(X,!0);aa=W[O?0:W.length-1]}var ea=P.getChildCells(aa,!0),ta=X.getIndex(aa);aa=P.cloneCell(aa,!1);aa.value=null;var ra=this.getCellGeometry(aa);if(null!=ra){for(W=0;W<ea.length;W++){x=P.cloneCell(ea[W],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,
-"rowspan",null),"colspan",null);var va=this.getCellGeometry(x);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=ra.height);aa.insert(x)}P.add(X,aa,ta+(O?0:1));var Ca=this.getCellGeometry(X);null!=Ca&&(Ca=Ca.clone(),Ca.height+=ra.height,P.setGeometry(X,Ca))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=O.getParent(x));
-this.isTableRow(X)&&(P=O.getParent(X));var aa=O.getChildCells(P,!0);if(0==aa.length)O.remove(P);else{this.isTableRow(X)||(X=aa[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(x)&&(ea=mxUtils.indexOf(W,x));for(X=x=0;X<aa.length;X++){var ta=O.getChildCells(aa[X],!0)[ea];O.remove(ta);var ra=this.getCellGeometry(ta);null!=ra&&(x=Math.max(x,ra.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=x,O.setGeometry(P,va))}}}finally{O.endUpdate()}};
-Graph.prototype.deleteTableRow=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=O.getParent(x));this.isTableRow(x)&&(P=O.getParent(X));var aa=O.getChildCells(P,!0);if(1>=aa.length)O.remove(P);else{this.isTableRow(X)||(X=aa[aa.length-1]);O.remove(X);x=0;var W=this.getCellGeometry(X);null!=W&&(x=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=x,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(x,O){for(var P=
-x.tBodies[0],X=P.rows[0].cells,aa=x=0;aa<X.length;aa++){var W=X[aa].getAttribute("colspan");x+=null!=W?parseInt(W):1}O=P.insertRow(O);for(aa=0;aa<x;aa++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=function(x,O){x.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(x,O){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var aa=document.createElement("th");P.rows[X].appendChild(aa);mxUtils.br(aa)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(O),
-mxUtils.br(X);return x.rows[0].cells[0<=O?O:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,O){if(0<=O){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>O&&x[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=function(x){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);
-O.insertNode(x)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,O){function P(aa,W){aa.length>W&&(aa=aa.substring(0,Math.round(W/2))+"..."+aa.substring(aa.length-Math.round(W/4)));return aa}x=null!=x?x:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",
-P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(aa){this.customLinkClicked(x);mxEvent.consume(aa)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});
-var x=this.updateMouseEvent;this.updateMouseEvent=function(W){W=x.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,W.graphX,W.graphY)||(W.state=this.view.getState(ea),null!=W.state&&null!=W.state.shape&&(this.container.style.cursor=W.state.shape.node.style.cursor))}null==W.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return W};var O=!1,P=!1,X=
-!1,aa=this.fireMouseEvent;this.fireMouseEvent=function(W,ea,ta){W==mxEvent.MOUSE_DOWN&&(ea=this.updateMouseEvent(ea),O=this.isCellSelected(ea.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());aa.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(W,ea){var ta=mxEvent.isMouseEvent(ea.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ea.getState()||!ea.isSource(ea.getState().control))&&(this.popupMenuHandler.popupTrigger||
-!X&&!ta&&(P&&null==ea.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(ea.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,ra,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);
-return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x="";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var O=this.textarea.ownerDocument.defaultView.getSelection(),
-P=O.getRangeAt(0),X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);O.removeAllRanges();O.addRange(P)};mxCellEditor.prototype.alignText=function(x,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(aa){P||window.getSelection().containsNode(aa,
-!0)?(aa.removeAttribute("align"),aa.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var O=[],P=0,X=x.rangeCount;P<X;++P)O.push(x.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=
-function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=x.length;O<P;++O)sel.addRange(x[O])}else document.selection&&x.select&&x.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));g.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,O){this.isKeepFocusEvent(x)||
-!mxEvent.isAltDown(x.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,O){x=this.graph.getStartEditingCell(x,O);y.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":
-"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function O(aa,
-W){W.originalNode=aa;aa=aa.firstChild;for(var ea=W.firstChild;null!=aa&&null!=ea;)O(aa,ea),aa=aa.nextSibling,ea=ea.nextSibling;return W}function P(aa,W){if(null!=aa)if(W.originalNode!=aa)X(aa);else for(aa=aa.firstChild,W=W.firstChild;null!=aa;){var ea=aa.nextSibling;null==W?X(aa):(P(aa,W),W=W.nextSibling);aa=ea}}function X(aa){for(var W=aa.firstChild;null!=W;){var ea=W.nextSibling;X(W);W=ea}1==aa.nodeType&&("BR"===aa.nodeName||null!=aa.firstChild)||3==aa.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(aa)).length?
-(3==aa.nodeType&&mxUtils.setTextContent(aa,mxUtils.getTextContent(aa).replace(/\n|\r/g,"")),1==aa.nodeType&&(aa.removeAttribute("style"),aa.removeAttribute("class"),aa.removeAttribute("width"),aa.removeAttribute("cellpadding"),aa.removeAttribute("cellspacing"),aa.removeAttribute("border"))):aa.parentNode.removeChild(aa)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(aa){var W=O(this.textarea,this.textarea.cloneNode(!0));
-window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?P(this.textarea,W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var O=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);
-0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),aa=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
-Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=aa?"bold":"normal";this.textarea.style.fontStyle=W?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=
-0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ta=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;
-this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=
-ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,O){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=
-60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<
-this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=
-Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,O){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,O);"1"==mxUtils.getValue(x.style,"nl2Br",
-"1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(x.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=
-mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&
-this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,
-null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=
-function(x){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,O){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
-this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;this.hint.innerHTML=d(x,P)+", "+d(O,P);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,O){G.apply(this,arguments);var P=this.graph.getCellStyle(x);if(null==P.childLayout){var X=this.graph.model.getParent(x),aa=null!=X?this.graph.getCellGeometry(X):null;if(null!=aa&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,
-"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);aa=aa.clone();P?aa.height=O.height+ea.y+ea.height+2*W:aa.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,aa)}}};var ha=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(ta){P.get(ta)||(P.put(ta,!0),aa.push(ta))}for(var O=ha.apply(this,arguments),P=new mxDictionary,
-X=this.graph.model,aa=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?x(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&x(X.getParent(ea));x(ea)}return aa};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var O=ka.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var O=
-ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,O){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(x,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):
-this.bounds};var pa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return pa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=R.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var O=function(Ra,Ga,Ka){for(var Pa=[],$a=0;$a<Ra.length;$a++){var eb=Ra[$a];Pa.push(null==eb?null:new mxPoint((ra+eb.x+Ga)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,aa=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,ra=this.state.origin.x+X.view.translate.x,va=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var Ca=X.view.getCellStates(aa.getChildCells(this.state.cell,!0));if(0<Ca.length){var Ea=aa.getChildCells(Ca[0].cell,!0),Na=
-X.getTableLines(this.state.cell,!1,!0),Wa=X.getTableLines(this.state.cell,!0,!1);for(aa=0;aa<Ca.length;aa++)mxUtils.bind(this,function(Ra){var Ga=Ca[Ra],Ka=Ra<Ca.length-1?Ca[Ra+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Wa[Ra]?new V(Wa[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Ga=new mxHandle(Ga,"row-resize",null,Ka);Ga.tableHandle=!0;var $a=
-0;Ga.shape.node.parentNode.insertBefore(Ga.shape.node,Ga.shape.node.parentNode.firstChild);Ga.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Wa[Ra],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(ea.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*W;this.shape.bounds.x=ea.x+(Ra==Ca.length-1?0:cb.x*W);this.shape.bounds.width=ea.width-(Ra==Ca.length-
-1?0:cb.width+cb.x+W)}this.shape.redraw()}};var eb=!1;Ga.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Pa&&eb&&($a=Math.min($a,Pa.height-Graph.minTableRowHeight))};Ga.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Ga.reset=function(){$a=0};
-x.push(Ga)})(aa);for(aa=0;aa<Ea.length;aa++)mxUtils.bind(this,function(Ra){var Ga=X.view.getState(Ea[Ra]),Ka=X.getCellGeometry(Ea[Ra]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Ga&&(Ga=new mxCellState(X.view,Ea[Ra],X.getCellStyle(Ea[Ra])),Ga.x=ea.x+Ka.x*W,Ga.y=ea.y+Ka.y*W,Ga.width=Pa.width*W,Ga.height=Pa.height*W,Ga.updateCachedBounds());Ka=Ra<Ea.length-1?Ea[Ra+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka):null;var $a=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Na[Ra]?
-new V(Na[Ra],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Ga=new mxHandle(Ga,"col-resize",null,Ka);Ga.tableHandle=!0;var eb=0;Ga.shape.node.parentNode.insertBefore(Ga.shape.node,Ga.shape.node.parentNode.firstChild);Ga.redraw=function(){if(null!=this.shape){this.shape.stroke=0==eb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Na[Ra],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(ea.cell,
-!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Pa.width+eb)*W;this.shape.bounds.y=ea.y+(Ra==Ea.length-1?0:db.y*W);this.shape.bounds.height=ea.height-(Ra==Ea.length-1?0:(db.height+db.y)*W)}this.shape.redraw()}};var cb=!1;Ga.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Pa.width,rb.x-db.x-Pa.width);cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Ga.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,
-eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Ga.positionChanged=function(){};Ga.reset=function(){eb=0};x.push(Ga)})(aa)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=x?"":"hidden";
-if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=null}this.moveHandles=[];for(O=0;O<x.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);
-X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(aa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(aa)&&this.graph.isCellSelected(P.cell)||this.graph.selectCellForEvent(P.cell,aa);mxEvent.isPopupTrigger(aa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(aa),mxEvent.getClientY(aa),this.graph.getSelectionCells()),
-this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(aa),this.graph.isMouseDown=!0);mxEvent.consume(aa)}),null,mxUtils.bind(this,function(aa){mxEvent.isPopupTrigger(aa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(aa),mxEvent.getClientY(aa),P.cell,aa),mxEvent.consume(aa))}));this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=
-0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),O=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;
-if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var aa=this.customHandles[X].shape.bounds,W=aa.getCenterX(),ea=aa.getCenterY();if(Math.abs(this.state.x-W)<aa.width/2||Math.abs(this.state.y-ea)<aa.height/2||Math.abs(this.state.x+this.state.width-W)<aa.width/2||Math.abs(this.state.y+this.state.height-ea)<aa.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?
-(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),x.x=this.sizers[0].bounds.width+O,x.y=this.sizers[0].bounds.height+O):x=Z.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/
-x),O)+" x "+d(this.roundLength(this.bounds.height/x),O)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display=
-"")};mxEdgeHandler.prototype.updateHint=function(x,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,aa=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=d(aa,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(aa=this.constraintHandler.currentConstraint.point,
-this.hint.innerHTML="["+Math.round(100*aa.x)+"%, "+Math.round(100*aa.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),O.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
-Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
-Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
+"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(x,O,P){null==O&&(O=this.getSelectionCells());if(null!=O&&1<O.length){for(var X=[],ba=null,W=null,ea=0,ta=0;ta<O.length;ta++)if(this.getModel().isVertex(O[ta])){var qa=this.view.getState(O[ta]);if(null!=qa){var va=x?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=x?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return x?Qa.x-Fa.x:Qa.y-Fa.y});
+P&&(ea-=x?X[0].width/2+X[X.length-1].width/2:X[0].height/2+X[X.length-1].height/2);qa=this.view.translate;va=this.view.scale;W=W/va-(x?qa.x:qa.y);ba=ba/va-(x?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?x?X[0].width/2:X[0].height/2:0);for(ta=1;ta<X.length-1;ta++){var Ma=this.view.getState(this.model.getParent(X[ta].cell)),Sa=this.getCellGeometry(X[ta].cell);Ca+=Ea;null!=Sa&&null!=Ma&&(Sa=Sa.clone(),x?Sa.x=Math.round(Ca-(P?0:Sa.width/2))-Ma.origin.x:Sa.y=Math.round(Ca-
+(P?0:Sa.height/2))-Ma.origin.y,this.getModel().setGeometry(X[ta].cell,Sa));P&&(Ca+=x?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(x){return mxClient.IS_MAC&&mxEvent.isMetaDown(x)||mxEvent.isControlDown(x)};Graph.prototype.createSvgImageExport=function(){var x=new mxImageExport;x.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return x};Graph.prototype.parseBackgroundImage=function(x){var O=
+null;null!=x&&0<x.length&&(x=JSON.parse(x),O=new mxImage(x.src,x.width,x.height));return O};Graph.prototype.getBackgroundImageObject=function(x){return x};Graph.prototype.getSvg=function(x,O,P,X,ba,W,ea,ta,qa,va,Ea,Ca,Ma,Sa){var Qa=null;if(null!=Sa)for(Qa=new mxDictionary,Ea=0;Ea<Sa.length;Ea++)Qa.put(Sa[Ea],!0);if(Sa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{O=null!=O?O:1;P=null!=P?P:0;ba=null!=ba?ba:!0;W=null!=W?W:!0;ea=null!=ea?ea:!0;va=null!=
+va?va:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():W&&null==Qa||X||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Ka,(this.view.translate.y+this.backgroundImage.y)*Ka,this.backgroundImage.width*Ka,this.backgroundImage.height*Ka)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));
+X=O/Ka;Ma=ba?-.5:0;var Pa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*X)+2*P)+(va&&0==P?5:0),Math.max(1,Math.ceil(Fa.height*X)+2*P)+(va&&0==P?5:0),x),$a=Pa.ownerDocument,eb=null!=$a.createElementNS?$a.createElementNS(mxConstants.NS_SVG,"g"):$a.createElement("g");Pa.appendChild(eb);var cb=this.createSvgCanvas(eb);cb.foOffset=ba?-.5:0;cb.textOffset=ba?-.5:0;cb.imageOffset=ba?-.5:0;cb.translate(Math.floor(P/O-Fa.x/Ka),Math.floor(P/O-Fa.y/Ka));var db=document.createElement("div"),rb=cb.getAlternateText;
+cb.getAlternateText=function(Za,fb,hb,qb,kb,ib,ub,ob,nb,wb,lb,gb,tb){if(null!=ib&&0<this.state.fontSize)try{mxUtils.isNode(ib)?ib=ib.innerText:(db.innerHTML=ib,ib=mxUtils.extractTextWithWhitespace(db.childNodes));for(var Cb=Math.ceil(2*qb/this.state.fontSize),xb=[],zb=0,pb=0;(0==Cb||zb<Cb)&&pb<ib.length;){var yb=ib.charCodeAt(pb);if(10==yb||13==yb){if(0<zb)break}else xb.push(ib.charAt(pb)),255>yb&&zb++;pb++}xb.length<ib.length&&1<ib.length-xb.length&&(ib=mxUtils.trim(xb.join(""))+"...");return ib}catch(Ab){return rb.apply(this,
+arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){x=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*x,(mb.y+vb.y)*x,mb.width*x,mb.height*x);mxUtils.intersects(Fa,Ma)&&cb.image(mb.x+vb.x,mb.y+vb.y,mb.width,mb.height,mb.src,!0)}cb.scale(X);cb.textEnabled=ea;ta=null!=ta?ta:this.createSvgImageExport();var Bb=ta.drawCellState,Xa=ta.getLinkForCellState;ta.getLinkForCellState=function(Za,fb){var hb=Xa.apply(this,arguments);return null==hb||Za.view.graph.isCustomLink(hb)?
+null:hb};ta.getLinkTargetForCellState=function(Za,fb){return Za.view.graph.getLinkTargetForCell(Za.cell)};ta.drawCellState=function(Za,fb){for(var hb=Za.view.graph,qb=null!=Qa?Qa.get(Za.cell):hb.isCellSelected(Za.cell),kb=hb.model.getParent(Za.cell);!(W&&null==Qa||qb)&&null!=kb;)qb=null!=Qa?Qa.get(kb):hb.isCellSelected(kb),kb=hb.model.getParent(kb);if(W&&null==Qa||qb)hb.view.redrawEnumerationState(Za),Bb.apply(this,arguments),this.doDrawShape(Za.secondLabel,fb)};ta.drawState(this.getView().getState(this.model.root),
+cb);this.updateSvgLinks(Pa,qa,!0);this.addForeignObjectWarning(cb,Pa);return Pa}finally{Sa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(x,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=x.createElement("switch"),X=x.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=x.createElement("a");ba.setAttribute("transform","translate(0,-5)");
+null==ba.setAttributeNS||O.ownerDocument!=document&&null==document.documentMode?(ba.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ba.setAttribute("target","_blank")):(ba.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ba.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));x=x.createElement("text");x.setAttribute("text-anchor","middle");x.setAttribute("font-size","10px");x.setAttribute("x","50%");x.setAttribute("y","100%");mxUtils.write(x,Graph.foreignObjectWarningText);
+P.appendChild(X);ba.appendChild(x);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(x,O,P){x=x.getElementsByTagName("a");for(var X=0;X<x.length;X++)if(null==x[X].getAttribute("target")){var ba=x[X].getAttribute("href");null==ba&&(ba=x[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?x[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&x[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(x){x=new mxSvgCanvas2D(x);
+x.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;x.pointerEvents=!0;return x};Graph.prototype.getSelectedElement=function(){var x=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(x=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(x=document.selection.createRange().parentElement());return x};Graph.prototype.getSelectedEditingElement=function(){for(var x=this.getSelectedElement();null!=x&&x.nodeType!=mxConstants.NODETYPE_ELEMENT;)x=x.parentNode;
+null!=x&&x==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(x=this.cellEditor.textarea.firstChild);return x};Graph.prototype.getParentByName=function(x,O,P){for(;null!=x&&x.nodeName!=O;){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.getParentByNames=function(x,O,P){for(;null!=x&&!(0<=mxUtils.indexOf(O,x.nodeName));){if(x==P)return null;x=x.parentNode}return x};Graph.prototype.selectNode=
+function(x){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(x);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(x=O.createRange(),x.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",x),P.select())};Graph.prototype.flipEdgePoints=function(x,O,P){var X=this.getCellGeometry(x);if(null!=X){X=X.clone();if(null!=X.points)for(var ba=0;ba<X.points.length;ba++)O?X.points[ba].x=P+
+(P-X.points[ba].x):X.points[ba].y=P+(P-X.points[ba].y);ba=function(W){null!=W&&(O?W.x=P+(P-W.x):W.y=P+(P-W.y))};ba(X.getTerminalPoint(!0));ba(X.getTerminalPoint(!1));this.model.setGeometry(x,X)}};Graph.prototype.flipChildren=function(x,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(x),ba=0;ba<X;ba++){var W=this.model.getChildAt(x,ba);if(this.model.isEdge(W))this.flipEdgePoints(W,O,P);else{var ea=this.getCellGeometry(W);null!=ea&&(ea=ea.clone(),O?ea.x=P+(P-ea.x-ea.width):ea.y=
+P+(P-ea.y-ea.height),this.model.setGeometry(W,ea))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(x,O){this.model.beginUpdate();try{x=this.model.getTopmostCells(x);for(var P=[],X=0;X<x.length;X++)if(this.model.isEdge(x[X])){var ba=this.view.getState(x[X]);null!=ba&&this.flipEdgePoints(x[X],O,(O?ba.getCenterX():ba.getCenterY())/this.view.scale-(O?ba.origin.x:ba.origin.y)-(O?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(x[X]);null!=W&&this.flipChildren(x[X],
+O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(x[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(x,O){var P=null;if(null!=x&&0<x.length){this.model.beginUpdate();try{for(var X=0;X<x.length;X++){var ba=this.model.getParent(x[X]);if(this.isTable(ba)){var W=this.getCellGeometry(x[X]),ea=this.getCellGeometry(ba);null!=W&&null!=ea&&(ea=ea.clone(),ea.height-=W.height,this.model.setGeometry(ba,ea))}}var ta=
+this.selectParentAfterDelete?this.model.getParents(x):null;this.removeCells(x,O)}finally{this.model.endUpdate()}if(null!=ta)for(P=[],X=0;X<ta.length;X++)this.model.contains(ta[X])&&(this.model.isVertex(ta[X])||this.model.isEdge(ta[X]))&&P.push(ta[X])}return P};Graph.prototype.insertTableColumn=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=0;if(this.isTableCell(x)){var W=P.getParent(x);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),x)}else this.isTableRow(x)?X=P.getParent(x):
+x=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(x,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(x=0;x<ea.length;x++){var qa=P.getChildCells(ea[x],!0)[ba],va=P.cloneCell(qa,!1),Ea=this.getCellGeometry(va);va.value=null;va.style=mxUtils.setStyle(mxUtils.setStyle(va.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ta=Ea.width;var Ca=this.getCellGeometry(ea[x]);
+null!=Ca&&(Ea.height=Ca.height)}P.add(ea[x],va,ba+(O?0:1))}var Ma=this.getCellGeometry(X);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ta,P.setGeometry(X,Ma))}finally{P.endUpdate()}};Graph.prototype.deleteLane=function(x){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(x).childLayout?x:O.getParent(x);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==x&&(x=X[X.length-1]),O.remove(x))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(x,O){var P=this.getModel();
+P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(x).childLayout){X=x;var ba=P.getChildCells(X,!0);x=ba[O?0:ba.length-1]}else X=P.getParent(x);var W=X.getIndex(x);x=P.cloneCell(x,!1);x.value=null;P.add(X,x,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(x,O){var P=this.getModel();P.beginUpdate();try{var X=x,ba=x;if(this.isTableCell(x))ba=P.getParent(x),X=P.getParent(ba);else if(this.isTableRow(x))X=P.getParent(x);else{var W=P.getChildCells(X,!0);
+ba=W[O?0:W.length-1]}var ea=P.getChildCells(ba,!0),ta=X.getIndex(ba);ba=P.cloneCell(ba,!1);ba.value=null;var qa=this.getCellGeometry(ba);if(null!=qa){for(W=0;W<ea.length;W++){x=P.cloneCell(ea[W],!1);x.value=null;x.style=mxUtils.setStyle(mxUtils.setStyle(x.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(x);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(x)}P.add(X,ba,
+ta+(O?0:1));var Ea=this.getCellGeometry(X);null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,P.setGeometry(X,Ea))}}finally{P.endUpdate()}};Graph.prototype.deleteTableColumn=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(X=O.getParent(x));this.isTableRow(X)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(0==ba.length)O.remove(P);else{this.isTableRow(X)||(X=ba[0]);var W=O.getChildCells(X,!0);if(1>=W.length)O.remove(P);else{var ea=W.length-1;this.isTableCell(x)&&
+(ea=mxUtils.indexOf(W,x));for(X=x=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(x=Math.max(x,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=x,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(x){var O=this.getModel();O.beginUpdate();try{var P=x,X=x;this.isTableCell(x)&&(x=X=O.getParent(x));this.isTableRow(x)&&(P=O.getParent(X));var ba=O.getChildCells(P,!0);if(1>=ba.length)O.remove(P);
+else{this.isTableRow(X)||(X=ba[ba.length-1]);O.remove(X);x=0;var W=this.getCellGeometry(X);null!=W&&(x=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=x,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(x,O){for(var P=x.tBodies[0],X=P.rows[0].cells,ba=x=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");x+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<x;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
+function(x,O){x.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(x,O){var P=x.tHead;if(null!=P)for(var X=0;X<P.rows.length;X++){var ba=document.createElement("th");P.rows[X].appendChild(ba);mxUtils.br(ba)}x=x.tBodies[0];for(P=0;P<x.rows.length;P++)X=x.rows[P].insertCell(O),mxUtils.br(X);return x.rows[0].cells[0<=O?O:x.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(x,O){if(0<=O){x=x.tBodies[0].rows;for(var P=0;P<x.length;P++)x[P].cells.length>O&&x[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
+function(x){if(window.getSelection){var O=window.getSelection();if(O.getRangeAt&&O.rangeCount){O=O.getRangeAt(0);O.deleteContents();var P=document.createElement("div");P.innerHTML=x;x=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=x.appendChild(X);O.insertNode(x)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(x)};Graph.prototype.createLinkForHint=function(x,O){function P(ba,W){ba.length>W&&(ba=ba.substring(0,Math.round(W/2))+"..."+ba.substring(ba.length-
+Math.round(W/4)));return ba}x=null!=x?x:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(x)?this.getLinkTitle(x):x;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(x));X.setAttribute("title",P(this.isCustomLink(x)?this.getLinkTitle(x):x,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(x)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(x);
+mxEvent.consume(ba)}));return X};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,ea){this.popupMenuHandler.hideMenu()});var x=this.updateMouseEvent;this.updateMouseEvent=function(W){W=x.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var ea=this.getCellAt(W.graphX,W.graphY);null!=ea&&this.isSwimlane(ea)&&this.hitsSwimlaneContent(ea,
+W.graphX,W.graphY)||(W.state=this.view.getState(ea),null!=W.state&&null!=W.state.shape&&(this.container.style.cursor=W.state.shape.node.style.cursor))}null==W.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return W};var O=!1,P=!1,X=!1,ba=this.fireMouseEvent;this.fireMouseEvent=function(W,ea,ta){W==mxEvent.MOUSE_DOWN&&(ea=this.updateMouseEvent(ea),O=this.isCellSelected(ea.getCell()),P=this.isSelectionEmpty(),X=this.popupMenuHandler.isMenuShowing());ba.apply(this,arguments)};
+this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(W,ea){var ta=mxEvent.isMouseEvent(ea.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==ea.getState()||!ea.isSource(ea.getState().control))&&(this.popupMenuHandler.popupTrigger||!X&&!ta&&(P&&null==ea.getCell()&&this.isSelectionEmpty()||O&&this.isCellSelected(ea.getCell())));ta=!O||ta?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var va=mxUtils.getScrollOrigin();
+this.popupMenuHandler.popup(ea.getX()+va.x+1,ea.getY()+va.y+1,qa,ea.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,ea,ta])})};mxCellEditor.prototype.isContentEditing=function(){var x=this.graph.view.getState(this.editingCell);return null!=x&&1==x.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var x=
+"";window.getSelection?x=window.getSelection():document.getSelection?x=document.getSelection():document.selection&&(x=document.selection.createRange().text);return""!=x};mxCellEditor.prototype.insertTab=function(x){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=x)for(X="";0<x;)X+=" ",x--;x=document.createElement("span");x.style.whiteSpace="pre";x.appendChild(document.createTextNode(X));P.insertNode(x);P.setStartAfter(x);P.setEndAfter(x);O.removeAllRanges();
+O.addRange(P)};mxCellEditor.prototype.alignText=function(x,O){var P=null!=O&&mxEvent.isShiftDown(O);if(P||null!=window.getSelection&&null!=window.getSelection().containsNode){var X=!0;this.graph.processElements(this.textarea,function(ba){P||window.getSelection().containsNode(ba,!0)?(ba.removeAttribute("align"),ba.style.textAlign=null):X=!1});X&&this.graph.cellEditor.setAlign(x)}document.execCommand("justify"+x.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var x=
+window.getSelection();if(x.getRangeAt&&x.rangeCount){for(var O=[],P=0,X=x.rangeCount;P<X;++P)O.push(x.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(x){try{if(x)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=x.length;O<P;++O)sel.addRange(x[O])}else document.selection&&x.select&&x.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(x){null!=x.text&&(x.text.replaceLinefeeds="0"!=mxUtils.getValue(x.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(x,O){this.isKeepFocusEvent(x)||!mxEvent.isAltDown(x.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(x){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+!1;var y=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(x,O){x=this.graph.getStartEditingCell(x,O);y.apply(this,arguments);var P=this.graph.view.getState(x);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(x);P=this.graph.getModel().getParent(x);var X=this.graph.getCellGeometry(x);if(this.graph.getModel().isEdge(P)&&null!=
+X&&X.relative||this.graph.getModel().isEdge(x))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var C=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(x){function O(ba,W){W.originalNode=ba;ba=ba.firstChild;for(var ea=W.firstChild;null!=ba&&null!=ea;)O(ba,ea),ba=ba.nextSibling,ea=ea.nextSibling;return W}function P(ba,W){if(null!=ba)if(W.originalNode!=ba)X(ba);else for(ba=ba.firstChild,W=W.firstChild;null!=
+ba;){var ea=ba.nextSibling;null==W?X(ba):(P(ba,W),W=W.nextSibling);ba=ea}}function X(ba){for(var W=ba.firstChild;null!=W;){var ea=W.nextSibling;X(W);W=ea}1==ba.nodeType&&("BR"===ba.nodeName||null!=ba.firstChild)||3==ba.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ba)).length?(3==ba.nodeType&&mxUtils.setTextContent(ba,mxUtils.getTextContent(ba).replace(/\n|\r/g,"")),1==ba.nodeType&&(ba.removeAttribute("style"),ba.removeAttribute("class"),ba.removeAttribute("width"),ba.removeAttribute("cellpadding"),
+ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}C.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ba){var W=O(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?P(this.textarea,
+W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var x=this.graph.view.getState(this.editingCell);if(null!=x){var O=null!=x&&"0"!=mxUtils.getValue(x.style,"nl2Br","1"),P=this.saveSelection();if(this.codeViewMode){ta=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ta.length&&"\n"==ta.charAt(ta.length-1)&&(ta=ta.substring(0,ta.length-1));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"<br/>"):ta,!0);this.textarea.className="mxCellEditor geContentEditable";
+qa=mxUtils.getValue(x.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(x.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(x.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&ea.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=ea.join(" ");this.textarea.style.fontWeight=ba?"bold":"normal";
+this.textarea.style.fontStyle=W?"italic":"";this.textarea.style.fontFamily=O;this.textarea.style.textAlign=X;this.textarea.style.padding="0px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ta=mxUtils.htmlEntities(this.textarea.innerHTML);
+8!=document.documentMode&&(ta=mxUtils.replaceTrailingNewlines(ta,"<div><br></div>"));ta=this.graph.sanitizeHtml(O?ta.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ta,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var qa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight=
+"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ta&&(this.textarea.innerHTML=ta);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=P;this.resize()}};var I=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(x,
+O){if(null!=this.textarea)if(x=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=x){var P=x.view.scale;this.bounds=mxRectangle.fromRectangle(x);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=x.text?x.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(x.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(x.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
+this.bounds.x+=X.x*this.bounds.width;this.bounds.y+=X.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/P)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/P)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/P)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*P);this.textarea.clientWidth<
+this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/P)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*P);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+P+","+P+")")}else this.textarea.style.height="",this.textarea.style.overflow="",I.apply(this,arguments)};mxCellEditorGetInitialValue=
+mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,O){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(x.cell,O);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,
+"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(x.style,"nl2Br","1")?O.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):O.replace(/\r\n/g,"").replace(/\n/g,"")};var D=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};
+var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(x.cell)&&0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
+!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(x){var O=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=x.cell.geometry&&0<x.cell.geometry.width)||0==mxUtils.getValue(x.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(x.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(x.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(x){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,O){return mxGraphHandlerIsValidDropTarget.apply(this,
+arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?d(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var O=this.graph.view.translate,P=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/P-O.x);O=this.roundLength((this.bounds.y+this.currentDy)/P-O.y);P=this.graph.view.unit;
+this.hint.innerHTML=d(x,P)+", "+d(O,P);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var G=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,O){G.apply(this,arguments);var P=this.graph.getCellStyle(x);
+if(null==P.childLayout){var X=this.graph.model.getParent(x),ba=null!=X?this.graph.getCellGeometry(X):null;if(null!=ba&&(P=this.graph.getCellStyle(X),"stackLayout"==P.childLayout)){var W=parseFloat(mxUtils.getValue(P,"stackBorder",mxStackLayout.prototype.border));P="1"==mxUtils.getValue(P,"horizontalStack","1");var ea=this.graph.getActualStartSize(X);ba=ba.clone();P?ba.height=O.height+ea.y+ea.height+2*W:ba.width=O.width+ea.x+ea.width+2*W;this.graph.model.setGeometry(X,ba)}}};var ia=mxSelectionCellsHandler.prototype.getHandledSelectionCells;
+mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(ta){P.get(ta)||(P.put(ta,!0),ba.push(ta))}for(var O=ia.apply(this,arguments),P=new mxDictionary,X=this.graph.model,ba=[],W=0;W<O.length;W++){var ea=O[W];this.graph.isTableCell(ea)?x(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&x(X.getParent(ea));x(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var O=ka.apply(this,
+arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(x){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-
+x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,O){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(x,O){return mxEvent.isControlDown(O.getEvent())||mxEvent.isMetaDown(O.getEvent())};var ca=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ca.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&
+!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var pa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return pa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var ra=mxVertexHandler.prototype.isCustomHandleVisible;
+mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var x=0;this.graph.isTableRow(this.state.cell)?x=1:this.graph.isTableCell(this.state.cell)&&(x=2);return x};var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,R=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var x=R.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var O=function(Qa,Fa,Ka){for(var Pa=[],$a=0;$a<Qa.length;$a++){var eb=Qa[$a];Pa.push(null==eb?null:new mxPoint((qa+eb.x+Fa)*W,(va+eb.y+Ka)*W))}return Pa},P=this,X=this.graph,ba=X.model,W=X.view.scale,ea=this.state,ta=this.selectionBorder,qa=this.state.origin.x+X.view.translate.x,
+va=this.state.origin.y+X.view.translate.y;null==x&&(x=[]);var Ea=X.view.getCellStates(ba.getChildCells(this.state.cell,!0));if(0<Ea.length){var Ca=ba.getChildCells(Ea[0].cell,!0),Ma=X.getTableLines(this.state.cell,!1,!0),Sa=X.getTableLines(this.state.cell,!0,!1);for(ba=0;ba<Ea.length;ba++)mxUtils.bind(this,function(Qa){var Fa=Ea[Qa],Ka=Qa<Ea.length-1?Ea[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka.cell):null;var Pa=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Sa[Qa]?new V(Sa[Qa],
+mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ka);Fa.tableHandle=!0;var $a=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==$a?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Sa[Qa],0,$a),this.shape.updateBoundsFromLine();else{var cb=X.getActualStartSize(ea.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+$a*W;this.shape.bounds.x=ea.x+(Qa==Ea.length-1?0:cb.x*W);this.shape.bounds.width=ea.width-(Qa==Ea.length-1?0:cb.width+cb.x+W)}this.shape.redraw()}};var eb=!1;Fa.setPosition=function(cb,db,rb){$a=Math.max(Graph.minTableRowHeight-cb.height,db.y-cb.y-cb.height);eb=mxEvent.isShiftDown(rb.getEvent());null!=Pa&&eb&&($a=Math.min($a,Pa.height-Graph.minTableRowHeight))};Fa.execute=function(cb){if(0!=$a)X.setTableRowHeight(this.state.cell,
+$a,!eb);else if(!P.blockDelayedSelection){var db=X.getCellAt(cb.getGraphX(),cb.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(db,cb)}$a=0};Fa.reset=function(){$a=0};x.push(Fa)})(ba);for(ba=0;ba<Ca.length;ba++)mxUtils.bind(this,function(Qa){var Fa=X.view.getState(Ca[Qa]),Ka=X.getCellGeometry(Ca[Qa]),Pa=null!=Ka.alternateBounds?Ka.alternateBounds:Ka;null==Fa&&(Fa=new mxCellState(X.view,Ca[Qa],X.getCellStyle(Ca[Qa])),Fa.x=ea.x+Ka.x*W,Fa.y=ea.y+Ka.y*W,Fa.width=Pa.width*W,Fa.height=Pa.height*
+W,Fa.updateCachedBounds());Ka=Qa<Ca.length-1?Ca[Qa+1]:null;Ka=null!=Ka?X.getCellGeometry(Ka):null;var $a=null!=Ka&&null!=Ka.alternateBounds?Ka.alternateBounds:Ka;Ka=null!=Ma[Qa]?new V(Ma[Qa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ka.isDashed=ta.isDashed;Ka.svgStrokeTolerance++;Fa=new mxHandle(Fa,"col-resize",null,Ka);Fa.tableHandle=!0;var eb=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==eb?mxConstants.NONE:ta.stroke;if(this.shape.constructor==V)this.shape.line=O(Ma[Qa],eb,0),this.shape.updateBoundsFromLine();else{var db=X.getActualStartSize(ea.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Pa.width+eb)*W;this.shape.bounds.y=ea.y+(Qa==Ca.length-1?0:db.y*W);this.shape.bounds.height=ea.height-(Qa==Ca.length-1?0:(db.height+db.y)*W)}this.shape.redraw()}};var cb=!1;Fa.setPosition=function(db,rb,mb){eb=Math.max(Graph.minTableColumnWidth-Pa.width,rb.x-db.x-Pa.width);
+cb=mxEvent.isShiftDown(mb.getEvent());null==$a||cb||(eb=Math.min(eb,$a.width-Graph.minTableColumnWidth))};Fa.execute=function(db){if(0!=eb)X.setTableColumnWidth(this.state.cell,eb,cb);else if(!P.blockDelayedSelection){var rb=X.getCellAt(db.getGraphX(),db.getGraphY())||ea.cell;X.graphHandler.selectCellForEvent(rb,db)}eb=0};Fa.positionChanged=function(){};Fa.reset=function(){eb=0};x.push(Fa)})(ba)}}return null!=x?x.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(x){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=x?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.graph.model;if(null!=this.moveHandles){for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].parentNode.removeChild(this.moveHandles[O]);this.moveHandles=
+null}this.moveHandles=[];for(O=0;O<x.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&x.isVertex(P.cell)){var X=mxUtils.createImage(Editor.rowMoveImage);X.style.position="absolute";X.style.cursor="pointer";X.style.width="7px";X.style.height="4px";X.style.padding="4px 2px 4px 2px";X.rowState=P;mxEvent.addGestureListeners(X,mxUtils.bind(this,function(ba){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ba)&&this.graph.isCellSelected(P.cell)||
+this.graph.selectCellForEvent(P.cell,ba);mxEvent.isPopupTrigger(ba)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ba),mxEvent.getClientY(ba),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ba),this.graph.isMouseDown=!0);mxEvent.consume(ba)}),null,mxUtils.bind(this,function(ba){mxEvent.isPopupTrigger(ba)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ba),mxEvent.getClientY(ba),P.cell,ba),mxEvent.consume(ba))}));
+this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(x.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var x=0;x<this.customHandles.length;x++)this.customHandles[x].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,
+0),O=this.tolerance,P=this.state.style.shape;null==mxCellRenderer.defaultShapes[P]&&mxStencilRegistry.getStencil(P);P=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!P&&null!=this.customHandles)for(var X=0;X<this.customHandles.length;X++)if(null!=this.customHandles[X].shape&&null!=this.customHandles[X].shape.bounds){var ba=this.customHandles[X].shape.bounds,W=ba.getCenterX(),ea=ba.getCenterY();if(Math.abs(this.state.x-W)<ba.width/2||Math.abs(this.state.y-
+ea)<ba.height/2||Math.abs(this.state.x+this.state.width-W)<ba.width/2||Math.abs(this.state.y+this.state.height-ea)<ba.height/2){P=!0;break}}P&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(O/=2,this.graph.isTable(this.state.cell)&&(O+=7),x.x=this.sizers[0].bounds.width+O,x.y=this.sizers[0].bounds.height+O):x=Z.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=d(this.roundLength(this.bounds.width/x),O)+" x "+d(this.roundLength(this.bounds.height/x),O)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,O){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
+"none")};var q=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,O){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var P=this.graph.view.translate,X=this.graph.view.scale,ba=this.roundLength(O.x/X-P.x);P=this.roundLength(O.y/X-P.y);X=this.graph.view.unit;this.hint.innerHTML=
+d(ba,X)+", "+d(P,X);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ba=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ba.x)+"%, "+Math.round(100*ba.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),O.y)+Editor.hintOffset+
+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,
+9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
24,24);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;
@@ -2654,303 +2655,303 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(x){return!mxEvent.isShiftDown(x.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(x){return!mxEvent.isShiftDown(x.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=-16,mxConstraintHandler.prototype.getTolerance=function(x){return mxEvent.isMouseEvent(x.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return null==x.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==x.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(x,O){F.apply(this,arguments);mxEvent.isTouchEvent(O.getEvent())&&this.graph.isCellSelected(O.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(x){var O=x.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==x.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(x){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,aa=null,W=x=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,aa=this.first.y,x=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-aa)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(x=this.graph.snap(x),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,aa,this.graph.getDefaultParent(),
-!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),ra=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=ra&&(ra=ra.clone(),ra.translate(x,W),this.graph.model.setGeometry(ea[P],ra))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(x,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
-x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-x,aa=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(aa)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(O)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,this.graph.isGridEnabled()||
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(x.getEvent())||mxEvent.isMetaDown(x.getEvent()))&&mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(x,O){if(this.cancelled)this.cancelled=!1,O.consume();else{var P=null!=this.div&&"none"!=this.div.style.display,X=null,ba=null,W=x=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,x=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(x=this.graph.snap(x),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(x)<this.graph.tolerance&&(x=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(P){if(this.isSpaceEvent(O)){this.graph.model.beginUpdate();try{var ea=this.graph.getCellsBeyond(X,ba,this.graph.getDefaultParent(),
+!0,!0);for(P=0;P<ea.length;P++)if(this.graph.isCellMovable(ea[P])){var ta=this.graph.view.getState(ea[P]),qa=this.graph.getCellGeometry(ea[P]);null!=ta&&null!=qa&&(qa=qa.clone(),qa.translate(x,W),this.graph.model.setGeometry(ea[P],qa))}}finally{this.graph.model.endUpdate()}}else ea=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(ea,O.getEvent());O.consume()}}};mxRubberband.prototype.mouseMove=function(x,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+x=mxUtils.getOffset(this.graph.container);P.x-=x.x;P.y-=x.y;x=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-x,ba=this.first.y-P,W=this.graph.tolerance;if(null!=this.div||Math.abs(X)>W||Math.abs(ba)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(x,P),this.isSpaceEvent(O)?(x=this.x+this.width,P=this.y+this.height,X=this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(this.width=this.graph.snap(this.width/X)*X,this.height=this.graph.snap(this.height/X)*X,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=x-this.width),this.y<this.first.y&&(this.y=P-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)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var ba=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(ba=(new Date).getTime(),
-U=0):U=(new Date).getTime()-ba;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),O.consume()}};var T=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);T.apply(this,arguments)};var aa=(new Date).getTime(),U=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(x,O,P,X){da.apply(this,arguments);P!=this.currentTerminalState?(aa=(new Date).getTime(),
+U=0):U=(new Date).getTime()-aa;this.currentTerminalState=P};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(x){return mxEvent.isShiftDown(x.getEvent())&&mxEvent.isAltDown(x.getEvent())?!1:null!=this.currentTerminalState&&x.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(x,O,P){O=null!=x&&0==x;var X=this.state.getVisibleTerminalState(O);x=null!=x&&(0==x||x>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==x)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=x?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),x):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=x&&null!=X?P?this.endTerminalHandleImage:this.terminalHandleImage:P?this.endHandleImage:this.handleImage;if(null!=P)return P=
new mxImageShape(new mxRectangle(0,0,P.width,P.height),P.src),P.preserveImageAspect=!1,P;P=mxConstants.HANDLE_SIZE;this.preferHtml&&--P;return new mxRectangleShape(new mxRectangle(0,0,P,P),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var na=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(x,O,P){this.handleImage=O==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:O==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
return na.apply(this,arguments)};var sa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(x){if(null!=x&&1==x.length){var O=this.graph.getModel(),P=O.getParent(x[0]),X=this.graph.getCellGeometry(x[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(x[0]),null!=O&&2>O.width&&2>O.height&&null!=O.text&&null!=O.text.boundingBox))return mxRectangle.fromRectangle(O.text.boundingBox)}return sa.apply(this,arguments)};var za=mxGraphHandler.prototype.getGuideStates;
mxGraphHandler.prototype.getGuideStates=function(){for(var x=za.apply(this,arguments),O=[],P=0;P<x.length;P++)"1"!=mxUtils.getValue(x[P].style,"part","0")&&O.push(x[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(x){var O=this.graph.getModel(),P=O.getParent(x.cell),X=this.graph.getCellGeometry(x.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>x.width&&2>x.height&&null!=x.text&&null!=x.text.boundingBox?(O=x.text.unrotatedBoundingBox||
-x.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),aa=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==aa||!aa.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
+x.text.boundingBox,new mxRectangle(Math.round(O.x),Math.round(O.y),Math.round(O.width),Math.round(O.height))):ua.apply(this,arguments)};var Ba=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(x,O){var P=this.graph.getModel(),X=P.getParent(this.state.cell),ba=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(O)==mxEvent.ROTATION_HANDLE||!P.isEdge(X)||null==ba||!ba.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Ba.apply(this,
arguments)};mxVertexHandler.prototype.rotateClick=function(){var x=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),O=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&x==mxConstants.NONE&&O==mxConstants.NONE?(x=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,x,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(x,O){oa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(x,O){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ya=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ya.apply(this,arguments);var x=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var O=0;4>O;O++){var P=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);P.dialect=mxConstants.DIALECT_SVG;P.init(this.graph.view.getOverlayPane());this.cornerHandles.push(P)}}var X=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(aa,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(aa,W){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(ba,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));X()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ba,W){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
O=this.graph.getLinkForCell(this.state.cell);P=this.graph.getLinksForState(this.state);this.updateLinkHint(O,P);if(null!=O||null!=P&&0<P.length)x=!0;x&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(x,O){try{if(null==x&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=x||null!=O&&0<O.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=x&&(this.linkHint.appendChild(this.graph.createLinkForHint(x)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var P=document.createElement("img");P.className="geAdaptiveAsset";P.setAttribute("src",Editor.editImage);
P.setAttribute("title",mxResources.get("editLink"));P.setAttribute("width","11");P.setAttribute("height","11");P.style.marginLeft="10px";P.style.marginBottom="-1px";P.style.cursor="pointer";this.linkHint.appendChild(P);mxEvent.addListener(P,"click",mxUtils.bind(this,function(W){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(W)}));var X=P.cloneNode(!0);X.setAttribute("src",Editor.trashImage);X.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var aa=document.createElement("div");aa.style.marginTop=null!=x||0<P?"6px":"0px";aa.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(aa)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
+X.style.marginLeft="4px";this.linkHint.appendChild(X);mxEvent.addListener(X,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=O)for(P=0;P<O.length;P++){var ba=document.createElement("div");ba.style.marginTop=null!=x||0<P?"6px":"0px";ba.appendChild(this.graph.createLinkForHint(O[P].getAttribute("href"),mxUtils.getTextContent(O[P])));this.linkHint.appendChild(ba)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};mxEdgeHandler.prototype.updateLinkHint=
mxVertexHandler.prototype.updateLinkHint;var La=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){La.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var x=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.changeHandler=mxUtils.bind(this,function(X,aa){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
-P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ma=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
+this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(X,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));x();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var O=this.graph.getLinkForCell(this.state.cell),P=this.graph.getLinksForState(this.state);if(null!=O||null!=P&&0<P.length)this.updateLinkHint(O,
+P),this.redrawHandles()};var Oa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Oa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Na=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var x=0;x<this.moveHandles.length;x++)this.moveHandles[x].style.left=this.moveHandles[x].rowState.x+this.moveHandles[x].rowState.width-
5+"px",this.moveHandles[x].style.top=this.moveHandles[x].rowState.y+this.moveHandles[x].rowState.height/2-6+"px";if(null!=this.cornerHandles){x=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+x;O[0].bounds.y=this.state.y-P+x;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*x;O[1].bounds.y=O[0].bounds.y;O[1].redraw();O[2].bounds.x=O[0].bounds.x;O[2].bounds.y=this.state.y+this.state.height-2*x;O[2].redraw();O[3].bounds.x=
-O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ma.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
+O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(x=0;x<this.cornerHandles.length;x++)this.cornerHandles[x].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Na.apply(this);null!=this.state&&null!=this.linkHint&&(x=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),
O=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),P=mxUtils.getBoundingBox(O,this.state.style[mxConstants.STYLE_ROTATION]||"0",x),x=null!=P?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,O=null!=this.state.text?this.state.text.boundingBox:null,null==P&&(P=this.state),P=P.y+P.height,null!=O&&(P=Math.max(P,O.y+O.height)),this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px",
this.linkHint.style.top=Math.round(P+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ia=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ia.apply(this,arguments);if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&null!=this.moveHandles[x].parentNode&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}if(null!=this.cornerHandles){for(x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&
null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var wa=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(wa.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(x.x+(x.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
Math.round(x.y+x.height+Editor.hintOffset)+"px"}};var ab=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ab.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Ya=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Ya.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,m,v){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=v?v:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
-function e(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function y(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ha(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.changeHandler=null)}}();(function(){function b(c,m,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function d(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function B(){mxCylinder.call(this)}function p(){mxActor.call(this)}function E(){mxCylinder.call(this)}function M(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function K(){mxShape.call(this)}function Q(){mxShape.call(this)}
+function e(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function v(){mxCylinder.call(this)}function y(){mxActor.call(this)}function C(){mxActor.call(this)}function I(){mxActor.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function G(){mxActor.call(this)}function ia(){mxActor.call(this)}function ka(c,m){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ka.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ka.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ka.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ka.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,ka.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ka.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function Z(){mxShape.call(this)}function la(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
-function T(){mxShape.call(this)}function ba(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function oa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Oa(){mxActor.call(this)}function Ma(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function x(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function aa(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function va(){mxRhombus.call(this)}function Ca(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxEllipse.call(this)}function Ra(){mxActor.call(this)}function Ga(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Pa(c,m,v,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=v;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
-function eb(c,m,v,n,t,z,A,ia,J,xa){A+=J;var ma=n.clone();n.x-=t*(2*A+J);n.y-=z*(2*A+J);t*=A+J;z*=A+J;return function(){c.ellipse(ma.x-t-A,ma.y-z-A,2*A,2*A);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var v=this.line[m];null!=v&&(v=new mxRectangle(v.x,v.y,this.strokewidth,this.strokewidth),null==c?c=v:c.add(v))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,m,v,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,v,n){if(null!=m){var t=null;c.begin();for(var z=0;z<m.length;z++){var A=m[z];null!=A&&(null==t?c.moveTo(A.x+v,A.y+n):null!=t&&c.lineTo(A.x+v,A.y+n));t=A}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var v=null,n=0;n<this.line.length&&!m;n++){var t=this.line[n];null!=t&&null!=v&&(m=mxUtils.rectangleIntersectsSegment(c,
-v,t));v=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,v,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ia=this.getTitleSize();0==ia||this.outline?Na.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-v));z||this.outline||!(A&&ia<t||!A&&ia<n)||this.paintForeground(c,m,v,n,t)};d.prototype.paintForeground=function(c,m,v,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ia=z;z=A;A=ia}c.rotate(-this.getShapeRotation(),z,A,m+n/2,v+t/2);s=this.scale;m=this.bounds.x/s;v=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
-s;this.paintTableForeground(c,m,v,n,t)}};d.prototype.paintTableForeground=function(c,m,v,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,v)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-d);mxUtils.extend(k,d);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ia=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(z,t);c.lineTo(0,t-z);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-z,0),c.lineTo(n,z),c.lineTo(z,z),c.close(),c.fill()),0!=ia&&(c.setFillAlpha(Math.abs(ia)),c.setFillColor(0>ia?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(z,
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ka.prototype.arcTo)}function ja(){mxRectangleShape.call(this)}function ca(){mxRectangleShape.call(this)}function pa(){mxActor.call(this)}function ra(){mxActor.call(this)}function L(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function R(){mxRectangleShape.call(this)}function Y(){mxCylinder.call(this)}function Z(){mxShape.call(this)}function la(){mxShape.call(this)}function q(){mxEllipse.call(this)}function F(){mxShape.call(this)}
+function T(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function U(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function na(){mxShape.call(this)}function sa(){mxShape.call(this)}function za(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Ba(){mxRectangleShape.call(this)}function oa(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);this.spacing=0}function La(){mxArrowConnector.call(this);
+this.spacing=0}function Oa(){mxActor.call(this)}function Na(){mxRectangleShape.call(this)}function Ia(){mxActor.call(this)}function wa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Ya(){mxActor.call(this)}function x(){mxActor.call(this)}function O(){mxActor.call(this)}function P(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function W(){mxActor.call(this)}function ea(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}
+function va(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Sa(){mxEllipse.call(this)}function Qa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Pa(c,m,u,n){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=u;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function $a(){mxConnector.call(this)}
+function eb(c,m,u,n,t,z,A,ha,J,xa){A+=J;var ma=n.clone();n.x-=t*(2*A+J);n.y-=z*(2*A+J);t*=A+J;z*=A+J;return function(){c.ellipse(ma.x-t-A,ma.y-z-A,2*A,2*A);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var u=this.line[m];null!=u&&(u=new mxRectangle(u.x,u.y,this.strokewidth,this.strokewidth),null==c?c=u:c.add(u))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function(c,m,u,n,t){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,u,n){if(null!=m){var t=null;c.begin();for(var z=0;z<m.length;z++){var A=m[z];null!=A&&(null==t?c.moveTo(A.x+u,A.y+n):null!=t&&c.lineTo(A.x+u,A.y+n));t=A}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var u=null,n=0;n<this.line.length&&!m;n++){var t=this.line[n];null!=t&&null!=u&&(m=mxUtils.rectangleIntersectsSegment(c,
+u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(d,mxSwimlane);d.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};d.prototype.paintVertexShape=function(c,m,u,n,t){var z=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,A=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,
+arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-u));z||this.outline||!(A&&ha<t||!A&&ha<n)||this.paintForeground(c,m,u,n,t)};d.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.state){var z=this.flipH,A=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=z;z=A;A=ha}c.rotate(-this.getShapeRotation(),z,A,m+n/2,u+t/2);s=this.scale;m=this.bounds.x/s;u=this.bounds.y/s;n=this.bounds.width/s;t=this.bounds.height/
+s;this.paintTableForeground(c,m,u,n,t)}};d.prototype.paintTableForeground=function(c,m,u,n,t){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(t=0;t<n.length;t++)b.prototype.paintTableLine(c,n[t],m,u)};d.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+d);mxUtils.extend(k,d);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(l,mxCylinder);l.prototype.size=20;l.prototype.darkOpacity=0;l.prototype.darkOpacity2=0;l.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"darkOpacity2",this.darkOpacity2))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(z,t);c.lineTo(0,t-z);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-z,0),c.lineTo(n,z),c.lineTo(z,z),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(z,
z),c.lineTo(z,t),c.lineTo(0,t-z),c.close(),c.fill()),c.begin(),c.moveTo(z,t),c.lineTo(z,z),c.lineTo(0,0),c.moveTo(z,z),c.lineTo(n,z),c.end(),c.stroke())};l.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",l);var cb=Math.tan(mxUtils.toRadians(30)),db=(.5-cb)/2;mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(B,
-mxCylinder);B.prototype.size=6;B.prototype.paintVertexShape=function(c,m,v,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),v+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,v,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",B);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,v,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
-.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,v,n,t,z){m=Math.min(n,t/(.5+cb));z?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(t-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
-m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,m,v,n,t,z){m=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(z&&null!=this.fill||!z&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,
--m);z||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,t-m),c.curveTo(n,t+m/3,0,t+m/3,0,t-m),c.close())};M.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",M);mxUtils.extend(S,mxCylinder);S.prototype.size=30;S.prototype.darkOpacity=0;S.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,v);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),c.close(),c.fill()),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",S);mxUtils.extend(H,S);mxCellRenderer.registerShape("note2",H);H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(K,mxShape);K.prototype.isoAngle=15;K.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;z=Math.min(n*Math.tan(z),.5*t);c.translate(m,v);c.begin();c.moveTo(.5*n,0);c.lineTo(n,z);c.lineTo(n,t-z);c.lineTo(.5*n,t);c.lineTo(0,t-z);c.lineTo(0,z);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,z);c.lineTo(.5*n,2*z);c.lineTo(n,z);c.moveTo(.5*n,2*z);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",K);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.max(0,Math.min(.5*
-t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,v);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
-15;e.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,v);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
-A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,v,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.arcSize=.1;
-g.prototype.paintVertexShape=function(c,m,v,n,t){c.translate(m,v);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),A=mxUtils.getValue(this.style,"rounded",!1),ia=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ia||(J*=Math.min(n,t));
-J=Math.min(J,.5*n,.5*(t-v));m=Math.max(m,J);m=Math.min(n-J,m);A||(J=0);c.begin();"left"==z?(c.moveTo(Math.max(J,0),v),c.lineTo(Math.max(J,0),0),c.lineTo(m,0),c.lineTo(m,v)):(c.moveTo(n-m,v),c.lineTo(n-m,0),c.lineTo(n-Math.max(J,0),0),c.lineTo(n-Math.max(J,0),v));A?(c.moveTo(0,J+v),c.arcTo(J,J,0,0,1,J,v),c.lineTo(n-J,v),c.arcTo(J,J,0,0,1,n,J+v),c.lineTo(n,t-J),c.arcTo(J,J,0,0,1,n-J,t),c.lineTo(J,t),c.arcTo(J,J,0,0,1,0,t-J)):(c.moveTo(0,v),c.lineTo(n,v),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,v+20),c.lineTo(n-20,v+10),c.lineTo(n-10,v+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,z,Math.min(c.height,c.height-
-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(u,mxCylinder);u.prototype.arcSize=.1;u.prototype.paintVertexShape=function(c,m,v,n,t){c.translate(m,v);var z=mxUtils.getValue(this.style,"rounded",!1),A=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v=mxUtils.getValue(this.style,"umlStateConnection",null);A||(m*=Math.min(n,t));m=Math.min(m,.5*n,.5*t);z||(m=0);z=0;null!=v&&(z=10);c.begin();c.moveTo(z,
-m);c.arcTo(m,m,0,0,1,z+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,t-m);c.arcTo(m,m,0,0,1,n-m,t);c.lineTo(z+m,t);c.arcTo(m,m,0,0,1,z,t-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==v?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-v&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};u.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",u);mxUtils.extend(y,mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
-function(c,m,v,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,m,v,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),v=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
-n,new mxRectangle(c.x,c.y+m,v,n-2*m);m*=v;return new mxRectangle(c.x+m,c.y,v-2*m,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};I.prototype.redrawPath=function(c,m,v,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(n,0);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,v,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
+mxCylinder);B.prototype.size=6;B.prototype.paintVertexShape=function(c,m,u,n,t){c.setFillColor(this.stroke);var z=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(n-z),u+.5*(t-z),z,z);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};mxCellRenderer.registerShape("waypoint",B);mxUtils.extend(p,mxActor);p.prototype.size=20;p.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/cb);c.translate((n-m)/2,(t-m)/2+m/4);c.moveTo(0,
+.25*m);c.lineTo(.5*m,m*db);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-db)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",p);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(n,t/(.5+cb));z?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-db)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-db)*m),c.lineTo(.5*m,(1-db)*m)):(c.translate((n-m)/2,(t-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*db),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*
+m,(1-db)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(M,mxCylinder);M.prototype.redrawPath=function(c,m,u,n,t,z){m=Math.min(t/2,Math.round(t/8)+this.strokewidth-1);if(z&&null!=this.fill||!z&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,n,2*m,n,m),z||(c.stroke(),c.begin()),c.translate(0,
+-m);z||(c.moveTo(0,m),c.curveTo(0,-m/3,n,-m/3,n,m),c.lineTo(n,t-m),c.curveTo(n,t+m/3,0,t+m/3,0,t-m),c.close())};M.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",M);mxUtils.extend(S,mxCylinder);S.prototype.size=30;S.prototype.darkOpacity=0;S.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",
+this.size))))),A=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,u);c.begin();c.moveTo(0,0);c.lineTo(n-z,0);c.lineTo(n,z);c.lineTo(n,t);c.lineTo(0,t);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=A&&(c.setFillAlpha(Math.abs(A)),c.setFillColor(0>A?"#FFFFFF":"#000000"),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),c.close(),c.fill()),c.begin(),c.moveTo(n-z,0),c.lineTo(n-z,z),c.lineTo(n,z),
+c.end(),c.stroke())};mxCellRenderer.registerShape("note",S);mxUtils.extend(H,S);mxCellRenderer.registerShape("note2",H);H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(K,mxShape);K.prototype.isoAngle=15;K.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
+"isoAngle",this.isoAngle))))*Math.PI/200;z=Math.min(n*Math.tan(z),.5*t);c.translate(m,u);c.begin();c.moveTo(.5*n,0);c.lineTo(n,z);c.lineTo(n,t-z);c.lineTo(.5*n,t);c.lineTo(0,t-z);c.lineTo(0,z);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,z);c.lineTo(.5*n,2*z);c.lineTo(n,z);c.moveTo(.5*n,2*z);c.lineTo(.5*n,t);c.stroke()};mxCellRenderer.registerShape("isoCube2",K);mxUtils.extend(Q,mxShape);Q.prototype.size=15;Q.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*
+t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke())};mxCellRenderer.registerShape("cylinder2",Q);mxUtils.extend(e,mxCylinder);e.prototype.size=
+15;e.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.max(0,Math.min(.5*t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"lid",!0);c.translate(m,u);0==z?(c.rect(0,0,n,t),c.fillAndStroke()):(c.begin(),A?(c.moveTo(0,z),c.arcTo(.5*n,z,0,0,1,.5*n,0),c.arcTo(.5*n,z,0,0,1,n,z)):(c.moveTo(0,0),c.arcTo(.5*n,z,0,0,0,.5*n,z),c.arcTo(.5*n,z,0,0,0,n,0)),c.lineTo(n,t-z),c.arcTo(.5*n,z,0,0,1,.5*n,t),c.arcTo(.5*n,z,0,0,1,0,t-z),c.close(),c.fillAndStroke(),c.setShadow(!1),
+A&&(c.begin(),c.moveTo(n,z),c.arcTo(.5*n,z,0,0,1,.5*n,2*z),c.arcTo(.5*n,z,0,0,1,0,z),c.stroke()))};mxCellRenderer.registerShape("cylinder3",e);mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n/2,.5*t,n,0);c.quadTo(.5*n,t/2,n,t);c.quadTo(n/2,.5*t,0,t);c.quadTo(.5*n,t/2,0,0);c.end()};mxCellRenderer.registerShape("switch",f);mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.arcSize=.1;
+g.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,u);m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var z=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),A=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ha||(J*=Math.min(n,t));
+J=Math.min(J,.5*n,.5*(t-u));m=Math.max(m,J);m=Math.min(n-J,m);A||(J=0);c.begin();"left"==z?(c.moveTo(Math.max(J,0),u),c.lineTo(Math.max(J,0),0),c.lineTo(m,0),c.lineTo(m,u)):(c.moveTo(n-m,u),c.lineTo(n-m,0),c.lineTo(n-Math.max(J,0),0),c.lineTo(n-Math.max(J,0),u));A?(c.moveTo(0,J+u),c.arcTo(J,J,0,0,1,J,u),c.lineTo(n-J,u),c.arcTo(J,J,0,0,1,n,J+u),c.lineTo(n,t-J),c.arcTo(J,J,0,0,1,n-J,t),c.lineTo(J,t),c.arcTo(J,J,0,0,1,0,t-J)):(c.moveTo(0,u),c.lineTo(n,u),c.lineTo(n,t),c.lineTo(0,t));c.close();c.fillAndStroke();
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,u+20),c.lineTo(n-20,u+10),c.lineTo(n-10,u+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,
+"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-
+m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(v,mxCylinder);v.prototype.arcSize=.1;v.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,u);var z=mxUtils.getValue(this.style,"rounded",!1),A=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));u=mxUtils.getValue(this.style,"umlStateConnection",null);A||(m*=Math.min(n,t));m=Math.min(m,.5*n,.5*t);z||(m=0);z=0;null!=u&&(z=10);c.begin();c.moveTo(z,
+m);c.arcTo(m,m,0,0,1,z+m,0);c.lineTo(n-m,0);c.arcTo(m,m,0,0,1,n,m);c.lineTo(n,t-m);c.arcTo(m,m,0,0,1,n-m,t);c.lineTo(z+m,t);c.arcTo(m,m,0,0,1,z,t-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,t-20,10,10,3,3),c.stroke(),c.roundrect(n-20,t-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,t-15),c.lineTo(n-20,t-15),c.stroke());"connPointRefEntry"==u?(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke()):"connPointRefExit"==
+u&&(c.ellipse(0,.5*t-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*t-5),c.lineTo(15,.5*t+5),c.moveTo(15,.5*t-5),c.lineTo(5,.5*t+5),c.stroke())};v.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",v);mxUtils.extend(y,mxActor);y.prototype.size=30;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=
+function(c,m,u,n,t){m=Math.max(0,Math.min(n,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("card",y);mxUtils.extend(C,mxActor);C.prototype.size=.4;C.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,m/2);c.quadTo(n/4,1.4*m,n/2,m/2);c.quadTo(3*n/4,m*(1-1.4),n,m/2);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};C.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),u=c.width,n=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return m*=
+n,new mxRectangle(c.x,c.y+m,u,n-2*m);m*=u;return new mxRectangle(c.x+m,c.y,u-2*m,n)}return c};mxCellRenderer.registerShape("tape",C);mxUtils.extend(I,mxActor);I.prototype.size=.3;I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};I.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(n,0);c.lineTo(n,t-m/2);c.quadTo(3*n/4,t-1.4*m,n/2,t-m/2);c.quadTo(n/4,t-m*(1-1.4),0,t-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",I);var rb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,u,n){var t=mxUtils.getValue(this.style,"size");return null!=t?n*Math.max(0,Math.min(1,t)):rb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};e.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var v=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-v),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-v),0,z,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};u.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(c,m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n-m,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("trapezoid",N);mxUtils.extend(G,mxActor);G.prototype.size=.5;G.prototype.redrawPath=function(c,m,v,n,t){c.setFillColor(null);
-m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(m,0),new mxPoint(m,t/2),new mxPoint(0,t/2),new mxPoint(m,t/2),new mxPoint(m,t),new mxPoint(n,t)],this.isRounded,v,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",G);mxUtils.extend(ha,mxActor);ha.prototype.redrawPath=function(c,m,v,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-m=n/5;c.rect(0,0,m,t);c.fillAndStroke();c.rect(2*m,0,m,t);c.fillAndStroke();c.rect(4*m,0,m,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ha);ka.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};ka.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)};
-ka.prototype.quadTo=function(c,m,v,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=n};ka.prototype.curveTo=function(c,m,v,n,t,z){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=z};ka.prototype.arcTo=function(c,m,v,n,t,z,A){this.originalArcTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=A};ka.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var v=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
-n=Math.abs(c-this.lastX),t=Math.abs(m-this.lastY),z=Math.sqrt(n*n+t*t);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var A=Math.round(z/10),ia=this.defaultVariation;5>A&&(A=5,ia/=3);var J=v(c-this.lastX)*n/A;v=v(m-this.lastY)*t/A;n/=z;t/=z;for(z=0;z<A;z++){var xa=(Math.random()-.5)*ia;this.originalLineTo.call(this.canvas,J*z+this.lastX-xa*t,v*z+this.lastY-xa*n)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,arguments);
+"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var u=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),t=mxUtils.getValue(this.style,"absoluteArcSize",!1),z=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t||(z*=Math.min(c.width,c.height));z=Math.min(z,.5*c.width,.5*(c.height-m));n||(z=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
+this.tabPosition)?new mxRectangle(z,0,Math.min(c.width,c.width-u),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-u),0,z,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};v.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};H.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(D,mxActor);D.prototype.size=.2;D.prototype.fixedSize=20;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(n,0),new mxPoint(n-m,t)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("parallelogram",D);mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(m,0),new mxPoint(n-m,0),new mxPoint(n,t)],this.isRounded,u,!0)};mxCellRenderer.registerShape("trapezoid",N);mxUtils.extend(G,mxActor);G.prototype.size=.5;G.prototype.redrawPath=function(c,m,u,n,t){c.setFillColor(null);
+m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(m,0),new mxPoint(m,t/2),new mxPoint(0,t/2),new mxPoint(m,t/2),new mxPoint(m,t),new mxPoint(n,t)],this.isRounded,u,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",G);mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(c,m,u,n,t){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+m=n/5;c.rect(0,0,m,t);c.fillAndStroke();c.rect(2*m,0,m,t);c.fillAndStroke();c.rect(4*m,0,m,t);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",ia);ka.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};ka.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)};
+ka.prototype.quadTo=function(c,m,u,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=u;this.lastY=n};ka.prototype.curveTo=function(c,m,u,n,t,z){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=z};ka.prototype.arcTo=function(c,m,u,n,t,z,A){this.originalArcTo.apply(this.canvas,arguments);this.lastX=z;this.lastY=A};ka.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var u=function(ma){return"number"===typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},
+n=Math.abs(c-this.lastX),t=Math.abs(m-this.lastY),z=Math.sqrt(n*n+t*t);if(2>z){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var A=Math.round(z/10),ha=this.defaultVariation;5>A&&(A=5,ha/=3);var J=u(c-this.lastX)*n/A;u=u(m-this.lastY)*t/A;n/=z;t/=z;for(z=0;z<A;z++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,J*z+this.lastX-xa*t,u*z+this.lastY-xa*n)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,arguments);
this.lastX=c;this.lastY=m};ka.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};mxShape.prototype.defaultJiggle=1.5;var mb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){mb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var vb=mxShape.prototype.afterPaint;
mxShape.prototype.afterPaint=function(c){vb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new ka(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var Bb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Bb.apply(this,arguments)};var Xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,v,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=ka)Xa.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&Bb.apply(this,arguments)};var Xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,u,n,t){if(null==c.handJiggle||c.handJiggle.constructor!=ka)Xa.apply(this,arguments);else{var z=!0;null!=this.style&&(z="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(z||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)z||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?z=Math.min(n/2,Math.min(t/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,z=Math.min(n*
-z,t*z)),c.moveTo(m+z,v),c.lineTo(m+n-z,v),c.quadTo(m+n,v,m+n,v+z),c.lineTo(m+n,v+t-z),c.quadTo(m+n,v+t,m+n-z,v+t),c.lineTo(m+z,v+t),c.quadTo(m,v+t,m,v+t-z),c.lineTo(m,v+z),c.quadTo(m,v,m+z,v)):(c.moveTo(m,v),c.lineTo(m+n,v),c.lineTo(m+n,v+t),c.lineTo(m,v+t),c.lineTo(m,v)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ja,mxRectangleShape);ja.prototype.size=.1;ja.prototype.fixedSize=!1;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,v=c.height;c=new mxRectangle(c.x,c.y,m,v);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*t,v*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
-ja.prototype.paintForeground=function(c,m,v,n,t){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),A=parseFloat(mxUtils.getValue(this.style,"size",this.size));A=z?Math.max(0,Math.min(n,A)):n*Math.max(0,Math.min(1,A));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.max(A,Math.min(n*z,t*z)));A=Math.round(A);c.begin();c.moveTo(m+A,v);c.lineTo(m+A,v+t);c.moveTo(m+n-A,v);c.lineTo(m+n-A,v+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ja);mxCellRenderer.registerShape("process2",ja);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintBackground=function(c,m,v,n,t){c.setFillColor(mxConstants.NONE);c.rect(m,v,n,t);c.fill()};ca.prototype.paintForeground=function(c,m,v,n,t){};mxCellRenderer.registerShape("transparent",ca);mxUtils.extend(pa,mxHexagon);pa.prototype.size=30;pa.prototype.position=.5;pa.prototype.position2=.5;pa.prototype.base=20;pa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};pa.prototype.isRoundable=function(){return!0};pa.prototype.redrawPath=function(c,m,v,n,t){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ia=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-v),new mxPoint(Math.min(n,z+ia),t-v),new mxPoint(A,t),new mxPoint(Math.max(0,z),t-v),new mxPoint(0,t-v)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",pa);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,
-m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(0,t),new mxPoint(m,t/2)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("step",
-qa);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
-0),new mxPoint(n-m,0),new mxPoint(n,.5*t),new mxPoint(n-m,t),new mxPoint(m,t),new mxPoint(0,.5*t)],this.isRounded,v,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,v,n,t){var z=Math.min(n/5,t/5)+1;c.begin();c.moveTo(m+n/2,v+z);c.lineTo(m+n/2,v+t-z);c.moveTo(m+z,v+t/2);c.lineTo(m+n-z,v+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var Za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,v,n,t){Za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);m+=z;v+=z;n-=2*z;t-=2*z;0<n&&0<t&&(c.setShadow(!1),Za.apply(this,[c,m,v,n,t]))}};mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};R.prototype.paintForeground=function(c,m,v,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=z;v+=z;n-=2*z;t-=2*z;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);z=0;do{var A=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=A){var ia=this.style["symbol"+z+"Align"],J=this.style["symbol"+z+"VerticalAlign"],xa=this.style["symbol"+z+"Width"],ma=this.style["symbol"+z+"Height"],Va=this.style["symbol"+z+"Spacing"]||0,jb=this.style["symbol"+z+"VSpacing"]||
-Va,bb=this.style["symbol"+z+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Va+=bb,jb+=bb);bb=m;var Da=v;bb=ia==mxConstants.ALIGN_CENTER?bb+(n-xa)/2:ia==mxConstants.ALIGN_RIGHT?bb+(n-xa-Va):bb+Va;Da=J==mxConstants.ALIGN_MIDDLE?Da+(t-ma)/2:J==mxConstants.ALIGN_BOTTOM?Da+(t-ma-jb):Da+jb;c.save();ia=new A;ia.style=this.style;A.prototype.paintVertexShape.call(ia,c,bb,Da,xa,ma);c.restore()}z++}while(null!=A)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",R);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,m,v,n,t,z){z?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);c.moveTo(n/
-2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",Z);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,v+t);c.lineTo(m+7*n/8,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(T,mxShape);
-T.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};T.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};T.prototype.paintForeground=function(c,m,v,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(ba,mxRectangleShape);ba.prototype.size=
-40;ba.prototype.isHtmlAllowed=function(){return!1};ba.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};ba.prototype.paintBackground=function(c,m,v,n,t){var z=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"participant");null==A||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,m,v,n,z):(A=this.state.view.graph.cellRenderer.getShape(A),null!=A&&A!=ba&&(A=new A,A.apply(this.state),c.save(),A.paintVertexShape(c,m,v,n,z),c.restore()));z<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+n/2,v+z),c.lineTo(m+n/2,v+t),c.end(),c.stroke())};ba.prototype.paintForeground=function(c,m,v,n,t){var z=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,v,n,
-Math.min(t,z))};mxCellRenderer.registerShape("umlLifeline",ba);mxUtils.extend(U,mxShape);U.prototype.width=60;U.prototype.height=30;U.prototype.corner=10;U.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};U.prototype.paintBackground=function(c,m,v,n,t){var z=this.corner,A=Math.min(n,Math.max(z,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ia=Math.min(t,Math.max(1.5*z,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(m,v,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,v,n,t),c.setGradient(this.fill,this.gradient,m,v,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(m,v);c.lineTo(m+A,v);c.lineTo(m+A,v+Math.max(0,ia-1.5*z));c.lineTo(m+Math.max(0,A-z),v+ia);c.lineTo(m,v+ia);c.close();c.fillAndStroke();c.begin();c.moveTo(m+A,v);c.lineTo(m+n,v);c.lineTo(m+n,v+t);c.lineTo(m,v+t);c.lineTo(m,v+ia);c.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(c,m,v,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-m,v,n){n=ba.prototype.size;null!=m&&(n=mxUtils.getValue(m.style,"size",n)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;v.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+n,v.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,v,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,v,n){n=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(n+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return v.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,v.y)));v.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,v.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,v,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",pa.prototype.size))*m.view.scale))),m.style),m,v,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-m,v,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?D.prototype.fixedSize:D.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=c.x,ia=c.y,J=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia),new mxPoint(A+J,ia+t),new mxPoint(A+
-J,ia+xa),new mxPoint(A,ia+xa-t),new mxPoint(A,ia)]):(t=t?Math.max(0,Math.min(.5*J,z)):J*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A+t,ia),new mxPoint(A+J,ia),new mxPoint(A+J-t,ia+xa),new mxPoint(A,ia+xa),new mxPoint(A+t,ia)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);n&&(v.x<A||v.x>A+J?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ia,c,v)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,v,n){var t="0"!=
-mxUtils.getValue(m.style,"fixedSize","0"),z=t?N.prototype.fixedSize:N.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=c.x,ia=c.y,J=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*J,z)):J*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A+t,ia),new mxPoint(A+J-t,ia),new mxPoint(A+J,ia+xa),new mxPoint(A,ia+xa),new mxPoint(A+
-t,ia)]):m==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia),new mxPoint(A+J,ia),new mxPoint(A+J-t,ia+xa),new mxPoint(A+t,ia+xa),new mxPoint(A,ia)]):m==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia+t),new mxPoint(A+J,ia),new mxPoint(A+J,ia+xa),new mxPoint(A,ia+xa-t),new mxPoint(A,ia+t)]):(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia),new mxPoint(A+
-J,ia+t),new mxPoint(A+J,ia+xa-t),new mxPoint(A,ia+xa),new mxPoint(A,ia)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);n&&(v.x<A||v.x>A+J?c.y=v.y:c.x=v.x);return mxUtils.getPerimeterPoint(ia,c,v)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,v,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?qa.prototype.fixedSize:qa.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=
-c.x,ia=c.y,J=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia),new mxPoint(A+J-t,ia),new mxPoint(A+J,c),new mxPoint(A+J-t,ia+xa),new mxPoint(A,ia+xa),new mxPoint(A+t,c),new mxPoint(A,ia)]):m==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,
-z)),ia=[new mxPoint(A+t,ia),new mxPoint(A+J,ia),new mxPoint(A+J-t,c),new mxPoint(A+J,ia+xa),new mxPoint(A+t,ia+xa),new mxPoint(A,c),new mxPoint(A+t,ia)]):m==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia+t),new mxPoint(ma,ia),new mxPoint(A+J,ia+t),new mxPoint(A+J,ia+xa),new mxPoint(ma,ia+xa-t),new mxPoint(A,ia+xa),new mxPoint(A,ia+t)]):(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(A,ia),new mxPoint(ma,ia+
-t),new mxPoint(A+J,ia),new mxPoint(A+J,ia+xa-t),new mxPoint(ma,ia+xa),new mxPoint(A,ia+xa-t),new mxPoint(A,ia)]);ma=new mxPoint(ma,c);n&&(v.x<A||v.x>A+J?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ia,ma,v)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,v,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?L.prototype.fixedSize:L.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=
-c.x,ia=c.y,J=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ia=[new mxPoint(ma,ia),new mxPoint(A+J,ia+t),new mxPoint(A+J,ia+xa-t),new mxPoint(ma,ia+xa),new mxPoint(A,ia+xa-t),new mxPoint(A,ia+t),new mxPoint(ma,ia)]):(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,
-Math.min(1,z)),ia=[new mxPoint(A+t,ia),new mxPoint(A+J-t,ia),new mxPoint(A+J,c),new mxPoint(A+J-t,ia+xa),new mxPoint(A+t,ia+xa),new mxPoint(A,c),new mxPoint(A+t,ia)]);ma=new mxPoint(ma,c);n&&(v.x<A||v.x>A+J?ma.y=v.y:ma.x=v.x);return mxUtils.getPerimeterPoint(ia,ma,v)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,m,v,n,t){var z=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(m,v);c.ellipse((n-z)/2,0,z,z);c.fillAndStroke();c.begin();c.moveTo(n/2,z);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.inset=2;fa.prototype.paintBackground=function(c,m,v,n,t){var z=parseFloat(mxUtils.getValue(this.style,"size",this.size)),A=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,v);c.begin();c.moveTo(n/2,z+A);c.lineTo(n/2,t);c.end();c.stroke();
-c.begin();c.moveTo((n-z)/2-A,z/2);c.quadTo((n-z)/2-A,z+A,n/2,z+A);c.quadTo((n+z)/2+A,z+A,(n+z)/2+A,z/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",fa);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(c,m,v,n,t){c.translate(m,v);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(c,m,v,n,t){var z=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(m,v);c.ellipse(0,z,n-2*z,t-2*z);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,m,v,n,t,z){var A=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));v=A/2;A=v+A/2;var ia=Math.min(m,t-m),J=Math.min(ia+2*m,t-m);z?(c.moveTo(v,ia),c.lineTo(A,ia),c.lineTo(A,ia+m),c.lineTo(v,ia+m),c.moveTo(v,J),c.lineTo(A,J),c.lineTo(A,J+m),c.lineTo(v,J+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(v,J),c.lineTo(v,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(v,ia),c.close());c.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=
-32;ua.prototype.jettyHeight=12;ua.prototype.redrawPath=function(c,m,v,n,t,z){var A=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));v=A/2;A=v+A/2;var ia=.3*t-m/2,J=.7*t-m/2;z?(c.moveTo(v,ia),c.lineTo(A,ia),c.lineTo(A,ia+m),c.lineTo(v,ia+m),c.moveTo(v,J),c.lineTo(A,J),c.lineTo(A,J+m),c.lineTo(v,J+m)):(c.moveTo(v,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(v,t),c.lineTo(v,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(v,
-J),c.lineTo(v,ia+m),c.lineTo(0,ia+m),c.lineTo(0,ia),c.lineTo(v,ia),c.close());c.end()};mxCellRenderer.registerShape("component",ua);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(c,m,v,n,t){var z=n/2,A=t/2,ia=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+z,v),new mxPoint(m+n,v+A),new mxPoint(m+z,v+t),new mxPoint(m,v+A)],this.isRounded,ia,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(oa,mxDoubleEllipse);oa.prototype.outerStroke=!0;oa.prototype.paintVertexShape=function(c,m,v,n,t){var z=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(m+z,v+z,n-2*z,t-2*z),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,v,n,t),c.stroke())};mxCellRenderer.registerShape("endState",oa);mxUtils.extend(Aa,oa);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(ya,mxArrowConnector);
+z,t*z)),c.moveTo(m+z,u),c.lineTo(m+n-z,u),c.quadTo(m+n,u,m+n,u+z),c.lineTo(m+n,u+t-z),c.quadTo(m+n,u+t,m+n-z,u+t),c.lineTo(m+z,u+t),c.quadTo(m,u+t,m,u+t-z),c.lineTo(m,u+z),c.quadTo(m,u,m+z,u)):(c.moveTo(m,u),c.lineTo(m+n,u),c.lineTo(m+n,u+t),c.lineTo(m,u+t),c.lineTo(m,u)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ja,mxRectangleShape);ja.prototype.size=.1;ja.prototype.fixedSize=!1;ja.prototype.isHtmlAllowed=function(){return!1};ja.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,u=c.height;c=new mxRectangle(c.x,c.y,m,u);var n=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(m*t,u*t))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};
+ja.prototype.paintForeground=function(c,m,u,n,t){var z=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),A=parseFloat(mxUtils.getValue(this.style,"size",this.size));A=z?Math.max(0,Math.min(n,A)):n*Math.max(0,Math.min(1,A));this.isRounded&&(z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.max(A,Math.min(n*z,t*z)));A=Math.round(A);c.begin();c.moveTo(m+A,u);c.lineTo(m+A,u+t);c.moveTo(m+n-A,u);c.lineTo(m+n-A,u+t);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ja);mxCellRenderer.registerShape("process2",ja);mxUtils.extend(ca,mxRectangleShape);ca.prototype.paintBackground=function(c,m,u,n,t){c.setFillColor(mxConstants.NONE);c.rect(m,u,n,t);c.fill()};ca.prototype.paintForeground=function(c,m,u,n,t){};mxCellRenderer.registerShape("transparent",ca);mxUtils.extend(pa,mxHexagon);pa.prototype.size=30;pa.prototype.position=.5;pa.prototype.position2=.5;pa.prototype.base=20;pa.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};pa.prototype.isRoundable=function(){return!0};pa.prototype.redrawPath=function(c,m,u,n,t){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var z=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),A=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t-u),new mxPoint(Math.min(n,z+ha),t-u),new mxPoint(A,t),new mxPoint(Math.max(0,z),t-u),new mxPoint(0,t-u)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",pa);mxUtils.extend(ra,mxActor);ra.prototype.size=.2;ra.prototype.fixedSize=20;ra.prototype.isRoundable=function(){return!0};ra.prototype.redrawPath=function(c,
+m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(0,t),new mxPoint(m,t/2)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("step",
+ra);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(n-m,0),new mxPoint(n,.5*t),new mxPoint(n-m,t),new mxPoint(m,t),new mxPoint(0,.5*t)],this.isRounded,u,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,m,u,n,t){var z=Math.min(n/5,t/5)+1;c.begin();c.moveTo(m+n/2,u+z);c.lineTo(m+n/2,u+t-z);c.moveTo(m+z,u+t/2);c.lineTo(m+n-z,u+t/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Za=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,u,n,t){Za.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var z=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=z;u+=z;n-=2*z;t-=2*z;0<n&&0<t&&(c.setShadow(!1),Za.apply(this,[c,m,u,n,t]))}};mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};R.prototype.paintForeground=function(c,m,u,n,t){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var z=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=z;u+=z;n-=2*z;t-=2*z;0<n&&0<t&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);z=0;do{var A=mxCellRenderer.defaultShapes[this.style["symbol"+z]];if(null!=A){var ha=this.style["symbol"+z+"Align"],J=this.style["symbol"+z+"VerticalAlign"],xa=this.style["symbol"+z+"Width"],ma=this.style["symbol"+z+"Height"],Wa=this.style["symbol"+z+"Spacing"]||0,jb=this.style["symbol"+z+"VSpacing"]||
+Wa,bb=this.style["symbol"+z+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(n+this.strokewidth,t+this.strokewidth),Wa+=bb,jb+=bb);bb=m;var Da=u;bb=ha==mxConstants.ALIGN_CENTER?bb+(n-xa)/2:ha==mxConstants.ALIGN_RIGHT?bb+(n-xa-Wa):bb+Wa;Da=J==mxConstants.ALIGN_MIDDLE?Da+(t-ma)/2:J==mxConstants.ALIGN_BOTTOM?Da+(t-ma-jb):Da+jb;c.save();ha=new A;ha.style=this.style;A.prototype.paintVertexShape.call(ha,c,bb,Da,xa,ma);c.restore()}z++}while(null!=A)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",R);mxUtils.extend(Y,mxCylinder);Y.prototype.redrawPath=function(c,m,u,n,t,z){z?(c.moveTo(0,0),c.lineTo(n/2,t/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(0,t),c.close())};mxCellRenderer.registerShape("message",Y);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,m,u,n,t){c.translate(m,u);c.ellipse(n/4,0,n/2,t/4);c.fillAndStroke();c.begin();c.moveTo(n/2,t/4);c.lineTo(n/2,2*t/3);c.moveTo(n/2,t/3);c.lineTo(0,t/3);c.moveTo(n/
+2,t/3);c.lineTo(n,t/3);c.moveTo(n/2,2*t/3);c.lineTo(0,t);c.moveTo(n/2,2*t/3);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",Z);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,m,u,n,t){c.translate(m,u);c.begin();c.moveTo(0,t/4);c.lineTo(0,3*t/4);c.end();c.stroke();c.begin();c.moveTo(0,t/2);c.lineTo(n/6,t/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,t);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(q,mxEllipse);q.prototype.paintVertexShape=function(c,m,u,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/8,u+t);c.lineTo(m+7*n/8,u+t);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",q);mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,u);c.begin();c.moveTo(n,0);c.lineTo(0,t);c.moveTo(0,0);c.lineTo(n,t);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",F);mxUtils.extend(T,mxShape);
+T.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};T.prototype.paintBackground=function(c,m,u,n,t){c.translate(m,u);c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,t/8,n,7*t/8);c.fillAndStroke()};T.prototype.paintForeground=function(c,m,u,n,t){c.begin();c.moveTo(3*n/8,t/8*1.1);c.lineTo(5*n/8,t/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=
+40;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};aa.prototype.paintBackground=function(c,m,u,n,t){var z=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),A=mxUtils.getValue(this.style,"participant");null==A||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,m,u,n,z):(A=this.state.view.graph.cellRenderer.getShape(A),null!=A&&A!=aa&&(A=new A,A.apply(this.state),c.save(),A.paintVertexShape(c,m,u,n,z),c.restore()));z<t&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+n/2,u+z),c.lineTo(m+n/2,u+t),c.end(),c.stroke())};aa.prototype.paintForeground=function(c,m,u,n,t){var z=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,u,n,
+Math.min(t,z))};mxCellRenderer.registerShape("umlLifeline",aa);mxUtils.extend(U,mxShape);U.prototype.width=60;U.prototype.height=30;U.prototype.corner=10;U.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};U.prototype.paintBackground=function(c,m,u,n,t){var z=this.corner,A=Math.min(n,Math.max(z,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(t,Math.max(1.5*z,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(m,u,n,t),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,u,n,t),c.setGradient(this.fill,this.gradient,m,u,n,t,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,u);c.lineTo(m+A,u);c.lineTo(m+A,u+Math.max(0,ha-1.5*z));c.lineTo(m+Math.max(0,A-z),u+ha);c.lineTo(m,u+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+A,u);c.lineTo(m+n,u);c.lineTo(m+n,u+t);c.lineTo(m,u+t);c.lineTo(m,u+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",U);mxPerimeter.CenterPerimeter=function(c,m,u,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,u,n){n=aa.prototype.size;null!=m&&(n=mxUtils.getValue(m.style,"size",n)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;u.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+n,u.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,u,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,u,n){n=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(n+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return u.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,u.y)));u.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,u.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,u,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",pa.prototype.size))*m.view.scale))),m.style),m,u,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,u,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?D.prototype.fixedSize:D.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=c.x,ha=c.y,J=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha),new mxPoint(A+J,ha+t),new mxPoint(A+
+J,ha+xa),new mxPoint(A,ha+xa-t),new mxPoint(A,ha)]):(t=t?Math.max(0,Math.min(.5*J,z)):J*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A+t,ha),new mxPoint(A+J,ha),new mxPoint(A+J-t,ha+xa),new mxPoint(A,ha+xa),new mxPoint(A+t,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);n&&(u.x<A||u.x>A+J?c.y=u.y:c.x=u.x);return mxUtils.getPerimeterPoint(ha,c,u)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,u,n){var t="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),z=t?N.prototype.fixedSize:N.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=c.x,ha=c.y,J=c.width,xa=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(.5*J,z)):J*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A+t,ha),new mxPoint(A+J-t,ha),new mxPoint(A+J,ha+xa),new mxPoint(A,ha+xa),new mxPoint(A+
+t,ha)]):m==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha),new mxPoint(A+J,ha),new mxPoint(A+J-t,ha+xa),new mxPoint(A+t,ha+xa),new mxPoint(A,ha)]):m==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha+t),new mxPoint(A+J,ha),new mxPoint(A+J,ha+xa),new mxPoint(A,ha+xa-t),new mxPoint(A,ha+t)]):(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha),new mxPoint(A+
+J,ha+t),new mxPoint(A+J,ha+xa-t),new mxPoint(A,ha+xa),new mxPoint(A,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);n&&(u.x<A||u.x>A+J?c.y=u.y:c.x=u.x);return mxUtils.getPerimeterPoint(ha,c,u)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,u,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?ra.prototype.fixedSize:ra.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=
+c.x,ha=c.y,J=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha),new mxPoint(A+J-t,ha),new mxPoint(A+J,c),new mxPoint(A+J-t,ha+xa),new mxPoint(A,ha+xa),new mxPoint(A+t,c),new mxPoint(A,ha)]):m==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,Math.min(1,
+z)),ha=[new mxPoint(A+t,ha),new mxPoint(A+J,ha),new mxPoint(A+J-t,c),new mxPoint(A+J,ha+xa),new mxPoint(A+t,ha+xa),new mxPoint(A,c),new mxPoint(A+t,ha)]):m==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha+t),new mxPoint(ma,ha),new mxPoint(A+J,ha+t),new mxPoint(A+J,ha+xa),new mxPoint(ma,ha+xa-t),new mxPoint(A,ha+xa),new mxPoint(A,ha+t)]):(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(A,ha),new mxPoint(ma,ha+
+t),new mxPoint(A+J,ha),new mxPoint(A+J,ha+xa-t),new mxPoint(ma,ha+xa),new mxPoint(A,ha+xa-t),new mxPoint(A,ha)]);ma=new mxPoint(ma,c);n&&(u.x<A||u.x>A+J?ma.y=u.y:ma.x=u.x);return mxUtils.getPerimeterPoint(ha,ma,u)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,u,n){var t="0"!=mxUtils.getValue(m.style,"fixedSize","0"),z=t?L.prototype.fixedSize:L.prototype.size;null!=m&&(z=mxUtils.getValue(m.style,"size",z));t&&(z*=m.view.scale);var A=
+c.x,ha=c.y,J=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(t=t?Math.max(0,Math.min(xa,z)):xa*Math.max(0,Math.min(1,z)),ha=[new mxPoint(ma,ha),new mxPoint(A+J,ha+t),new mxPoint(A+J,ha+xa-t),new mxPoint(ma,ha+xa),new mxPoint(A,ha+xa-t),new mxPoint(A,ha+t),new mxPoint(ma,ha)]):(t=t?Math.max(0,Math.min(J,z)):J*Math.max(0,
+Math.min(1,z)),ha=[new mxPoint(A+t,ha),new mxPoint(A+J-t,ha),new mxPoint(A+J,c),new mxPoint(A+J-t,ha+xa),new mxPoint(A+t,ha+xa),new mxPoint(A,c),new mxPoint(A+t,ha)]);ma=new mxPoint(ma,c);n&&(u.x<A||u.x>A+J?ma.y=u.y:ma.x=u.x);return mxUtils.getPerimeterPoint(ha,ma,u)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,m,u,n,t){var z=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,u);c.ellipse((n-z)/2,0,z,z);c.fillAndStroke();c.begin();c.moveTo(n/2,z);c.lineTo(n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.inset=2;fa.prototype.paintBackground=function(c,m,u,n,t){var z=parseFloat(mxUtils.getValue(this.style,"size",this.size)),A=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,u);c.begin();c.moveTo(n/2,z+A);c.lineTo(n/2,t);c.end();c.stroke();
+c.begin();c.moveTo((n-z)/2-A,z/2);c.quadTo((n-z)/2-A,z+A,n/2,z+A);c.quadTo((n+z)/2+A,z+A,(n+z)/2+A,z/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",fa);mxUtils.extend(na,mxShape);na.prototype.paintBackground=function(c,m,u,n,t){c.translate(m,u);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",na);mxUtils.extend(sa,mxShape);sa.prototype.inset=2;sa.prototype.paintBackground=function(c,m,u,n,t){var z=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,u);c.ellipse(0,z,n-2*z,t-2*z);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n/2,t);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",sa);mxUtils.extend(za,mxCylinder);za.prototype.jettyWidth=20;za.prototype.jettyHeight=10;za.prototype.redrawPath=function(c,m,u,n,t,z){var A=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));u=A/2;A=u+A/2;var ha=Math.min(m,t-m),J=Math.min(ha+2*m,t-m);z?(c.moveTo(u,ha),c.lineTo(A,ha),c.lineTo(A,ha+m),c.lineTo(u,ha+m),c.moveTo(u,J),c.lineTo(A,J),c.lineTo(A,J+m),c.lineTo(u,J+m)):(c.moveTo(u,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(u,t),c.lineTo(u,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(u,J),c.lineTo(u,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(u,ha),c.close());c.end()};mxCellRenderer.registerShape("module",za);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=
+32;ua.prototype.jettyHeight=12;ua.prototype.redrawPath=function(c,m,u,n,t,z){var A=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));u=A/2;A=u+A/2;var ha=.3*t-m/2,J=.7*t-m/2;z?(c.moveTo(u,ha),c.lineTo(A,ha),c.lineTo(A,ha+m),c.lineTo(u,ha+m),c.moveTo(u,J),c.lineTo(A,J),c.lineTo(A,J+m),c.lineTo(u,J+m)):(c.moveTo(u,0),c.lineTo(n,0),c.lineTo(n,t),c.lineTo(u,t),c.lineTo(u,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(u,
+J),c.lineTo(u,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(u,ha),c.close());c.end()};mxCellRenderer.registerShape("component",ua);mxUtils.extend(Ba,mxRectangleShape);Ba.prototype.paintForeground=function(c,m,u,n,t){var z=n/2,A=t/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+z,u),new mxPoint(m+n,u+A),new mxPoint(m+z,u+t),new mxPoint(m,u+A)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Ba);mxUtils.extend(oa,mxDoubleEllipse);oa.prototype.outerStroke=!0;oa.prototype.paintVertexShape=function(c,m,u,n,t){var z=Math.min(4,Math.min(n/5,t/5));0<n&&0<t&&(c.ellipse(m+z,u+z,n-2*z,t-2*z),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,u,n,t),c.stroke())};mxCellRenderer.registerShape("endState",oa);mxUtils.extend(Aa,oa);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(ya,mxArrowConnector);
ya.prototype.defaultWidth=4;ya.prototype.isOpenEnded=function(){return!0};ya.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ya.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ya);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=10;La.prototype.defaultArrowWidth=20;La.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Oa,mxActor);Oa.prototype.size=30;Oa.prototype.isRoundable=function(){return!0};Oa.prototype.redrawPath=function(c,m,v,n,t){m=Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,m),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("manualInput",Oa);mxUtils.extend(Ma,mxRectangleShape);Ma.prototype.dx=20;Ma.prototype.dy=20;Ma.prototype.isHtmlAllowed=function(){return!1};Ma.prototype.paintForeground=function(c,m,v,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var z=0;if(this.isRounded){var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;z=Math.max(z,Math.min(n*A,t*A))}A=Math.max(z,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(z,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,v+z);c.lineTo(m+n,v+z);c.end();c.stroke();c.begin();c.moveTo(m+A,v);c.lineTo(m+A,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ma);
-mxUtils.extend(Ia,mxActor);Ia.prototype.dx=20;Ia.prototype.dy=20;Ia.prototype.redrawPath=function(c,m,v,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint(m,v),
-new mxPoint(m,t),new mxPoint(0,t)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("corner",Ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(c,m,v,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,v,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));v=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,v),new mxPoint((n+m)/2,v),new mxPoint((n+m)/2,t),new mxPoint((n-m)/2,t),new mxPoint((n-m)/2,v),new mxPoint(0,v)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Ya,
-mxActor);Ya.prototype.arrowWidth=.3;Ya.prototype.arrowSize=.2;Ya.prototype.redrawPath=function(c,m,v,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));v=(t-z)/2;z=v+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-
-m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,v,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));v=(t-z)/2;z=v+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,v),new mxPoint(n-m,v),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,v,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,t/2,n,t);c.lineTo(m,t);c.quadTo(m-2*m,t/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
-m,v,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(aa,mxActor);aa.prototype.size=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,m,v,n,t){m=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),
-new mxPoint(n,.8*m),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("loopLimit",aa);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,m,v,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,
-0),new mxPoint(n,t-m),new mxPoint(n/2,t),new mxPoint(0,t-m)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/2,v+t);c.lineTo(m+n,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+t/2);c.lineTo(m+n,v+t/2);c.end();c.stroke();c.begin();c.moveTo(m+n/2,v);c.lineTo(m+n/2,v+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ta);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*n,v+.145*t);c.lineTo(m+.855*n,v+.855*t);c.end();c.stroke();c.begin();c.moveTo(m+.855*n,v+.145*t);c.lineTo(m+.145*n,
-v+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(c,m,v,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,v+t/2);c.lineTo(m+n,v+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(c,m,v,n,t){c.begin();c.moveTo(m,v);c.lineTo(m+n,v);c.lineTo(m+n/2,v+t/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(m,v+t);c.lineTo(m+n,v+t);c.lineTo(m+n/2,v+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ca);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,v,n,t){var z=c.state.strokeWidth/2,A=10+2*z,ia=v+t-A/2;c.begin();c.moveTo(m,v);c.lineTo(m,v+t);c.moveTo(m+z,ia);c.lineTo(m+z+A,ia-A/2);c.moveTo(m+z,ia);c.lineTo(m+z+A,ia+A/2);c.moveTo(m+z,ia);c.lineTo(m+n-z,ia);c.moveTo(m+n,v);c.lineTo(m+n,v+t);c.moveTo(m+n-z,ia);c.lineTo(m+n-A-z,ia-A/2);c.moveTo(m+
-n-z,ia);c.lineTo(m+n-A-z,ia+A/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ea);mxUtils.extend(Na,mxEllipse);Na.prototype.drawHidden=!0;Na.prototype.paintVertexShape=function(c,m,v,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var z=c.pointerEvents,A=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||A||(c.pointerEvents=!1);var ia="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||A||this.outline||ia||xa||ma||J?(c.rect(m,v,n,t),c.fill(),c.pointerEvents=z,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,v),this.outline||ia?c.lineTo(m+n,v):c.moveTo(m+n,v),this.outline||xa?c.lineTo(m+n,v+t):c.moveTo(m+n,v+t),this.outline||ma?c.lineTo(m,v+t):c.moveTo(m,v+t),(this.outline||J)&&c.lineTo(m,v),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Na);mxUtils.extend(Wa,mxEllipse);Wa.prototype.paintVertexShape=function(c,m,v,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+n/2,v),c.lineTo(m+n/2,v+t)):(c.moveTo(m,v+t/2),c.lineTo(m+n,v+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Wa);mxUtils.extend(Ra,mxActor);Ra.prototype.redrawPath=function(c,
-m,v,n,t){m=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-m,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-m,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Ra);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.2;Ga.prototype.redrawPath=function(c,m,v,n,t){m=Math.min(t,n);var z=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-z)/2;v=m+z;var A=(n-z)/2;z=A+z;c.moveTo(0,m);c.lineTo(A,m);c.lineTo(A,0);c.lineTo(z,0);c.lineTo(z,m);c.lineTo(n,m);c.lineTo(n,v);
-c.lineTo(z,v);c.lineTo(z,t);c.lineTo(A,t);c.lineTo(A,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("cross",Ga);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,m,v,n,t){m=Math.min(n,t/2);v=Math.min(n-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(v,0);c.lineTo(n-m,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-m,t);c.lineTo(v,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Pa,
+"startWidth",this.defaultArrowWidth)};La.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",La);mxUtils.extend(Oa,mxActor);Oa.prototype.size=30;Oa.prototype.isRoundable=function(){return!0};Oa.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(t,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(0,m),new mxPoint(n,0),new mxPoint(n,t)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("manualInput",Oa);mxUtils.extend(Na,mxRectangleShape);Na.prototype.dx=20;Na.prototype.dy=20;Na.prototype.isHtmlAllowed=function(){return!1};Na.prototype.paintForeground=function(c,m,u,n,t){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var z=0;if(this.isRounded){var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;z=Math.max(z,Math.min(n*A,t*A))}A=Math.max(z,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));z=Math.max(z,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,u+z);c.lineTo(m+n,u+z);c.end();c.stroke();c.begin();c.moveTo(m+A,u);c.lineTo(m+A,u+t);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Na);
+mxUtils.extend(Ia,mxActor);Ia.prototype.dx=20;Ia.prototype.dy=20;Ia.prototype.redrawPath=function(c,m,u,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint(m,u),
+new mxPoint(m,t),new mxPoint(0,t)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("corner",Ia);mxUtils.extend(wa,mxActor);wa.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.lineTo(0,t);c.end();c.moveTo(n,0);c.lineTo(n,t);c.end();c.moveTo(0,t/2);c.lineTo(n,t/2);c.end()};mxCellRenderer.registerShape("crossbar",wa);mxUtils.extend(ab,mxActor);ab.prototype.dx=20;ab.prototype.dy=20;ab.prototype.redrawPath=function(c,m,u,n,t){m=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));u=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var z=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,u),new mxPoint((n+m)/2,u),new mxPoint((n+m)/2,t),new mxPoint((n-m)/2,t),new mxPoint((n-m)/2,u),new mxPoint(0,u)],this.isRounded,z,!0);c.end()};mxCellRenderer.registerShape("tee",ab);mxUtils.extend(Ya,
+mxActor);Ya.prototype.arrowWidth=.3;Ya.prototype.arrowSize=.2;Ya.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-
+m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(x,mxActor);x.prototype.redrawPath=function(c,m,u,n,t){var z=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth))));m=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));u=(t-z)/2;z=u+z;var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,t/2),new mxPoint(m,0),new mxPoint(m,u),new mxPoint(n-m,u),new mxPoint(n-m,0),new mxPoint(n,t/2),new mxPoint(n-m,t),new mxPoint(n-m,z),new mxPoint(m,z),new mxPoint(m,t)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",x);mxUtils.extend(O,mxActor);O.prototype.size=.1;O.prototype.fixedSize=20;O.prototype.redrawPath=function(c,m,u,n,t){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(n,0);c.quadTo(n-2*m,t/2,n,t);c.lineTo(m,t);c.quadTo(m-2*m,t/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",O);mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(c,m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.close();c.end()};mxCellRenderer.registerShape("or",P);mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(c,
+m,u,n,t){c.moveTo(0,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,0,t);c.quadTo(n/2,t/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",X);mxUtils.extend(ba,mxActor);ba.prototype.size=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n/2,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(n-m,0),
+new mxPoint(n,.8*m),new mxPoint(n,t),new mxPoint(0,t),new mxPoint(0,.8*m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ba);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,m,u,n,t){m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));u=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,
+0),new mxPoint(n,t-m),new mxPoint(n/2,t),new mxPoint(0,t-m)],this.isRounded,u,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,m,u,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+n/2,u+t);c.lineTo(m+n,u+t);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",ea);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,m,u,n,t){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,u+t/2);c.lineTo(m+n,u+t/2);c.end();c.stroke();c.begin();c.moveTo(m+n/2,u);c.lineTo(m+n/2,u+t);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ta);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(c,m,u,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*n,u+.145*t);c.lineTo(m+.855*n,u+.855*t);c.end();c.stroke();c.begin();c.moveTo(m+.855*n,u+.145*t);c.lineTo(m+.145*n,
+u+.855*t);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(va,mxRhombus);va.prototype.paintVertexShape=function(c,m,u,n,t){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,u+t/2);c.lineTo(m+n,u+t/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",va);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,u,n,t){c.begin();c.moveTo(m,u);c.lineTo(m+n,u);c.lineTo(m+n/2,u+t/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,u+t);c.lineTo(m+n,u+t);c.lineTo(m+n/2,u+t/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ea);mxUtils.extend(Ca,mxEllipse);Ca.prototype.paintVertexShape=function(c,m,u,n,t){var z=c.state.strokeWidth/2,A=10+2*z,ha=u+t-A/2;c.begin();c.moveTo(m,u);c.lineTo(m,u+t);c.moveTo(m+z,ha);c.lineTo(m+z+A,ha-A/2);c.moveTo(m+z,ha);c.lineTo(m+z+A,ha+A/2);c.moveTo(m+z,ha);c.lineTo(m+n-z,ha);c.moveTo(m+n,u);c.lineTo(m+n,u+t);c.moveTo(m+n-z,ha);c.lineTo(m+n-A-z,ha-A/2);c.moveTo(m+
+n-z,ha);c.lineTo(m+n-A-z,ha+A/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ca);mxUtils.extend(Ma,mxEllipse);Ma.prototype.drawHidden=!0;Ma.prototype.paintVertexShape=function(c,m,u,n,t){this.outline||c.setStrokeColor(null);if(null!=this.style){var z=c.pointerEvents,A=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||A||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
+"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||A||this.outline||ha||xa||ma||J?(c.rect(m,u,n,t),c.fill(),c.pointerEvents=z,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,u),this.outline||ha?c.lineTo(m+n,u):c.moveTo(m+n,u),this.outline||xa?c.lineTo(m+n,u+t):c.moveTo(m+n,u+t),this.outline||ma?c.lineTo(m,u+t):c.moveTo(m,u+t),(this.outline||J)&&c.lineTo(m,u),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ma);mxUtils.extend(Sa,mxEllipse);Sa.prototype.paintVertexShape=function(c,m,u,n,t){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+n/2,u),c.lineTo(m+n/2,u+t)):(c.moveTo(m,u+t/2),c.lineTo(m+n,u+t/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Sa);mxUtils.extend(Qa,mxActor);Qa.prototype.redrawPath=function(c,
+m,u,n,t){m=Math.min(n,t/2);c.moveTo(0,0);c.lineTo(n-m,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-m,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("delay",Qa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(t,n);var z=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-z)/2;u=m+z;var A=(n-z)/2;z=A+z;c.moveTo(0,m);c.lineTo(A,m);c.lineTo(A,0);c.lineTo(z,0);c.lineTo(z,m);c.lineTo(n,m);c.lineTo(n,u);
+c.lineTo(z,u);c.lineTo(z,t);c.lineTo(A,t);c.lineTo(A,u);c.lineTo(0,u);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(Ka,mxActor);Ka.prototype.size=.25;Ka.prototype.redrawPath=function(c,m,u,n,t){m=Math.min(n,t/2);u=Math.min(n-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*n);c.moveTo(0,t/2);c.lineTo(u,0);c.lineTo(n-m,0);c.quadTo(n,0,n,t/2);c.quadTo(n,t,n-m,t);c.lineTo(u,t);c.close();c.end()};mxCellRenderer.registerShape("display",Ka);mxUtils.extend(Pa,
mxActor);Pa.prototype.cst={RECT2:"mxgraph.basic.rect"};Pa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(c,m,v,n,t){c.translate(m,
-v);this.strictDrawShape(c,0,0,n,t)};Pa.prototype.strictDrawShape=function(c,m,v,n,t,z){var A=z&&z.rectStyle?z.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ia=z&&z.absoluteCornerSize?z.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=z&&z.size?z.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=z&&z.rectOutline?z.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=z&&z.indent?
-z.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Va=z&&z.dashed?z.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=z&&z.dashPattern?z.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=z&&z.relIndent?z.relIndent:Math.max(0,Math.min(50,ma)),Da=z&&z.top?z.top:mxUtils.getValue(this.style,"top",!0),Ja=z&&z.right?z.right:mxUtils.getValue(this.style,"right",!0),Ha=z&&z.bottom?z.bottom:mxUtils.getValue(this.style,"bottom",!0),Fa=z&&z.left?z.left:
-mxUtils.getValue(this.style,"left",!0),Qa=z&&z.topLeftStyle?z.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Sa=z&&z.topRightStyle?z.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ta=z&&z.bottomRightStyle?z.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ua=z&&z.bottomLeftStyle?z.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=z&&z.fillColor?z.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Pa.prototype.paintVertexShape=function(c,m,u,n,t){c.translate(m,
+u);this.strictDrawShape(c,0,0,n,t)};Pa.prototype.strictDrawShape=function(c,m,u,n,t,z){var A=z&&z.rectStyle?z.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=z&&z.absoluteCornerSize?z.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=z&&z.size?z.size:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=z&&z.rectOutline?z.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=z&&z.indent?
+z.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Wa=z&&z.dashed?z.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=z&&z.dashPattern?z.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),bb=z&&z.relIndent?z.relIndent:Math.max(0,Math.min(50,ma)),Da=z&&z.top?z.top:mxUtils.getValue(this.style,"top",!0),Ja=z&&z.right?z.right:mxUtils.getValue(this.style,"right",!0),Ha=z&&z.bottom?z.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=z&&z.left?z.left:
+mxUtils.getValue(this.style,"left",!0),Ra=z&&z.topLeftStyle?z.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=z&&z.topRightStyle?z.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=z&&z.bottomRightStyle?z.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Va=z&&z.bottomLeftStyle?z.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Fb=z&&z.fillColor?z.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
z&&z.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Gb=z&&z.strokeWidth?z.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Db=z&&z.fillColor2?z.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Eb=z&&z.gradientColor2?z.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Hb=z&&z.gradientDirection2?z.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Ib=z&&z.opacity?z.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Jb=Math.max(0,Math.min(50,J));z=Pa.prototype;c.setDashed(Va);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);J=Math.min(.5*t,.5*n,J);ia||(J=Jb*Math.min(n,t)/100);J=Math.min(J,.5*Math.min(n,t));ia||(ma=Math.min(bb*Math.min(n,t)/100));ma=Math.min(ma,.5*Math.min(n,t)-J);(Da||Ja||Ha||Fa)&&"frame"!=xa&&(c.begin(),Da?z.moveNW(c,m,v,n,t,A,Qa,J,Fa):c.moveTo(0,0),Da&&z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),Ja&&z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),Ha&&
-z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),Fa&&z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Va=ia=Ib,"none"==Db&&(ia=0),"none"==Eb&&(Va=0),c.setGradient(Db,Eb,0,0,n,t,Hb,ia,Va),c.begin(),Da?z.moveNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa):c.moveTo(ma,0),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),Fa&&Ha&&z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),Ha&&Ja&&z.paintSEInner(c,
-m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),Ja&&Da&&z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),Da&&Fa&&z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),c.fill(),"none"==Fb&&(c.begin(),z.paintFolds(c,m,v,n,t,A,Qa,Sa,Ta,Ua,J,Da,Ja,Ha,Fa),c.stroke()));Da||Ja||Ha||!Fa?Da||Ja||!Ha||Fa?!Da&&!Ja&&Ha&&Fa?"frame"!=xa?(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),"double"==
-xa&&(z.moveNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.lineNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),c.close(),
-c.fillAndStroke()):Da||!Ja||Ha||Fa?!Da&&Ja&&!Ha&&Fa?"frame"!=xa?(c.begin(),z.moveSW(c,m,v,n,t,A,Qa,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),"double"==xa&&(z.moveNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa)),c.stroke(),c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),"double"==xa&&(z.moveSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja)),c.stroke()):(c.begin(),z.moveSW(c,m,v,n,t,A,Qa,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,
-J,Da),z.lineNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),c.close(),c.fillAndStroke(),c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.lineSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da&&Ja&&Ha&&!Fa?"frame"!=xa?(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),"double"==xa&&(z.moveSWInner(c,
-m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja)),c.stroke()):(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.lineSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da&&
-Ja&&Ha&&Fa?"frame"!=xa?(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),"double"==xa&&(z.moveNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja)),c.stroke()):
-(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.lineNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da||Ja||Ha||Fa?
-Da&&!Ja&&!Ha&&Fa?"frame"!=xa?(c.begin(),z.moveSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),"double"==xa&&(z.moveNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa)),c.stroke()):(c.begin(),z.moveSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.lineNEInner(c,
-m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&!Ja&&Ha&&!Fa?"frame"!=xa?(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),"double"==xa&&(z.moveNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da)),c.stroke(),c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),"double"==xa&&(z.moveSWInner(c,m,v,n,t,A,Ua,
-J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.lineNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),c.close(),c.fillAndStroke(),c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.lineSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):Da&&!Ja&&Ha&&Fa?"frame"!=xa?(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,
-J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),"double"==xa&&(z.moveNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,
-v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.lineNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):Da&&Ja&&!Ha&&!Fa?"frame"!=xa?(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,
-m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),"double"==xa&&(z.moveSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.lineSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,
-m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),c.close(),c.fillAndStroke()):Da&&Ja&&!Ha&&Fa?"frame"!=xa?(c.begin(),z.moveSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),"double"==xa&&(z.moveSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,
-m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa)),c.stroke()):(c.begin(),z.moveSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.lineSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,
-t,A,Ua,J,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&Ja&&Ha&&!Fa?"frame"!=xa?(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),"double"==xa&&(z.moveSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,
-m,v,n,t,A,Qa,J,ma,Fa,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.lineSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),c.close(),c.fillAndStroke()):
-Da&&Ja&&Ha&&Fa&&("frame"!=xa?(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),c.close(),"double"==xa&&(z.moveSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,
-A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),c.close()),c.stroke()):(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.paintNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.paintSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.paintSW(c,m,v,n,t,A,Ua,J,Ha),
-z.paintLeft(c,m,v,n,t,A,Qa,J,Da),c.close(),z.moveSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintSWInner(c,m,v,n,t,A,Ua,J,ma,Ha),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),z.paintSEInner(c,m,v,n,t,A,Ta,J,ma),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),z.paintNEInner(c,m,v,n,t,A,Sa,J,ma),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),z.paintNWInner(c,m,v,n,t,A,Qa,J,ma),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,
-m,v,n,t,A,Sa,J,Ja),"double"==xa&&(z.moveNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,v,n,t,A,Qa,J,Fa),z.paintTop(c,m,v,n,t,A,Sa,J,Ja),z.lineNEInner(c,m,v,n,t,A,Sa,J,ma,Ja),z.paintTopInner(c,m,v,n,t,A,Qa,J,ma,Fa,Da),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),"double"==xa&&(z.moveSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja)),c.stroke()):
-(c.begin(),z.moveNE(c,m,v,n,t,A,Sa,J,Da),z.paintRight(c,m,v,n,t,A,Ta,J,Ha),z.lineSEInner(c,m,v,n,t,A,Ta,J,ma,Ha),z.paintRightInner(c,m,v,n,t,A,Sa,J,ma,Da,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),"double"==xa&&(z.moveSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,v,n,t,A,Ta,J,Ja),z.paintBottom(c,m,v,n,t,A,Ua,J,Fa),z.lineSWInner(c,m,v,n,t,A,Ua,J,ma,Fa),
-z.paintBottomInner(c,m,v,n,t,A,Ta,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveSW(c,m,v,n,t,A,Qa,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),"double"==xa&&(z.moveNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa)),c.stroke()):(c.begin(),z.moveSW(c,m,v,n,t,A,Qa,J,Ha),z.paintLeft(c,m,v,n,t,A,Qa,J,Da),z.lineNWInner(c,m,v,n,t,A,Qa,J,ma,Da,Fa),z.paintLeftInner(c,m,v,n,t,A,Ua,J,ma,Ha,Fa),c.close(),c.fillAndStroke());c.begin();z.paintFolds(c,m,v,n,t,A,Qa,Sa,
-Ta,Ua,J,Da,Ja,Ha,Fa);c.stroke()};Pa.prototype.moveNW=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(0,0):c.moveTo(0,ia)};Pa.prototype.moveNE=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(n,0):c.moveTo(n-ia,0)};Pa.prototype.moveSE=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(n,t):c.moveTo(n,t-ia)};Pa.prototype.moveSW=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(0,
-t):c.moveTo(ia,t)};Pa.prototype.paintNW=function(c,m,v,n,t,z,A,ia,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ia,ia,0,0,m,ia,0)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(ia,0);else c.lineTo(0,0)};Pa.prototype.paintTop=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(n,0):c.lineTo(n-ia,0)};Pa.prototype.paintNE=
-function(c,m,v,n,t,z,A,ia,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ia,ia,0,0,m,n,ia)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n,ia);else c.lineTo(n,0)};Pa.prototype.paintRight=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(n,t):c.lineTo(n,t-ia)};Pa.prototype.paintLeft=function(c,m,v,n,t,z,A,ia,J){"square"==
-A||"default"==A&&"square"==z||!J?c.lineTo(0,0):c.lineTo(0,ia)};Pa.prototype.paintSE=function(c,m,v,n,t,z,A,ia,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ia,ia,0,0,m,n-ia,t)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-ia,t);else c.lineTo(n,t)};Pa.prototype.paintBottom=function(c,m,v,n,t,z,A,ia,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(0,
-t):c.lineTo(ia,t)};Pa.prototype.paintSW=function(c,m,v,n,t,z,A,ia,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ia,ia,0,0,m,0,t-ia)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(0,t-ia);else c.lineTo(0,t)};Pa.prototype.paintNWInner=function(c,m,v,n,t,z,A,ia,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ia-.5*J,ia-.5*J,0,0,0,J,.5*J+ia);else if("invRound"==
-A||"default"==A&&"invRound"==z)c.arcTo(ia+J,ia+J,0,0,1,J,J+ia);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(J,.5*J+ia);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(J+ia,J+ia),c.lineTo(J,J+ia)};Pa.prototype.paintTopInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,J):xa&&!ma?c.lineTo(J,0):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(ia+.5*J,J):c.lineTo(ia+J,J):c.lineTo(0,
-J):c.lineTo(0,0)};Pa.prototype.paintNEInner=function(c,m,v,n,t,z,A,ia,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ia-.5*J,ia-.5*J,0,0,0,n-ia-.5*J,J);else if("invRound"==A||"default"==A&&"invRound"==z)c.arcTo(ia+J,ia+J,0,0,1,n-ia-J,J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(n-ia-.5*J,J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(n-ia-J,ia+J),c.lineTo(n-ia-J,J)};Pa.prototype.paintRightInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(n-J,0):xa&&!ma?c.lineTo(n,
-J):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,ia+.5*J):c.lineTo(n-J,ia+J):c.lineTo(n-J,0):c.lineTo(n,0)};Pa.prototype.paintLeftInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(J,t):xa&&!ma?c.lineTo(0,t-J):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,t-ia-.5*J):c.lineTo(J,t-ia-J):
-c.lineTo(J,t):c.lineTo(0,t)};Pa.prototype.paintSEInner=function(c,m,v,n,t,z,A,ia,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ia-.5*J,ia-.5*J,0,0,0,n-J,t-ia-.5*J);else if("invRound"==A||"default"==A&&"invRound"==z)c.arcTo(ia+J,ia+J,0,0,1,n-J,t-ia-J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(n-J,t-ia-.5*J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(n-ia-J,t-ia-J),c.lineTo(n-J,t-ia-J)};Pa.prototype.paintBottomInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(n,
-t-J):xa&&!ma?c.lineTo(n-J,t):"square"==A||"default"==A&&"square"==z||!xa?c.lineTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-ia-.5*J,t-J):c.lineTo(n-ia-J,t-J):c.lineTo(n,t)};Pa.prototype.paintSWInner=function(c,m,v,n,t,z,A,ia,J,xa){if(!xa)c.lineTo(J,t);else if("square"==A||"default"==A&&"square"==z)c.lineTo(J,t-J);else if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ia-.5*J,ia-.5*J,0,0,0,ia+.5*J,t-J);else if("invRound"==A||"default"==A&&"invRound"==
-z)c.arcTo(ia+J,ia+J,0,0,1,ia+J,t-J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(ia+.5*J,t-J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(J+ia,t-ia-J),c.lineTo(J+ia,t-J)};Pa.prototype.moveSWInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.moveTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(J,t-ia-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(J,t-ia-J):
-c.moveTo(0,t-J)};Pa.prototype.lineSWInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,t-ia-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(J,t-ia-J):c.lineTo(0,t-J)};Pa.prototype.moveSEInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.moveTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==
-z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(n-J,t-ia-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(n-J,t-ia-J):c.moveTo(n-J,t)};Pa.prototype.lineSEInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.lineTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,t-ia-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-J,t-ia-J):
-c.lineTo(n-J,t)};Pa.prototype.moveNEInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z||xa?c.moveTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(n-J,ia+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(n-J,ia+J):c.moveTo(n,J)};Pa.prototype.lineNEInner=function(c,m,v,n,t,z,A,ia,J,xa){xa?"square"==A||"default"==A&&"square"==z||xa?c.lineTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==
-z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,ia+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-J,ia+J):c.lineTo(n,J)};Pa.prototype.moveNWInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.moveTo(J,0):xa&&!ma?c.moveTo(0,J):"square"==A||"default"==A&&"square"==z?c.moveTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(J,ia+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==
-A&&"fold"==z)&&c.moveTo(J,ia+J):c.moveTo(0,0)};Pa.prototype.lineNWInner=function(c,m,v,n,t,z,A,ia,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(J,0):xa&&!ma?c.lineTo(0,J):"square"==A||"default"==A&&"square"==z?c.lineTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,ia+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(J,ia+J):c.lineTo(0,0)};Pa.prototype.paintFolds=function(c,m,v,n,t,z,A,ia,J,xa,ma,Va,jb,bb,Da){if("fold"==
-z||"fold"==A||"fold"==ia||"fold"==J||"fold"==xa)("fold"==A||"default"==A&&"fold"==z)&&Va&&Da&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ia||"default"==ia&&"fold"==z)&&Va&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==J||"default"==J&&"fold"==z)&&bb&&jb&&(c.moveTo(n-ma,t),c.lineTo(n-ma,t-ma),c.lineTo(n,t-ma)),("fold"==xa||"default"==xa&&"fold"==z)&&bb&&Da&&(c.moveTo(0,t-ma),c.lineTo(ma,t-ma),c.lineTo(ma,t))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);
-Pa.prototype.constraints=null;mxUtils.extend($a,mxConnector);$a.prototype.origPaintEdgeShape=$a.prototype.paintEdgeShape;$a.prototype.paintEdgeShape=function(c,m,v){for(var n=[],t=0;t<m.length;t++)n.push(mxUtils.clone(m[t]));t=c.state.dashed;var z=c.state.fixDash;$a.prototype.origPaintEdgeShape.apply(this,[c,n,v]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,z),$a.prototype.origPaintEdgeShape.apply(this,
-[c,m,v])))};mxCellRenderer.registerShape("filledEdge",$a);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),v=c.apply(this,arguments);"umlFrame"==m.style.shape&&v.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return v}}();mxMarker.addMarker("dash",function(c,m,v,n,t,z,A,ia,J,xa){var ma=t*(A+J+1),Va=z*(A+J+1);return function(){c.begin();
-c.moveTo(n.x-ma/2-Va/2,n.y-Va/2+ma/2);c.lineTo(n.x+Va/2-3*ma/2,n.y-3*Va/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,v,n,t,z,A,ia,J,xa){var ma=t*(A+J+1),Va=z*(A+J+1),jb=n.x+ma/2,bb=n.y+Va/2;n.x-=ma;n.y-=Va;return function(){c.begin();c.moveTo(jb-ma/2-Va/2,bb-Va/2+ma/2);c.lineTo(jb-ma/2+Va/2,bb-Va/2-ma/2);c.lineTo(jb+Va/2-3*ma/2,bb-3*Va/2-ma/2);c.lineTo(jb-Va/2-3*ma/2,bb-3*Va/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,v,n,t,z,A,ia,J,
-xa){var ma=t*(A+J+1),Va=z*(A+J+1);return function(){c.begin();c.moveTo(n.x-ma/2-Va/2,n.y-Va/2+ma/2);c.lineTo(n.x+Va/2-3*ma/2,n.y-3*Va/2-ma/2);c.moveTo(n.x-ma/2+Va/2,n.y-Va/2-ma/2);c.lineTo(n.x-Va/2-3*ma/2,n.y-3*Va/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(c,m,v,n,t,z,A,ia,J,xa){var ma=n.clone(),Va=eb.apply(this,arguments),jb=t*(A+2*J),bb=z*(A+2*J);return function(){Va.apply(this,arguments);c.begin();c.moveTo(ma.x-t*J,ma.y-z*J);c.lineTo(ma.x-2*jb+
-t*J,ma.y-2*bb+z*J);c.moveTo(ma.x-jb-bb+z*J,ma.y-bb+jb-t*J);c.lineTo(ma.x+bb-jb-z*J,ma.y-bb-jb+t*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,v,n,t,z,A,ia,J,xa){var ma=t*(A+J+1),Va=z*(A+J+1),jb=n.clone();n.x-=ma;n.y-=Va;return function(){c.begin();c.moveTo(jb.x-Va,jb.y+ma);c.quadTo(n.x-Va,n.y+ma,n.x,n.y);c.quadTo(n.x+Va,n.y-ma,jb.x+Va,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,v,n,t,z,A,ia,J,xa){m=t*J*1.118;v=z*J*1.118;t*=A+J;z*=A+J;var ma=n.clone();ma.x-=m;ma.y-=
-v;n.x+=-t-m;n.y+=-z-v;return function(){c.begin();c.moveTo(ma.x,ma.y);ia?c.lineTo(ma.x-t-z/2,ma.y-z+t/2):c.lineTo(ma.x+z/2-t,ma.y-z-t/2);c.lineTo(ma.x-t,ma.y-z);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,v,n,t,z,A,ia,J,xa,ma){z*=ia+xa;A*=ia+xa;var Va=t.clone();return function(){m.begin();m.moveTo(Va.x,Va.y);J?m.lineTo(Va.x-z-A/c,Va.y-A+z/c):m.lineTo(Va.x+A/c-z,Va.y-A-z/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=
-function(c,m,v){return hb(c,["width"],m,function(n,t,z,A,ia){ia=c.shape.getEdgeWidth()*c.view.scale+v;return new mxPoint(A.x+t*n/4+z*ia/2,A.y+z*n/4-t*ia/2)},function(n,t,z,A,ia,J){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ia.x,ia.y,J.x,J.y));c.style.width=Math.round(2*n)/c.view.scale-v})},hb=function(c,m,v,n,t){return gb(c,m,function(z){var A=c.absolutePoints,ia=A.length-1;z=c.view.translate;var J=c.view.scale,xa=v?A[0]:A[ia];A=v?A[1]:A[ia-1];ia=A.x-xa.x;var ma=A.y-xa.y,Va=Math.sqrt(ia*ia+ma*ma);xa=
-n.call(this,Va,ia/Va,ma/Va,xa,A);return new mxPoint(xa.x/J-z.x,xa.y/J-z.y)},function(z,A,ia){var J=c.absolutePoints,xa=J.length-1;z=c.view.translate;var ma=c.view.scale,Va=v?J[0]:J[xa];J=v?J[1]:J[xa-1];xa=J.x-Va.x;var jb=J.y-Va.y,bb=Math.sqrt(xa*xa+jb*jb);A.x=(A.x+z.x)*ma;A.y=(A.y+z.y)*ma;t.call(this,bb,xa/bb,jb/bb,Va,J,A,ia)})},qb=function(c,m){return function(v){return[hb(v,["startWidth"],!0,function(n,t,z,A,ia){ia=mxUtils.getNumber(v.style,"startWidth",c)*v.view.scale+m;return new mxPoint(A.x+
-t*n/4+z*ia/2,A.y+z*n/4-t*ia/2)},function(n,t,z,A,ia,J){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ia.x,ia.y,J.x,J.y));v.style.startWidth=Math.round(2*n)/v.view.scale-m})]}},kb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ya.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Ya.prototype.arrowSize)));return new mxPoint(v.x+(1-t)*v.width,v.y+(1-n)*v.height/
-2)},function(v,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(v.y+v.height/2-n.y)/v.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(v.x+v.width-n.x)/v.width))})]}},ib=function(c){return function(m){return[gb(m,["size"],function(v){var n=Math.max(0,Math.min(.5*v.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(v.x,v.y+n)},function(v,n){this.state.style.size=Math.max(0,n.y-v.y)},!0)]}},ub=function(c,m,v){return function(n){var t=[gb(n,["size"],
-function(z){var A=Math.max(0,Math.min(z.width,Math.min(z.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(z.x+A,z.y+A)},function(z,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(z.width,A.x-z.x),Math.min(z.height,A.y-z.y)))/c)},!1)];v&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(lb(n));return t}},ob=function(c,m,v,n,t){v=null!=v?v:.5;return function(z){var A=[gb(z,["size"],function(ia){var J=null!=t?"0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",J?t:c));return new mxPoint(ia.x+Math.max(0,Math.min(.5*ia.width,xa*(J?1:ia.width))),ia.getCenterY())},function(ia,J,xa){ia=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ia.x:Math.max(0,Math.min(v,(J.x-ia.x)/ia.width));this.state.style.size=ia},!1,n)];m&&mxUtils.getValue(z.style,mxConstants.STYLE_ROUNDED,!1)&&A.push(lb(z));return A}},nb=function(c,m,v){c=null!=c?c:.5;return function(n){var t=[gb(n,["size"],
-function(z){var A=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ia=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",A?v:m)));return new mxPoint(z.x+Math.min(.75*z.width*c,ia*(A?.75:.75*z.width)),z.y+z.height/4)},function(z,A){z=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?A.x-z.x:Math.max(0,Math.min(c,(A.x-z.x)/z.width*.75));this.state.style.size=z},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(lb(n));return t}},wb=
-function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m}},lb=function(c,m){return gb(c,[mxConstants.STYLE_ARCSIZE],function(v){var n=null!=m?m:v.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(v.x+v.width-Math.min(v.width/2,t),v.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
-100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(v.x+v.width-Math.min(Math.max(v.width/2,v.height/2),Math.min(v.width,v.height)*t),v.y+n)},function(v,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(v.width,2*(v.x+v.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(v.width-n.x+v.x)/Math.min(v.width,v.height))))})},gb=function(c,m,v,n,
-t,z,A){var ia=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ia.execute=function(xa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);A&&A(xa)};ia.getPosition=v;ia.setPosition=n;ia.ignoreGrid=null!=t?t:!0;if(z){var J=ia.positionChanged;ia.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ia},tb={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,v=[];
-mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,z,A,ia){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ia+c.shape.strokewidth*c.view.scale)+z*n/2,A.y+z*(ia+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,z,A,ia,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,
-A.y,ia.x,ia.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
-m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,z,A,ia){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ia+c.shape.strokewidth*c.view.scale)+z*n/2,A.y+z*(ia+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,z,A,ia,
-J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ia.x,ia.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||
-(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(v.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,z,A,ia){n=(c.shape.getEdgeWidth()-
-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ia+c.shape.strokewidth*c.view.scale)-z*n/2,A.y+z*(ia+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,z,A,ia,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ia.x,ia.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
-n)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),v.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,z,A,ia){n=
-(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ia=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ia+c.shape.strokewidth*c.view.scale)-z*n/2,A.y+z*(ia+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,z,A,ia,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ia.x,ia.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;
+Jb=Math.max(0,Math.min(50,J));z=Pa.prototype;c.setDashed(Wa);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Gb);J=Math.min(.5*t,.5*n,J);ha||(J=Jb*Math.min(n,t)/100);J=Math.min(J,.5*Math.min(n,t));ha||(ma=Math.min(bb*Math.min(n,t)/100));ma=Math.min(ma,.5*Math.min(n,t)-J);(Da||Ja||Ha||Ga)&&"frame"!=xa&&(c.begin(),Da?z.moveNW(c,m,u,n,t,A,Ra,J,Ga):c.moveTo(0,0),Da&&z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),Ja&&z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),Ha&&
+z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),Ga&&z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Db),Wa=ha=Ib,"none"==Db&&(ha=0),"none"==Eb&&(Wa=0),c.setGradient(Db,Eb,0,0,n,t,Hb,ha,Wa),c.begin(),Da?z.moveNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga):c.moveTo(ma,0),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),Ga&&Ha&&z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),Ha&&Ja&&z.paintSEInner(c,
+m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),Ja&&Da&&z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),Da&&Ga&&z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),c.fill(),"none"==Fb&&(c.begin(),z.paintFolds(c,m,u,n,t,A,Ra,Ta,Ua,Va,J,Da,Ja,Ha,Ga),c.stroke()));Da||Ja||Ha||!Ga?Da||Ja||!Ha||Ga?!Da&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),"double"==
+xa&&(z.moveNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.lineNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),c.close(),
+c.fillAndStroke()):Da||!Ja||Ha||Ga?!Da&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),z.moveSW(c,m,u,n,t,A,Ra,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),"double"==xa&&(z.moveNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga)),c.stroke(),c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),"double"==xa&&(z.moveSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja)),c.stroke()):(c.begin(),z.moveSW(c,m,u,n,t,A,Ra,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,
+J,Da),z.lineNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),c.close(),c.fillAndStroke(),c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.lineSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),"double"==xa&&(z.moveSWInner(c,
+m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja)),c.stroke()):(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.lineSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da&&
+Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),"double"==xa&&(z.moveNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja)),c.stroke()):
+(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.lineNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),c.close(),c.fillAndStroke()):!Da||Ja||Ha||Ga?
+Da&&!Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),z.moveSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),"double"==xa&&(z.moveNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga)),c.stroke()):(c.begin(),z.moveSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.lineNEInner(c,
+m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),c.close(),c.fillAndStroke()):Da&&!Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),"double"==xa&&(z.moveNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da)),c.stroke(),c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),"double"==xa&&(z.moveSWInner(c,m,u,n,t,A,Va,
+J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.lineNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),c.close(),c.fillAndStroke(),c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.lineSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):Da&&!Ja&&Ha&&Ga?"frame"!=xa?(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,
+J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),"double"==xa&&(z.moveNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,
+u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.lineNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):Da&&Ja&&!Ha&&!Ga?"frame"!=xa?(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,
+m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),"double"==xa&&(z.moveSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.lineSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,
+m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),c.close(),c.fillAndStroke()):Da&&Ja&&!Ha&&Ga?"frame"!=xa?(c.begin(),z.moveSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),"double"==xa&&(z.moveSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,
+m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga)),c.stroke()):(c.begin(),z.moveSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.lineSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,
+t,A,Va,J,ma,Ha,Ga),c.close(),c.fillAndStroke()):Da&&Ja&&Ha&&!Ga?"frame"!=xa?(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),"double"==xa&&(z.moveSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,
+m,u,n,t,A,Ra,J,ma,Ga,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.lineSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),c.close(),c.fillAndStroke()):
+Da&&Ja&&Ha&&Ga&&("frame"!=xa?(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),c.close(),"double"==xa&&(z.moveSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,
+A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),c.close()),c.stroke()):(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.paintNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.paintSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.paintSW(c,m,u,n,t,A,Va,J,Ha),
+z.paintLeft(c,m,u,n,t,A,Ra,J,Da),c.close(),z.moveSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintSWInner(c,m,u,n,t,A,Va,J,ma,Ha),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),z.paintSEInner(c,m,u,n,t,A,Ua,J,ma),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),z.paintNEInner(c,m,u,n,t,A,Ta,J,ma),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),z.paintNWInner(c,m,u,n,t,A,Ra,J,ma),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,
+m,u,n,t,A,Ta,J,Ja),"double"==xa&&(z.moveNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da)),c.stroke()):(c.begin(),z.moveNW(c,m,u,n,t,A,Ra,J,Ga),z.paintTop(c,m,u,n,t,A,Ta,J,Ja),z.lineNEInner(c,m,u,n,t,A,Ta,J,ma,Ja),z.paintTopInner(c,m,u,n,t,A,Ra,J,ma,Ga,Da),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),"double"==xa&&(z.moveSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja)),c.stroke()):
+(c.begin(),z.moveNE(c,m,u,n,t,A,Ta,J,Da),z.paintRight(c,m,u,n,t,A,Ua,J,Ha),z.lineSEInner(c,m,u,n,t,A,Ua,J,ma,Ha),z.paintRightInner(c,m,u,n,t,A,Ta,J,ma,Da,Ja),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),"double"==xa&&(z.moveSWInner(c,m,u,n,t,A,Va,J,ma,Ga),z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha)),c.stroke()):(c.begin(),z.moveSE(c,m,u,n,t,A,Ua,J,Ja),z.paintBottom(c,m,u,n,t,A,Va,J,Ga),z.lineSWInner(c,m,u,n,t,A,Va,J,ma,Ga),
+z.paintBottomInner(c,m,u,n,t,A,Ua,J,ma,Ja,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),z.moveSW(c,m,u,n,t,A,Ra,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),"double"==xa&&(z.moveNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga)),c.stroke()):(c.begin(),z.moveSW(c,m,u,n,t,A,Ra,J,Ha),z.paintLeft(c,m,u,n,t,A,Ra,J,Da),z.lineNWInner(c,m,u,n,t,A,Ra,J,ma,Da,Ga),z.paintLeftInner(c,m,u,n,t,A,Va,J,ma,Ha,Ga),c.close(),c.fillAndStroke());c.begin();z.paintFolds(c,m,u,n,t,A,Ra,Ta,
+Ua,Va,J,Da,Ja,Ha,Ga);c.stroke()};Pa.prototype.moveNW=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(0,0):c.moveTo(0,ha)};Pa.prototype.moveNE=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(n,0):c.moveTo(n-ha,0)};Pa.prototype.moveSE=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(n,t):c.moveTo(n,t-ha)};Pa.prototype.moveSW=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.moveTo(0,
+t):c.moveTo(ha,t)};Pa.prototype.paintNW=function(c,m,u,n,t,z,A,ha,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(ha,0);else c.lineTo(0,0)};Pa.prototype.paintTop=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(n,0):c.lineTo(n-ha,0)};Pa.prototype.paintNE=
+function(c,m,u,n,t,z,A,ha,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ha,ha,0,0,m,n,ha)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n,ha);else c.lineTo(n,0)};Pa.prototype.paintRight=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(n,t):c.lineTo(n,t-ha)};Pa.prototype.paintLeft=function(c,m,u,n,t,z,A,ha,J){"square"==
+A||"default"==A&&"square"==z||!J?c.lineTo(0,0):c.lineTo(0,ha)};Pa.prototype.paintSE=function(c,m,u,n,t,z,A,ha,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ha,ha,0,0,m,n-ha,t)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-ha,t);else c.lineTo(n,t)};Pa.prototype.paintBottom=function(c,m,u,n,t,z,A,ha,J){"square"==A||"default"==A&&"square"==z||!J?c.lineTo(0,
+t):c.lineTo(ha,t)};Pa.prototype.paintSW=function(c,m,u,n,t,z,A,ha,J){if(J)if("rounded"==A||"default"==A&&"rounded"==z||"invRound"==A||"default"==A&&"invRound"==z){m=0;if("rounded"==A||"default"==A&&"rounded"==z)m=1;c.arcTo(ha,ha,0,0,m,0,t-ha)}else("snip"==A||"default"==A&&"snip"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(0,t-ha);else c.lineTo(0,t)};Pa.prototype.paintNWInner=function(c,m,u,n,t,z,A,ha,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,J,.5*J+ha);else if("invRound"==
+A||"default"==A&&"invRound"==z)c.arcTo(ha+J,ha+J,0,0,1,J,J+ha);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(J,.5*J+ha);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(J+ha,J+ha),c.lineTo(J,J+ha)};Pa.prototype.paintTopInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,J):xa&&!ma?c.lineTo(J,0):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(ha+.5*J,J):c.lineTo(ha+J,J):c.lineTo(0,
+J):c.lineTo(0,0)};Pa.prototype.paintNEInner=function(c,m,u,n,t,z,A,ha,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,n-ha-.5*J,J);else if("invRound"==A||"default"==A&&"invRound"==z)c.arcTo(ha+J,ha+J,0,0,1,n-ha-J,J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(n-ha-.5*J,J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(n-ha-J,ha+J),c.lineTo(n-ha-J,J)};Pa.prototype.paintRightInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(n-J,0):xa&&!ma?c.lineTo(n,
+J):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,ha+.5*J):c.lineTo(n-J,ha+J):c.lineTo(n-J,0):c.lineTo(n,0)};Pa.prototype.paintLeftInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(J,t):xa&&!ma?c.lineTo(0,t-J):xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,t-ha-.5*J):c.lineTo(J,t-ha-J):
+c.lineTo(J,t):c.lineTo(0,t)};Pa.prototype.paintSEInner=function(c,m,u,n,t,z,A,ha,J){if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,n-J,t-ha-.5*J);else if("invRound"==A||"default"==A&&"invRound"==z)c.arcTo(ha+J,ha+J,0,0,1,n-J,t-ha-J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(n-J,t-ha-.5*J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(n-ha-J,t-ha-J),c.lineTo(n-J,t-ha-J)};Pa.prototype.paintBottomInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(n,
+t-J):xa&&!ma?c.lineTo(n-J,t):"square"==A||"default"==A&&"square"==z||!xa?c.lineTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-ha-.5*J,t-J):c.lineTo(n-ha-J,t-J):c.lineTo(n,t)};Pa.prototype.paintSWInner=function(c,m,u,n,t,z,A,ha,J,xa){if(!xa)c.lineTo(J,t);else if("square"==A||"default"==A&&"square"==z)c.lineTo(J,t-J);else if("rounded"==A||"default"==A&&"rounded"==z)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,ha+.5*J,t-J);else if("invRound"==A||"default"==A&&"invRound"==
+z)c.arcTo(ha+J,ha+J,0,0,1,ha+J,t-J);else if("snip"==A||"default"==A&&"snip"==z)c.lineTo(ha+.5*J,t-J);else if("fold"==A||"default"==A&&"fold"==z)c.lineTo(J+ha,t-ha-J),c.lineTo(J+ha,t-J)};Pa.prototype.moveSWInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.moveTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(J,t-ha-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(J,t-ha-J):
+c.moveTo(0,t-J)};Pa.prototype.lineSWInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.lineTo(J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,t-ha-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(J,t-ha-J):c.lineTo(0,t-J)};Pa.prototype.moveSEInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.moveTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==
+z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(n-J,t-ha-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(n-J,t-ha-J):c.moveTo(n-J,t)};Pa.prototype.lineSEInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z?c.lineTo(n-J,t-J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,t-ha-.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-J,t-ha-J):
+c.lineTo(n-J,t)};Pa.prototype.moveNEInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z||xa?c.moveTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(n-J,ha+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.moveTo(n-J,ha+J):c.moveTo(n,J)};Pa.prototype.lineNEInner=function(c,m,u,n,t,z,A,ha,J,xa){xa?"square"==A||"default"==A&&"square"==z||xa?c.lineTo(n-J,J):"rounded"==A||"default"==A&&"rounded"==
+z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(n-J,ha+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(n-J,ha+J):c.lineTo(n,J)};Pa.prototype.moveNWInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.moveTo(J,0):xa&&!ma?c.moveTo(0,J):"square"==A||"default"==A&&"square"==z?c.moveTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.moveTo(J,ha+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==
+A&&"fold"==z)&&c.moveTo(J,ha+J):c.moveTo(0,0)};Pa.prototype.lineNWInner=function(c,m,u,n,t,z,A,ha,J,xa,ma){xa||ma?!xa&&ma?c.lineTo(J,0):xa&&!ma?c.lineTo(0,J):"square"==A||"default"==A&&"square"==z?c.lineTo(J,J):"rounded"==A||"default"==A&&"rounded"==z||"snip"==A||"default"==A&&"snip"==z?c.lineTo(J,ha+.5*J):("invRound"==A||"default"==A&&"invRound"==z||"fold"==A||"default"==A&&"fold"==z)&&c.lineTo(J,ha+J):c.lineTo(0,0)};Pa.prototype.paintFolds=function(c,m,u,n,t,z,A,ha,J,xa,ma,Wa,jb,bb,Da){if("fold"==
+z||"fold"==A||"fold"==ha||"fold"==J||"fold"==xa)("fold"==A||"default"==A&&"fold"==z)&&Wa&&Da&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==z)&&Wa&&jb&&(c.moveTo(n-ma,0),c.lineTo(n-ma,ma),c.lineTo(n,ma)),("fold"==J||"default"==J&&"fold"==z)&&bb&&jb&&(c.moveTo(n-ma,t),c.lineTo(n-ma,t-ma),c.lineTo(n,t-ma)),("fold"==xa||"default"==xa&&"fold"==z)&&bb&&Da&&(c.moveTo(0,t-ma),c.lineTo(ma,t-ma),c.lineTo(ma,t))};mxCellRenderer.registerShape(Pa.prototype.cst.RECT2,Pa);
+Pa.prototype.constraints=null;mxUtils.extend($a,mxConnector);$a.prototype.origPaintEdgeShape=$a.prototype.paintEdgeShape;$a.prototype.paintEdgeShape=function(c,m,u){for(var n=[],t=0;t<m.length;t++)n.push(mxUtils.clone(m[t]));t=c.state.dashed;var z=c.state.fixDash;$a.prototype.origPaintEdgeShape.apply(this,[c,n,u]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(t,z),$a.prototype.origPaintEdgeShape.apply(this,
+[c,m,u])))};mxCellRenderer.registerShape("filledEdge",$a);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),u=c.apply(this,arguments);"umlFrame"==m.style.shape&&u.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return u}}();mxMarker.addMarker("dash",function(c,m,u,n,t,z,A,ha,J,xa){var ma=t*(A+J+1),Wa=z*(A+J+1);return function(){c.begin();
+c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,u,n,t,z,A,ha,J,xa){var ma=t*(A+J+1),Wa=z*(A+J+1),jb=n.x+ma/2,bb=n.y+Wa/2;n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb-ma/2-Wa/2,bb-Wa/2+ma/2);c.lineTo(jb-ma/2+Wa/2,bb-Wa/2-ma/2);c.lineTo(jb+Wa/2-3*ma/2,bb-3*Wa/2-ma/2);c.lineTo(jb-Wa/2-3*ma/2,bb-3*Wa/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,u,n,t,z,A,ha,J,
+xa){var ma=t*(A+J+1),Wa=z*(A+J+1);return function(){c.begin();c.moveTo(n.x-ma/2-Wa/2,n.y-Wa/2+ma/2);c.lineTo(n.x+Wa/2-3*ma/2,n.y-3*Wa/2-ma/2);c.moveTo(n.x-ma/2+Wa/2,n.y-Wa/2-ma/2);c.lineTo(n.x-Wa/2-3*ma/2,n.y-3*Wa/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",eb);mxMarker.addMarker("circlePlus",function(c,m,u,n,t,z,A,ha,J,xa){var ma=n.clone(),Wa=eb.apply(this,arguments),jb=t*(A+2*J),bb=z*(A+2*J);return function(){Wa.apply(this,arguments);c.begin();c.moveTo(ma.x-t*J,ma.y-z*J);c.lineTo(ma.x-2*jb+
+t*J,ma.y-2*bb+z*J);c.moveTo(ma.x-jb-bb+z*J,ma.y-bb+jb-t*J);c.lineTo(ma.x+bb-jb-z*J,ma.y-bb-jb+t*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,u,n,t,z,A,ha,J,xa){var ma=t*(A+J+1),Wa=z*(A+J+1),jb=n.clone();n.x-=ma;n.y-=Wa;return function(){c.begin();c.moveTo(jb.x-Wa,jb.y+ma);c.quadTo(n.x-Wa,n.y+ma,n.x,n.y);c.quadTo(n.x+Wa,n.y-ma,jb.x+Wa,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,m,u,n,t,z,A,ha,J,xa){m=t*J*1.118;u=z*J*1.118;t*=A+J;z*=A+J;var ma=n.clone();ma.x-=m;ma.y-=
+u;n.x+=-t-m;n.y+=-z-u;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-t-z/2,ma.y-z+t/2):c.lineTo(ma.x+z/2-t,ma.y-z-t/2);c.lineTo(ma.x-t,ma.y-z);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,u,n,t,z,A,ha,J,xa,ma){z*=ha+xa;A*=ha+xa;var Wa=t.clone();return function(){m.begin();m.moveTo(Wa.x,Wa.y);J?m.lineTo(Wa.x-z-A/c,Wa.y-A+z/c):m.lineTo(Wa.x+A/c-z,Wa.y-A-z/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var fb=
+function(c,m,u){return hb(c,["width"],m,function(n,t,z,A,ha){ha=c.shape.getEdgeWidth()*c.view.scale+u;return new mxPoint(A.x+t*n/4+z*ha/2,A.y+z*n/4-t*ha/2)},function(n,t,z,A,ha,J){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ha.x,ha.y,J.x,J.y));c.style.width=Math.round(2*n)/c.view.scale-u})},hb=function(c,m,u,n,t){return gb(c,m,function(z){var A=c.absolutePoints,ha=A.length-1;z=c.view.translate;var J=c.view.scale,xa=u?A[0]:A[ha];A=u?A[1]:A[ha-1];ha=A.x-xa.x;var ma=A.y-xa.y,Wa=Math.sqrt(ha*ha+ma*ma);xa=
+n.call(this,Wa,ha/Wa,ma/Wa,xa,A);return new mxPoint(xa.x/J-z.x,xa.y/J-z.y)},function(z,A,ha){var J=c.absolutePoints,xa=J.length-1;z=c.view.translate;var ma=c.view.scale,Wa=u?J[0]:J[xa];J=u?J[1]:J[xa-1];xa=J.x-Wa.x;var jb=J.y-Wa.y,bb=Math.sqrt(xa*xa+jb*jb);A.x=(A.x+z.x)*ma;A.y=(A.y+z.y)*ma;t.call(this,bb,xa/bb,jb/bb,Wa,J,A,ha)})},qb=function(c,m){return function(u){return[hb(u,["startWidth"],!0,function(n,t,z,A,ha){ha=mxUtils.getNumber(u.style,"startWidth",c)*u.view.scale+m;return new mxPoint(A.x+
+t*n/4+z*ha/2,A.y+z*n/4-t*ha/2)},function(n,t,z,A,ha,J){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ha.x,ha.y,J.x,J.y));u.style.startWidth=Math.round(2*n)/u.view.scale-m})]}},kb=function(c){return function(m){return[gb(m,["arrowWidth","arrowSize"],function(u){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",Ya.prototype.arrowWidth))),t=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",Ya.prototype.arrowSize)));return new mxPoint(u.x+(1-t)*u.width,u.y+(1-n)*u.height/
+2)},function(u,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(u.y+u.height/2-n.y)/u.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(u.x+u.width-n.x)/u.width))})]}},ib=function(c){return function(m){return[gb(m,["size"],function(u){var n=Math.max(0,Math.min(.5*u.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(u.x,u.y+n)},function(u,n){this.state.style.size=Math.max(0,n.y-u.y)},!0)]}},ub=function(c,m,u){return function(n){var t=[gb(n,["size"],
+function(z){var A=Math.max(0,Math.min(z.width,Math.min(z.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(z.x+A,z.y+A)},function(z,A){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(z.width,A.x-z.x),Math.min(z.height,A.y-z.y)))/c)},!1)];u&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(lb(n));return t}},ob=function(c,m,u,n,t){u=null!=u?u:.5;return function(z){var A=[gb(z,["size"],function(ha){var J=null!=t?"0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",J?t:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(J?1:ha.width))),ha.getCenterY())},function(ha,J,xa){ha=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ha.x:Math.max(0,Math.min(u,(J.x-ha.x)/ha.width));this.state.style.size=ha},!1,n)];m&&mxUtils.getValue(z.style,mxConstants.STYLE_ROUNDED,!1)&&A.push(lb(z));return A}},nb=function(c,m,u){c=null!=c?c:.5;return function(n){var t=[gb(n,["size"],
+function(z){var A=null!=u?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",A?u:m)));return new mxPoint(z.x+Math.min(.75*z.width*c,ha*(A?.75:.75*z.width)),z.y+z.height/4)},function(z,A){z=null!=u&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?A.x-z.x:Math.max(0,Math.min(c,(A.x-z.x)/z.width*.75));this.state.style.size=z},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&t.push(lb(n));return t}},wb=
+function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m}},lb=function(c,m){return gb(c,[mxConstants.STYLE_ARCSIZE],function(u){var n=null!=m?m:u.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var t=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(u.x+u.width-Math.min(u.width/2,t),u.y+n)}t=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(u.x+u.width-Math.min(Math.max(u.width/2,u.height/2),Math.min(u.width,u.height)*t),u.y+n)},function(u,n,t){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(u.width,2*(u.x+u.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(u.width-n.x+u.x)/Math.min(u.width,u.height))))})},gb=function(c,m,u,n,
+t,z,A){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var ma=0;ma<m.length;ma++)this.copyStyle(m[ma]);A&&A(xa)};ha.getPosition=u;ha.setPosition=n;ha.ignoreGrid=null!=t?t:!0;if(z){var J=ha.positionChanged;ha.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return ha},tb={link:function(c){return[fb(c,!0,10),fb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,u=[];
+mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(u.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,z,A,ha){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ha+c.shape.strokewidth*c.view.scale)+z*n/2,A.y+z*(ha+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,z,A,ha,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,
+A.y,ha.x,ha.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<
+m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),u.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(n,t,z,A,ha){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ha+c.shape.strokewidth*c.view.scale)+z*n/2,A.y+z*(ha+c.shape.strokewidth*c.view.scale)-t*n/2)},function(n,t,z,A,ha,
+J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ha.x,ha.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||
+(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(u.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,z,A,ha){n=(c.shape.getEdgeWidth()-
+c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ha+c.shape.strokewidth*c.view.scale)-z*n/2,A.y+z*(ha+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,z,A,ha,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ha.x,ha.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*
+n)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),u.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,t,z,A,ha){n=
+(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(A.x+t*(ha+c.shape.strokewidth*c.view.scale)-z*n/2,A.y+z*(ha+c.shape.strokewidth*c.view.scale)+t*n/2)},function(n,t,z,A,ha,J,xa){n=Math.sqrt(mxUtils.ptSegDistSq(A.x,A.y,ha.x,ha.y,J.x,J.y));t=mxUtils.ptLineDist(A.x,A.y,A.x+z,A.y-t,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(t-c.shape.strokewidth)/3)/100/c.view.scale;
c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-
-parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return v},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var v=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(lb(c,v/2))}m.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
+parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return u},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var u=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(lb(c,u/2))}m.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(n){var t=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,
1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,t))):new mxPoint(n.x+Math.max(0,Math.min(n.width,t)),n.getCenterY())},function(n,t){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,t.y-n.y))):Math.round(Math.max(0,Math.min(n.width,t.x-n.x)))},!1,null,function(n){var t=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(t.isTableRow(c.cell)||t.isTableCell(c.cell))){n=
-t.getSwimlaneDirection(c.style);var z=t.model.getParent(c.cell);z=t.model.getChildCells(z,!0);for(var A=[],ia=0;ia<z.length;ia++)z[ia]!=c.cell&&t.isSwimlane(z[ia])&&t.getSwimlaneDirection(t.getCurrentCellStyle(z[ia]))==n&&A.push(z[ia]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],A)}}));return m},label:wb(),ext:wb(),rectangle:wb(),triangle:wb(),rhombus:wb(),umlLifeline:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",ba.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(m){var v=Math.max(U.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",U.prototype.width))),n=Math.max(1.5*U.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",U.prototype.height)));return new mxPoint(m.x+v,m.y+n)},function(m,
-v){this.state.style.width=Math.round(Math.max(U.prototype.corner,Math.min(m.width,v.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*U.prototype.corner,Math.min(m.height,v.y-m.y)))},!1)]},process:function(c){var m=[gb(c,["size"],function(v){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size));return n?new mxPoint(v.x+t,v.y+v.height/4):new mxPoint(v.x+v.width*t,v.y+v.height/4)},function(v,n){v="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(.5*v.width,n.x-v.x)):Math.max(0,Math.min(.5,(n.x-v.x)/v.width));this.state.style.size=v},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},cross:function(c){return[gb(c,["size"],function(m){var v=Math.min(m.width,m.height);v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ga.prototype.size)))*v/2;return new mxPoint(m.getCenterX()-v,m.getCenterY()-v)},function(m,v){var n=Math.min(m.width,m.height);this.state.style.size=
-Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-v.y)/n*2,Math.max(0,m.getCenterX()-v.x)/n*2)))})]},note:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},note2:function(c){return[gb(c,["size"],function(m){var v=
-Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size)))));return new mxPoint(m.x+m.width-v,m.y+v)},function(m,v){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-v.x),Math.min(m.height,v.y-m.y))))})]},manualInput:function(c){var m=[gb(c,["size"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",Oa.prototype.size)));return new mxPoint(v.x+v.width/4,v.y+3*n/4)},function(v,
-n){this.state.style.size=Math.round(Math.max(0,Math.min(v.height,4*(n.y-v.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},dataStorage:function(c){return[gb(c,["size"],function(m){var v="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",v?O.prototype.fixedSize:O.prototype.size));return new mxPoint(m.x+m.width-n*(v?1:m.width),m.getCenterY())},function(m,v){m="0"!=mxUtils.getValue(this.state.style,
-"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-v.x)):Math.max(0,Math.min(1,(m.x+m.width-v.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[gb(c,["size","position"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",pa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position)));mxUtils.getValue(this.state.style,"base",pa.prototype.base);return new mxPoint(v.x+t*v.width,v.y+v.height-
-n)},function(v,n){mxUtils.getValue(this.state.style,"base",pa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(v.height,v.y+v.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-v.x)/v.width)))/100},!1),gb(c,["position2"],function(v){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",pa.prototype.position2)));return new mxPoint(v.x+n*v.width,v.y+v.height)},function(v,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(n.x-v.x)/v.width)))/100},!1),gb(c,["base"],function(v){var n=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"size",pa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position))),z=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"base",pa.prototype.base)));return new mxPoint(v.x+Math.min(v.width,t*v.width+z),v.y+v.height-n)},function(v,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position)));
-this.state.style.base=Math.round(Math.max(0,Math.min(v.width,n.x-v.x-t*v.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},internalStorage:function(c){var m=[gb(c,["dx","dy"],function(v){var n=Math.max(0,Math.min(v.width,mxUtils.getValue(this.state.style,"dx",Ma.prototype.dx))),t=Math.max(0,Math.min(v.height,mxUtils.getValue(this.state.style,"dy",Ma.prototype.dy)));return new mxPoint(v.x+n,v.y+t)},function(v,n){this.state.style.dx=Math.round(Math.max(0,
-Math.min(v.width,n.x-v.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(v.height,n.y-v.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(m.x+v/2,m.y+
-2*n)},function(m,v){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,v.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Ia.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",Ia.prototype.dy)));return new mxPoint(m.x+v,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,
-Math.min(m.width,v.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+v)/2,m.y+n)},function(m,v){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,v.x-m.x-m.width/2)));this.state.style.dy=
-Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var v=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(v=m.width-v);return new mxPoint(m.x+v,m.y+n)},function(m,v){var n=Math.max(0,Math.min(m.width,v.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,v.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(m.getCenterX(),m.y+v*m.height/2)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(v.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(m){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(v),.5*m.height))},function(m,v){this.state.style.isoAngle=Math.max(0,50*(v.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var v=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
-return new mxPoint(m.getCenterX(),m.y+(1-v)*m.height)},function(m,v){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-v.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(v){var n=Math.max(0,Math.min(v.width/2,v.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(v.x+n,v.y+n)},function(v,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(v.height/2,v.width/2,n.x-v.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(v){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(v.x+.75*v.width,v.y+n*v.height/200)},function(v,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-v.y)/v.height)))/100});m.push(c);return m},step:ob(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(G.prototype.size,!1),display:ob(Ka.prototype.size,!1),cube:ub(1,
-l.prototype.size,!1),card:ub(.5,y.prototype.size,!0),loopLimit:ub(.5,aa.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+t.getSwimlaneDirection(c.style);var z=t.model.getParent(c.cell);z=t.model.getChildCells(z,!0);for(var A=[],ha=0;ha<z.length;ha++)z[ha]!=c.cell&&t.isSwimlane(z[ha])&&t.getSwimlaneDirection(t.getCurrentCellStyle(z[ha]))==n&&A.push(z[ha]);t.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],A)}}));return m},label:wb(),ext:wb(),rectangle:wb(),triangle:wb(),rhombus:wb(),umlLifeline:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,
+"size",aa.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u)},function(m,u){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(m){var u=Math.max(U.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",U.prototype.width))),n=Math.max(1.5*U.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",U.prototype.height)));return new mxPoint(m.x+u,m.y+n)},function(m,
+u){this.state.style.width=Math.round(Math.max(U.prototype.corner,Math.min(m.width,u.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*U.prototype.corner,Math.min(m.height,u.y-m.y)))},!1)]},process:function(c){var m=[gb(c,["size"],function(u){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),t=parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size));return n?new mxPoint(u.x+t,u.y+u.height/4):new mxPoint(u.x+u.width*t,u.y+u.height/4)},function(u,n){u="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(.5*u.width,n.x-u.x)):Math.max(0,Math.min(.5,(n.x-u.x)/u.width));this.state.style.size=u},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},cross:function(c){return[gb(c,["size"],function(m){var u=Math.min(m.width,m.height);u=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Fa.prototype.size)))*u/2;return new mxPoint(m.getCenterX()-u,m.getCenterY()-u)},function(m,u){var n=Math.min(m.width,m.height);this.state.style.size=
+Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-u.y)/n*2,Math.max(0,m.getCenterX()-u.x)/n*2)))})]},note:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size)))));return new mxPoint(m.x+m.width-u,m.y+u)},function(m,u){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-u.x),Math.min(m.height,u.y-m.y))))})]},note2:function(c){return[gb(c,["size"],function(m){var u=
+Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",H.prototype.size)))));return new mxPoint(m.x+m.width-u,m.y+u)},function(m,u){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-u.x),Math.min(m.height,u.y-m.y))))})]},manualInput:function(c){var m=[gb(c,["size"],function(u){var n=Math.max(0,Math.min(u.height,mxUtils.getValue(this.state.style,"size",Oa.prototype.size)));return new mxPoint(u.x+u.width/4,u.y+3*n/4)},function(u,
+n){this.state.style.size=Math.round(Math.max(0,Math.min(u.height,4*(n.y-u.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},dataStorage:function(c){return[gb(c,["size"],function(m){var u="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",u?O.prototype.fixedSize:O.prototype.size));return new mxPoint(m.x+m.width-n*(u?1:m.width),m.getCenterY())},function(m,u){m="0"!=mxUtils.getValue(this.state.style,
+"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-u.x)):Math.max(0,Math.min(1,(m.x+m.width-u.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[gb(c,["size","position"],function(u){var n=Math.max(0,Math.min(u.height,mxUtils.getValue(this.state.style,"size",pa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position)));mxUtils.getValue(this.state.style,"base",pa.prototype.base);return new mxPoint(u.x+t*u.width,u.y+u.height-
+n)},function(u,n){mxUtils.getValue(this.state.style,"base",pa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(u.height,u.y+u.height-n.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(n.x-u.x)/u.width)))/100},!1),gb(c,["position2"],function(u){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",pa.prototype.position2)));return new mxPoint(u.x+n*u.width,u.y+u.height)},function(u,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(n.x-u.x)/u.width)))/100},!1),gb(c,["base"],function(u){var n=Math.max(0,Math.min(u.height,mxUtils.getValue(this.state.style,"size",pa.prototype.size))),t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position))),z=Math.max(0,Math.min(u.width,mxUtils.getValue(this.state.style,"base",pa.prototype.base)));return new mxPoint(u.x+Math.min(u.width,t*u.width+z),u.y+u.height-n)},function(u,n){var t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",pa.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(u.width,n.x-u.x-t*u.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},internalStorage:function(c){var m=[gb(c,["dx","dy"],function(u){var n=Math.max(0,Math.min(u.width,mxUtils.getValue(this.state.style,"dx",Na.prototype.dx))),t=Math.max(0,Math.min(u.height,mxUtils.getValue(this.state.style,"dy",Na.prototype.dy)));return new mxPoint(u.x+n,u.y+t)},function(u,n){this.state.style.dx=Math.round(Math.max(0,
+Math.min(u.width,n.x-u.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(u.height,n.y-u.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(lb(c));return m},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",za.prototype.jettyWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"jettyHeight",za.prototype.jettyHeight)));return new mxPoint(m.x+u/2,m.y+
+2*n)},function(m,u){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,u.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,u.y-m.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Ia.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",Ia.prototype.dy)));return new mxPoint(m.x+u,m.y+n)},function(m,u){this.state.style.dx=Math.round(Math.max(0,
+Math.min(m.width,u.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",ab.prototype.dx))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",ab.prototype.dy)));return new mxPoint(m.x+(m.width+u)/2,m.y+n)},function(m,u){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,u.x-m.x-m.width/2)));this.state.style.dy=
+Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},singleArrow:kb(1),doubleArrow:kb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(m){var u=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),n=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(u=m.width-u);return new mxPoint(m.x+u,m.y+n)},function(m,u){var n=Math.max(0,Math.min(m.width,u.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=m.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,u.y-m.y)))},!1)]},document:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",I.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},tape:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",C.prototype.size))));return new mxPoint(m.getCenterX(),m.y+u*m.height/2)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(u.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[gb(c,
+["isoAngle"],function(m){var u=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",K.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(u),.5*m.height))},function(m,u){this.state.style.isoAngle=Math.max(0,50*(u.y-m.y)/m.height)},!0)]},cylinder2:ib(Q.prototype.size),cylinder3:ib(e.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(m){var u=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-u)*m.height)},function(m,u){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-u.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(u){var n=Math.max(0,Math.min(u.width/2,u.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(u.x+n,u.y+n)},function(u,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(u.height/2,u.width/2,n.x-u.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(u){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(u.x+.75*u.width,u.y+n*u.height/200)},function(u,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-u.y)/u.height)))/100});m.push(c);return m},step:ob(ra.prototype.size,!0,null,!0,ra.prototype.fixedSize),hexagon:ob(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:ob(G.prototype.size,!1),display:ob(Ka.prototype.size,!1),cube:ub(1,
+l.prototype.size,!1),card:ub(.5,y.prototype.size,!0),loopLimit:ub(.5,ba.prototype.size,!0),trapezoid:nb(.5,N.prototype.size,N.prototype.fixedSize),parallelogram:nb(1,D.prototype.size,D.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=tb;var Cb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=Cb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=tb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=tb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,v,n,t){var z=c.view;n=null!=n&&0<n.length?n[0]:null;var A=c.absolutePoints,ia=A[0];A=A[A.length-1];null!=n&&(n=z.transformControlPoint(c,n));
-null==ia&&null!=m&&(ia=new mxPoint(m.getCenterX(),m.getCenterY()));null==A&&null!=v&&(A=new mxPoint(v.getCenterX(),v.getCenterY()));var J=xb.x,xa=xb.y,ma=zb.x,Va=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=A&&null!=ia){c=function(Da,Ja,Ha){Da-=bb.x;var Fa=Ja-bb.y;Ja=(Va*Da-ma*Fa)/(J*Va-xa*ma);Da=(xa*Da-J*Fa)/(xa*ma-J*Va);jb?(Ha&&(bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja),t.push(bb)),bb=new mxPoint(bb.x+ma*Da,bb.y+Va*Da)):(Ha&&(bb=new mxPoint(bb.x+ma*Da,bb.y+Va*Da),t.push(bb)),
-bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja));t.push(bb)};var bb=ia;null==n&&(n=new mxPoint(ia.x+(A.x-ia.x)/2,ia.y+(A.y-ia.y)/2));c(n.x,n.y,!0);c(A.x,A.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var v=new mxElbowEdgeHandler(c);v.snapToTerminals=!1;return v}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints=
-function(c,m,v){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(m,v/(.5+n));m=(m-n)/2;v=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,v+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,v+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,v+.75*n));return c};K.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(m*Math.tan(n),.5*v);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};pa.prototype.getConstraints=function(c,m,v){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=m*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+c=tb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var xb=new mxPoint(1,0),zb=new mxPoint(1,0),pb=mxUtils.toRadians(-30);xb=mxUtils.getRotatedPoint(xb,Math.cos(pb),Math.sin(pb));var yb=mxUtils.toRadians(-150);zb=mxUtils.getRotatedPoint(zb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,m,u,n,t){var z=c.view;n=null!=n&&0<n.length?n[0]:null;var A=c.absolutePoints,ha=A[0];A=A[A.length-1];null!=n&&(n=z.transformControlPoint(c,n));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==A&&null!=u&&(A=new mxPoint(u.getCenterX(),u.getCenterY()));var J=xb.x,xa=xb.y,ma=zb.x,Wa=zb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=A&&null!=ha){c=function(Da,Ja,Ha){Da-=bb.x;var Ga=Ja-bb.y;Ja=(Wa*Da-ma*Ga)/(J*Wa-xa*ma);Da=(xa*Da-J*Ga)/(xa*ma-J*Wa);jb?(Ha&&(bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja),t.push(bb)),bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da)):(Ha&&(bb=new mxPoint(bb.x+ma*Da,bb.y+Wa*Da),t.push(bb)),
+bb=new mxPoint(bb.x+J*Ja,bb.y+xa*Ja));t.push(bb)};var bb=ha;null==n&&(n=new mxPoint(ha.x+(A.x-ha.x)/2,ha.y+(A.y-ha.y)/2));c(n.x,n.y,!0);c(A.x,A.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ab=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var u=new mxElbowEdgeHandler(c);u.snapToTerminals=!1;return u}return Ab.apply(this,arguments)};p.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,u){c=[];var n=Math.tan(mxUtils.toRadians(30)),t=(.5-n)/2;n=Math.min(m,u/(.5+n));m=(m-n)/2;u=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,u+n*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,u+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+n,u+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*n,u+(1-t)*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,u+.75*n));return c};K.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(m*Math.tan(n),.5*u);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u-n));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};pa.prototype.getConstraints=function(c,m,u){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var t=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u-n)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(1,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(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Na.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};y.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-n)));return c};e.prototype.getConstraints=function(c,m,v){c=[];m=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,m+.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-m-.5*(.5*v-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};g.prototype.getConstraints=
-function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,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(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};y.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};l.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,Math.min(u,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-n)));return c};e.prototype.getConstraints=function(c,m,u){c=[];m=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-m-.5*(.5*u-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};g.prototype.getConstraints=
+function(c,m,u){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),t=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,t)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(v-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ma.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;
-ra.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,m,v){c=[];var n=Math.min(m,v/2),t=Math.min(m-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};za.prototype.getConstraints=function(c,m,v){m=parseFloat(mxUtils.getValue(c,
+0),!1,null,m,.25*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(u-t)+t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Na.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;
+qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxRectangleShape.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ka.prototype.getConstraints=function(c,m,u){c=[];var n=Math.min(m,u/2),t=Math.min(m-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+m-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(t+m-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));return c};za.prototype.getConstraints=function(c,m,u){m=parseFloat(mxUtils.getValue(c,
"jettyWidth",za.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",za.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(v-.5*c,3.5*c))];v>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));v>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,m));v>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return n};aa.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(u-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(u-.5*c,3.5*c))];u>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));u>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));u>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return n};ba.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
.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(.5,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];D.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ab.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;ab.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(m+n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ia.prototype.getConstraints=function(c,m,v){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,m,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(v+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,v));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+n),.5*(u+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),u));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),.5*(u+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*n,t));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*t));return c};Ia.prototype.getConstraints=function(c,m,u){c=[];var n=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),t=Math.max(0,Math.min(u,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*(u+t)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,u));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
1),!1));return c};wa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Ya.prototype.getConstraints=
-function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v-n));return c};x.prototype.getConstraints=function(c,m,v){c=[];var n=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(v-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,v-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));return c};Ga.prototype.getConstraints=
-function(c,m,v){c=[];var n=Math.min(v,m),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(v-t)/2;var z=n+t,A=(m-t)/2;t=A+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,v));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,v-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-t),u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,u-n));return c};x.prototype.getConstraints=function(c,m,u){c=[];var n=u*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",Ya.prototype.arrowWidth)))),t=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",Ya.prototype.arrowSize))));n=(u-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,u-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));return c};Fa.prototype.getConstraints=
+function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(u-t)/2;var z=n+t,A=(m-t)/2;t=A+t;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,t,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,u));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,u-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,t,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+t),n));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,m,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+t),z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*A,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*A,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,n));return c};ba.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+0),!1,null,0,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*A,z));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,A,n));return c};aa.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function d(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var H=p.getSelectionCells(),K=0;K<H.length;K++)p.cellLabelChanged(H[K],"")}finally{p.getModel().endUpdate()}}}function k(H,K,Q,e,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&e&&(Q/=e,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
@@ -2960,10 +2961,10 @@ window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){l.showDialog((new ExportDialog(l)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var H=new EditDiagramDialog(l);l.showDialog(H.container,620,420,!0,!1);H.init()});this.addAction("pageSetup...",function(){l.showDialog((new PageSetupDialog(l)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){l.showDialog((new PrintDialog(l)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(p,null,10,10)});this.addAction("undo",function(){l.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){l.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var H=null;try{H=l.copyXml(),null!=H&&p.removeCells(H,!1)}catch(K){}null==H&&mxClipboard.cut(p)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{l.copyXml()}catch(H){}try{mxClipboard.copy(p)}catch(H){l.handleError(H)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(K){if(null!=K){p.getModel().beginUpdate();try{l.pasteXml(K,!0)}finally{p.getModel().endUpdate()}}else mxClipboard.paste(p)}),H=!0)}catch(K){}H||mxClipboard.paste(p)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(H){function K(e){if(null!=e){for(var f=!0,g=0;g<
-e.length&&f;g++)f=f&&p.model.isEdge(e[g]);var u=p.view.translate;g=p.view.scale;var y=u.x,C=u.y;u=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(u=I.getTerminalPoint(!0))}u=null!=u?u:p.getBoundingBoxFromGeometry(e,f);null!=u&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-y)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-C)),p.cellsMoved(e,f-u.x,g-u.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
+e.length&&f;g++)f=f&&p.model.isEdge(e[g]);var v=p.view.translate;g=p.view.scale;var y=v.x,C=v.y;v=null;if(1==e.length&&f){var I=p.getCellGeometry(e[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(e,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-y)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-C)),p.cellsMoved(e,f-v.x,g-v.y))}}function Q(){p.getModel().beginUpdate();try{K(mxClipboard.paste(p))}finally{p.getModel().endUpdate()}}if(p.isEnabled()&&
!p.isCellLocked(p.getDefaultParent())){H=!1;try{Editor.enableNativeCipboard&&(l.readGraphModelFromClipboard(function(e){if(null!=e){p.getModel().beginUpdate();try{K(l.pasteXml(e,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(e){}H||Q()}});this.addAction("copySize",function(){var H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.getModel().isVertex(H)&&(H=p.getCellGeometry(H),null!=H&&(l.copiedSize=new mxRectangle(H.x,H.y,H.width,H.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedSize){p.getModel().beginUpdate();try{for(var H=p.getResizableCells(p.getSelectionCells()),K=0;K<H.length;K++)if(p.getModel().isVertex(H[K])){var Q=p.getCellGeometry(H[K]);null!=Q&&(Q=Q.clone(),Q.width=l.copiedSize.width,Q.height=l.copiedSize.height,p.getModel().setGeometry(H[K],Q))}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var H=p.getSelectionCell()||p.getModel().getRoot();p.isEnabled()&&
-null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,u){var y=e.getValue(g);u=g.cloneValue(u);u.removeAttribute("placeholders");null==y||isNaN(y.nodeType)||u.setAttribute("placeholders",y.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||u.setAttribute("label",p.convertValueToString(g));e.setValue(g,u)}H=null!=K?K:H;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
+null!=H&&(H=H.cloneValue(),null==H||isNaN(H.nodeType)||(l.copiedValue=H))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(H,K){function Q(g,v){var y=e.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==y||isNaN(y.nodeType)||v.setAttribute("placeholders",y.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));e.setValue(g,v)}H=null!=K?K:H;var e=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){e.beginUpdate();
try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(e.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{e.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?d():b(null!=H&&(mxEvent.isControlDown(H)||mxEvent.isMetaDown(H)||mxEvent.isAltDown(H)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){d()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{p.setSelectionCells(p.duplicateCells()),p.scrollCellToVisible(p.getSelectionCell())}catch(H){l.handleError(H)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var H=l.getSelectionState();if(null!=H.mergeCell){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",H.rowspan,[H.mergeCell]),p.setCellStyles("colspan",H.colspan,[H.mergeCell])}finally{p.getModel().endUpdate()}}}));this.put("unmergeCells",
new Action(mxResources.get("unmerge"),function(){var H=l.getSelectionState();if(0<H.cells.length){p.getModel().beginUpdate();try{p.setCellStyles("rowspan",null,H.cells),p.setCellStyles("colspan",null,H.cells)}finally{p.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(H,K){H=null!=K?K:H;p.turnShapes(p.getResizableCells(p.getSelectionCells()),null!=H?mxEvent.isShiftDown(H):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
@@ -2978,7 +2979,7 @@ e)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T")
null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&(p.clearSelection(),l.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&l.showLinkDialog("",mxResources.get("insert"),function(H,K,Q){H=mxUtils.trim(H);if(0<H.length){var e=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(e=K[0].iconUrl,
f=K[0].name||K[0].type,f=f.charAt(0).toUpperCase()+f.substring(1),30<f.length&&(f=f.substring(0,30)+"..."));K=new mxCell(f,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=e?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+e:"spacing=10;"));K.vertex=!0;e=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=e.x;K.geometry.y=e.y;p.setAttributeForCell(K,"linkTarget",Q);p.setLinkForCell(K,H);p.cellSizeUpdated(K,
!0);p.getModel().beginUpdate();try{K=p.addCell(K),p.fireEvent(new mxEventObject("cellsInserted","cells",[K]))}finally{p.getModel().endUpdate()}p.setSelectionCell(K);p.scrollCellToVisible(p.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(p.isEnabled())if(p.cellEditor.isContentEditing()){var H=p.getSelectedElement(),K=p.getParentByName(H,"A",p.cellEditor.textarea),Q="";if(null==K&&null!=H&&null!=H.getElementsByTagName)for(var e=H.getElementsByTagName("a"),
-f=0;f<e.length&&null==K;f++)e[f].textContent==H.textContent&&(K=e[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(u){p.cellEditor.restoreSelection(g);null!=u&&p.insertLink(u)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
+f=0;f<e.length&&null==K;f++)e[f].textContent==H.textContent&&(K=e[f]);null!=K&&"A"==K.nodeName&&(Q=K.getAttribute("href")||"",p.selectNode(K));var g=p.cellEditor.saveSelection();l.showLinkDialog(Q,mxResources.get("apply"),mxUtils.bind(this,function(v){p.cellEditor.restoreSelection(g);null!=v&&p.insertLink(v)}))}else p.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var H=p.getSelectionCells();if(null!=H){p.getModel().beginUpdate();
try{for(var K=0;K<H.length;K++){var Q=H[K];p.getModel().isVertex(Q)&&(0<p.getModel().getChildCount(Q)?p.updateGroupBounds([Q],0,!0):p.updateCellSize(Q))}}finally{p.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){p.snapCellsToGrid(p.getSelectionCells(),p.gridSize)});this.addAction("formattedText",function(){p.stopEditing();var H=p.getCommonStyle(p.getSelectionCells());H="1"==mxUtils.getValue(H,"html","0")?null:"1";p.getModel().beginUpdate();try{for(var K=
p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var e=mxUtils.getValue(state.style,"html","0");if("1"==e&&null==H){var f=p.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=p.sanitizeHtml(f);f=mxUtils.extractTextWithWhitespace(g.childNodes);p.cellLabelChanged(state.cell,f);p.setCellStyles("html",H,[K[Q]])}else"0"==
e&&"1"==H&&(f=mxUtils.htmlEntities(p.convertValueToString(state.cell),!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),p.cellLabelChanged(state.cell,p.sanitizeHtml(f)),p.setCellStyles("html",H,[K[Q]]))}l.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=H?H:"0"],"cells",K))}finally{p.getModel().endUpdate()}});this.addAction("wordWrap",function(){var H=p.getView().getState(p.getSelectionCell()),K="wrap";p.stopEditing();null!=H&&"wrap"==H.style[mxConstants.STYLE_WHITE_SPACE]&&
@@ -2995,7 +2996,7 @@ M.setToggleAction(!0);M.setSelectedCallback(function(){return p.foldingEnabled})
l.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionArrowsEnabled});M=this.addAction("connectionPoints",function(){p.setConnectable(!p.connectionHandler.isEnabled());l.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isEnabled()});M=this.addAction("copyConnect",function(){p.connectionHandler.setCreateTarget(!p.connectionHandler.isCreateTarget());
l.fireEvent(new mxEventObject("copyConnectChanged"))});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.connectionHandler.isCreateTarget()});M.isEnabled=E;M=this.addAction("autosave",function(){l.editor.setAutosave(!l.editor.autosave)});M.setToggleAction(!0);M.setSelectedCallback(function(){return l.editor.autosave});M.isEnabled=E;M.visible=!1;this.addAction("help",function(){var H="";mxResources.isLanguageSupported(mxClient.language)&&(H="_"+mxClient.language);p.openLink(RESOURCES_PATH+
"/help"+H+".html")});var S=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){S||(l.showDialog((new AboutDialog(l)).container,320,280,!0,!0,function(){S=!1}),S=!0)}));M=mxUtils.bind(this,function(H,K,Q,e){return this.addAction(H,function(){if(null!=Q&&p.cellEditor.isContentEditing())Q();else{p.stopEditing(!1);p.getModel().beginUpdate();try{var f=p.getEditableCells(p.getSelectionCells());p.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,K,f);(K&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?p.updateLabelElements(f,function(u){u.style.fontWeight=null;"B"==u.nodeName&&p.replaceElement(u)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(u){u.style.fontStyle=null;"I"==u.nodeName&&p.replaceElement(u)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(u){u.style.textDecoration=null;"U"==u.nodeName&&p.replaceElement(u)});for(var g=0;g<f.length;g++)0==p.model.getChildCount(f[g])&&p.autoSizeCell(f[g],
+mxConstants.FONT_BOLD?p.updateLabelElements(f,function(v){v.style.fontWeight=null;"B"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?p.updateLabelElements(f,function(v){v.style.fontStyle=null;"I"==v.nodeName&&p.replaceElement(v)}):(K&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&p.updateLabelElements(f,function(v){v.style.textDecoration=null;"U"==v.nodeName&&p.replaceElement(v)});for(var g=0;g<f.length;g++)0==p.model.getChildCount(f[g])&&p.autoSizeCell(f[g],
!1)}finally{p.getModel().endUpdate()}}},null,null,e)});M("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");M("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");M("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){l.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){l.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){l.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){l.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){l.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){l.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){l.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,null),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dashed",function(){p.getModel().beginUpdate();
@@ -3009,10 +3010,10 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function
p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/e-f));e=Math.round(p.snap(p.popupMenuHandler.triggerY/e-Q));K.addPointAt(K.state,f,e)}}});this.addAction("removeWaypoint",function(){var H=l.actions.get("removeWaypoint");null!=H.handler&&H.handler.removePoint(H.handler.state,H.index)});this.addAction("clearWaypoints",function(H,K){H=null!=K?K:H;var Q=p.getSelectionCells();if(null!=Q){Q=p.getEditableCells(p.addAllEdges(Q));p.getModel().beginUpdate();try{for(var e=
0;e<Q.length;e++){var f=Q[e];if(p.getModel().isEdge(f)){var g=p.getCellGeometry(f);null!=K&&mxEvent.isShiftDown(H)?(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[f]),p.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[f]),p.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[f])):null!=g&&(g=g.clone(),g.points=null,g.x=0,g.y=0,g.offset=null,p.getModel().setGeometry(f,g))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+C");M=this.addAction("subscript",
mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");M=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var H=mxResources.get("image")+" ("+mxResources.get("url")+"):",K=p.getView().getState(p.getSelectionCell()),
-Q="",e=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,e=K.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,u,y,C,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,u,y);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,u,y,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var ha=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ha.x;N[0].geometry.y=ha.y;null!=C&&k(N[0],C,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
-null,N);if(null!=u&&null!=y)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=u,ca.height=y,p.getModel().setGeometry(ja,ca))}null!=C&&k(ja,C,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
-!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],e=K[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,u){k(H,f,g,u,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
+Q="",e=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,e=K.style[mxConstants.STYLE_CLIP_PATH]||e);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,y,C,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,y);else{var N=p.getSelectionCells();if(null!=g&&(0<g.length||0<N.length)){var G=null;p.getModel().beginUpdate();try{if(0==N.length){N=[p.insertVertex(p.getDefaultParent(),null,"",0,0,v,y,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var ia=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=ia.x;N[0].geometry.y=ia.y;null!=C&&k(N[0],C,I,D,p);G=N;p.fireEvent(new mxEventObject("cellsInserted","cells",G))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<g.length?g:null,N);var ka=p.getCurrentCellStyle(N[0]);"image"!=ka[mxConstants.STYLE_SHAPE]&&"label"!=ka[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==g.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,N);if(null!=v&&null!=y)for(g=0;g<N.length;g++){var ja=N[g];if("0"!=p.getCurrentCellStyle(ja).expand){var ca=p.getModel().getGeometry(ja);null!=ca&&(ca=ca.clone(),ca.width=v,ca.height=y,p.getModel().setGeometry(ja,ca))}null!=C&&k(ja,C,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,e)}}).isEnabled=E;this.addAction("crop...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&
+!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=p.getCurrentCellStyle(H),Q=K[mxConstants.STYLE_IMAGE],e=K[mxConstants.STYLE_SHAPE];Q&&"image"==e&&(K=new CropImageDialog(l,Q,K[mxConstants.STYLE_CLIP_PATH],function(f,g,v){k(H,f,g,v,p)}),l.showDialog(K.container,300,390,!0,!0))}}).isEnabled=E;M=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(l,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",
mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));
M=this.addAction("format",mxUtils.bind(this,function(){l.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return l.isFormatPanelVisible()}));M=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(l,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){l.fireEvent(new mxEventObject("outline"))})),
this.outlineWindow.window.addListener("hide",function(){l.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),l.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");M.setToggleAction(!0);M.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var H=
@@ -3025,15 +3026,15 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,d,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():this.getLatestVersion(mxUtils.bind(this,function(B){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[B]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=d&&d():null!=B?this.mergeFile(B,b,d,l):this.reloadFile(b,
d))}catch(p){null!=d&&d(p)}}),d))};
DrawioFile.prototype.mergeFile=function(b,d,k,l){var B=!0;try{this.stats.fileMerged++;var p=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var M=[this.ui.diffPages(null!=l?l:p,E)],S=this.ignorePatches(M);this.setShadowPages(E);if(S)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",S);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(p,this.ui.pages):null;l={};S={};var H=this.ui.patchPages(p,M[0]),K=this.ui.getHashValueForPages(H,
-l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),u=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+u+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||M.push(y)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw B=!1,Error(mxResources.get("notADiagramFile"));
+l),Q=this.ui.getHashValueForPages(E,S);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",p,"pages",this.ui.pages,"patches",M,"backup",this.backupPatch,"checksum",K,"current",Q,"valid",K==Q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=K&&K!=Q){var e=this.compressReportData(this.getAnonymizedXmlForPages(E)),f=this.compressReportData(this.getAnonymizedXmlForPages(H)),g=this.ui.hashValue(b.getCurrentEtag()),v=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,M,"Shadow Details: "+JSON.stringify(l)+"\nChecksum: "+K+"\nCurrent: "+Q+"\nCurrent Details: "+JSON.stringify(S)+"\nFrom: "+g+"\nTo: "+v+"\n\nFile Data:\n"+e+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var y=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||M.push(y)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw B=!1,Error(mxResources.get("notADiagramFile"));
this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=d&&d()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(B)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var C=this.getCurrentUser(),I=null!=C?C.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var d=new mxCodec(mxUtils.createXmlDocument()),k=d.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var B=d.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(B=this.ui.anonymizeNode(B,!0));B.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,B,!0);k.appendChild(B)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,d,k){d=null!=d?d:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>d&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,d,k,l,B,p,E,M){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);var H=mxUtils.bind(this,function(u){var y=this.compressReportData(JSON.stringify(d,null,2));u=null==u?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(u.data)),
-25E3);this.sendErrorReport("Checksum Error in "+B+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=u?"\n\nRemote:\n"+u:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(u){null!=u&&u.getCurrentEtag()==l?H(u):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,g=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);
-g=JSON.stringify(d);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(u){try{var y=null!=g?"Report":"Error",C=this.ui.getHashValueForPages(u.getShadowPages());EditorUi.logError("Checksum "+y+" in "+B+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
-"-rev_"+this.ui.hashValue(M):"")+(null!=C?"-latest_"+C:"")+(null!=u?"-latestRev_"+this.ui.hashValue(u.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:B,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(u){}};
+DrawioFile.prototype.checksumError=function(b,d,k,l,B,p,E,M){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=d)for(var S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);var H=mxUtils.bind(this,function(v){var y=this.compressReportData(JSON.stringify(d,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
+25E3);this.sendErrorReport("Checksum Error in "+B+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+y+(null!=v?"\n\nRemote:\n"+v:""),null,7E4)});null==l?H(null):this.getLatestVersion(mxUtils.bind(this,function(v){null!=v&&v.getCurrentEtag()==l?H(v):H(null)}),function(){})}else{var K=this.getCurrentUser(),Q=null!=K?K.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(d).length,g=null;if(null!=d&&this.constructor==DriveFile&&400>f){for(S=0;S<d.length;S++)this.ui.anonymizePatch(d[S]);
+g=JSON.stringify(d);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var y=null!=g?"Report":"Error",C=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+y+" in "+B+" "+e,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
+"-rev_"+this.ui.hashValue(M):"")+(null!=C?"-latest_"+C:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:B,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+d.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
DrawioFile.prototype.sendErrorReport=function(b,d,k,l){try{var B=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),p=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),M=null!=E?this.ui.hashValue(E.id):"unknown",S=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),K=H.lastIndexOf(".");E="xml";0<K&&(E=H.substring(K));var Q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+M+S+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=d?"\n\n"+d:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+B+"\n\nData:\n"+p,l)}catch(e){}};
@@ -3100,7 +3101,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,d){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,d)};
LocalFile.prototype.saveFile=function(b,d,k,l,B){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;B||this.updateFileData();var p=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),M=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),S=mxUtils.bind(this,function(H){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var K=mxUtils.bind(this,
function(e){this.savingFile=!1;null!=l&&l({error:e})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(e){this.fileHandle.getFile().then(mxUtils.bind(this,function(f){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[f],"conflict",this.desc.lastModified!=f.lastModified);this.desc.lastModified==f.lastModified?e.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){e.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var u=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,u,M,K);this.removeDraft()}catch(y){K(y)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(g){try{var v=this.desc;this.savingFile=!1;this.desc=g;this.fileSaved(E,v,M,K);this.removeDraft()}catch(y){K(y)}}),K)}),K)}),K):(this.inConflictState=!0,K())}),mxUtils.bind(this,function(f){this.invalidFileHandle=!0;K(f)}))}),K)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(H,b,p?"image/png":"text/xml",p);else if(H.length<MAX_REQUEST_SIZE){var Q=b.lastIndexOf(".");Q=0<Q?b.substring(Q+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+Q+"&xml="+encodeURIComponent(H)+"&filename="+encodeURIComponent(b)+(p?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(H)}));M()}});p?(d=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,d.scale,d.border)):S(E)};
LocalFile.prototype.rename=function(b,d,k){this.title=b;this.descriptorChanged();null!=d&&d()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,
@@ -3151,9 +3152,9 @@ type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",t
dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",
dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(q,F){var T=mxUtils.getValue(q.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(q.vertices[0])||null==T||T==mxConstants.NONE||0==mxUtils.getValue(q.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(q.style,mxConstants.STYLE_OPACITY,100)||null!=q.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(q,F){return 0<q.vertices.length&&
F.editorUi.editor.graph.isContainer(q.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(T){var ba=T.sets||[];T=T.options||this.getDefaultOptions();for(var U=0;U<ba.length;U++){var da=ba[U];switch(da.type){case "path":null!=T.stroke&&this._drawToContext(q,da,T);break;case "fillPath":this._drawToContext(q,da,T);break;case "fillSketch":this.fillSketch(q,da,T)}}};F.fillSketch=function(T,ba,U){var da=q.state.strokeColor,fa=q.state.strokeWidth,na=q.state.strokeAlpha,sa=q.state.dashed,
-za=U.fillWeight;0>za&&(za=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(za);q.setDashed(!1);this._drawToContext(T,ba,U);q.setDashed(sa);q.setStrokeWidth(fa);q.setStrokeColor(da);q.setStrokeAlpha(na)};F._drawToContext=function(T,ba,U){T.begin();for(var da=0;da<ba.ops.length;da++){var fa=ba.ops[da],na=fa.data;switch(fa.op){case "move":T.moveTo(na[0],na[1]);break;case "bcurveTo":T.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":T.lineTo(na[0],
-na[1])}}T.end();"fillPath"===ba.type&&U.filled?T.fill():T.stroke()};return F};(function(){function q(da,fa,na){this.canvas=da;this.rc=fa;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
+Editor.createRoughCanvas=function(q){var F=rough.canvas({getContext:function(){return q}});F.draw=function(T){var aa=T.sets||[];T=T.options||this.getDefaultOptions();for(var U=0;U<aa.length;U++){var da=aa[U];switch(da.type){case "path":null!=T.stroke&&this._drawToContext(q,da,T);break;case "fillPath":this._drawToContext(q,da,T);break;case "fillSketch":this.fillSketch(q,da,T)}}};F.fillSketch=function(T,aa,U){var da=q.state.strokeColor,fa=q.state.strokeWidth,na=q.state.strokeAlpha,sa=q.state.dashed,
+za=U.fillWeight;0>za&&(za=U.strokeWidth/2);q.setStrokeAlpha(q.state.fillAlpha);q.setStrokeColor(U.fill||"");q.setStrokeWidth(za);q.setDashed(!1);this._drawToContext(T,aa,U);q.setDashed(sa);q.setStrokeWidth(fa);q.setStrokeColor(da);q.setStrokeAlpha(na)};F._drawToContext=function(T,aa,U){T.begin();for(var da=0;da<aa.ops.length;da++){var fa=aa.ops[da],na=fa.data;switch(fa.op){case "move":T.moveTo(na[0],na[1]);break;case "bcurveTo":T.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":T.lineTo(na[0],
+na[1])}}T.end();"fillPath"===aa.type&&U.filled?T.fill():T.stroke()};return F};(function(){function q(da,fa,na){this.canvas=da;this.rc=fa;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,q.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,q.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,q.prototype.rect);this.originalRoundrect=
this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,q.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,q.prototype.ellipse);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.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);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,q.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,q.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
mxUtils.bind(this,q.prototype.fillAndStroke);this.path=[];this.passThrough=!1}q.prototype.moveOp="M";q.prototype.lineOp="L";q.prototype.quadOp="Q";q.prototype.curveOp="C";q.prototype.closeOp="Z";q.prototype.getStyle=function(da,fa){var na=1;if(null!=this.shape.state){var sa=this.shape.state.cell.id;if(null!=sa)for(var za=0;za<sa.length;za++)na=(na<<5)-na+sa.charCodeAt(za)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};sa=this.rc.getDefaultOptions();na.stroke=da?this.canvas.state.strokeColor===
@@ -3168,15 +3169,15 @@ na/2,fa+sa/2,na,sa,this.getStyle(!0,!0)))};q.prototype.roundrect=function(da,fa,
!0;try{this.rc.path(this.path.join(" "),da)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var fa in da)this.nextShape.options[fa]=da[fa];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};q.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};q.prototype.fill=
function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};q.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};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;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(da){return new q(da,Editor.createRoughCanvas(da),this)};var F=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(da){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var T=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,fa,na,sa,za){null!=da.handJiggle&&da.handJiggle.passThrough||T.apply(this,arguments)};var ba=mxShape.prototype.paint;mxShape.prototype.paint=
-function(da){var fa=da.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==q&&!this.outline){da.save();var sa=this.fill,za=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,Ba=da.setStrokeColor;da.setStrokeColor=function(){};var oa=da.setFillColor;da.setFillColor=function(){};na||null==sa||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;ba.apply(this,
-arguments);da.handJiggle.passThrough=!1;da.setFillColor=oa;da.setStrokeColor=Ba;this.configurePointerEvents=ua;this.stroke=za;this.fill=sa;da.restore();na&&null!=sa&&(da.addTolerance=function(){})}ba.apply(this,arguments);da.addTolerance=fa};var U=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,fa,na,sa,za,ua){null!=da.handJiggle&&da.handJiggle.constructor==q?(da.handJiggle.passThrough=!0,U.apply(this,arguments),da.handJiggle.passThrough=!1):U.apply(this,arguments)}})();
-Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,T){if(null!=q&&"undefined"!==typeof pako){var ba=q.ownerDocument.getElementsByTagName("div"),U=[];if(null!=ba&&0<ba.length)for(var da=0;da<ba.length;da++)if("mxgraph"==ba[da].getAttribute("class")){U.push(ba[da]);
-break}0<U.length&&(ba=U[0].getAttribute("data-mxgraph"),null!=ba?(U=JSON.parse(ba),null!=U&&null!=U.xml&&(q=mxUtils.parseXml(U.xml),q=q.documentElement)):(U=U[0].getElementsByTagName("div"),0<U.length&&(ba=mxUtils.getTextContent(U[0]),ba=Graph.decompress(ba,null,T),0<ba.length&&(q=mxUtils.parseXml(ba),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(ba=q.getAttribute("content"),null!=ba&&"<"!=ba.charAt(0)&&"%"!=ba.charAt(0)&&(ba=unescape(window.atob?atob(ba):Base64.decode(cont,ba))),null!=
-ba&&"%"==ba.charAt(0)&&(ba=decodeURIComponent(ba)),null!=ba&&0<ba.length)q=mxUtils.parseXml(ba).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(U=null,"diagram"==q.nodeName?U=q:"mxfile"==q.nodeName&&(ba=q.getElementsByTagName("diagram"),0<ba.length&&(U=ba[Math.max(0,Math.min(ba.length-1,urlParams.page||0))])),null!=U&&(q=Editor.parseDiagramNode(U,T)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,
-F){var T=mxUtils.trim(mxUtils.getTextContent(q)),ba=null;0<T.length?(q=Graph.decompress(T,null,F),null!=q&&0<q.length&&(ba=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(ba=mxUtils.createXmlDocument(),ba.appendChild(ba.importNode(q[0],!0)),ba=ba.documentElement));return ba};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),T=null;0<F.length?T=Graph.decompress(F):null!=q.firstChild&&(T=mxUtils.getXml(q.firstChild));return T};Editor.extractGraphModelFromPdf=
-function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var T=q.indexOf("stream",F)+9;if(0<q.substring(F,T).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",T-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(T,F)),{to:"string"})}return null}T=null;F="";for(var ba=0,U=0,da=[],fa=null;U<q.length;){var na=q.charCodeAt(U);U+=1;10!=na&&(F+=String.fromCharCode(na));
-na=="/Subject (%3Cmxfile".charCodeAt(ba)?ba++:ba=0;if(19==ba){var sa=q.indexOf("%3C%2Fmxfile%3E)",U)+15;U-=9;if(sa>U){T=q.substring(U,sa);break}}10==na&&("endobj"==F?fa=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(fa=[],da[F.split(" ")[0]]=fa):null!=fa&&fa.push(F),F="")}null==T&&(T=Editor.extractGraphModelFromXref(da));null!=T&&(T=decodeURIComponent(T.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return T};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,T=null;
+mxShape.prototype.createHandJiggle=function(da){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var T=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,fa,na,sa,za){null!=da.handJiggle&&da.handJiggle.passThrough||T.apply(this,arguments)};var aa=mxShape.prototype.paint;mxShape.prototype.paint=
+function(da){var fa=da.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==q&&!this.outline){da.save();var sa=this.fill,za=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,Ba=da.setStrokeColor;da.setStrokeColor=function(){};var oa=da.setFillColor;da.setFillColor=function(){};na||null==sa||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;aa.apply(this,
+arguments);da.handJiggle.passThrough=!1;da.setFillColor=oa;da.setStrokeColor=Ba;this.configurePointerEvents=ua;this.stroke=za;this.fill=sa;da.restore();na&&null!=sa&&(da.addTolerance=function(){})}aa.apply(this,arguments);da.addTolerance=fa};var U=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,fa,na,sa,za,ua){null!=da.handJiggle&&da.handJiggle.constructor==q?(da.handJiggle.passThrough=!0,U.apply(this,arguments),da.handJiggle.passThrough=!1):U.apply(this,arguments)}})();
+Editor.fastCompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:Graph.arrayBufferToString(pako.deflateRaw(q))};Editor.fastDecompress=function(q){return null==q||0==q.length||"undefined"===typeof pako?q:pako.inflateRaw(Graph.stringToArrayBuffer(atob(q)),{to:"string"})};Editor.extractGraphModel=function(q,F,T){if(null!=q&&"undefined"!==typeof pako){var aa=q.ownerDocument.getElementsByTagName("div"),U=[];if(null!=aa&&0<aa.length)for(var da=0;da<aa.length;da++)if("mxgraph"==aa[da].getAttribute("class")){U.push(aa[da]);
+break}0<U.length&&(aa=U[0].getAttribute("data-mxgraph"),null!=aa?(U=JSON.parse(aa),null!=U&&null!=U.xml&&(q=mxUtils.parseXml(U.xml),q=q.documentElement)):(U=U[0].getElementsByTagName("div"),0<U.length&&(aa=mxUtils.getTextContent(U[0]),aa=Graph.decompress(aa,null,T),0<aa.length&&(q=mxUtils.parseXml(aa),q=q.documentElement))))}if(null!=q&&"svg"==q.nodeName)if(aa=q.getAttribute("content"),null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&(aa=unescape(window.atob?atob(aa):Base64.decode(cont,aa))),null!=
+aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa)),null!=aa&&0<aa.length)q=mxUtils.parseXml(aa).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==q||F||(U=null,"diagram"==q.nodeName?U=q:"mxfile"==q.nodeName&&(aa=q.getElementsByTagName("diagram"),0<aa.length&&(U=aa[Math.max(0,Math.min(aa.length-1,urlParams.page||0))])),null!=U&&(q=Editor.parseDiagramNode(U,T)));null==q||"mxGraphModel"==q.nodeName||F&&"mxfile"==q.nodeName||(q=null);return q};Editor.parseDiagramNode=function(q,
+F){var T=mxUtils.trim(mxUtils.getTextContent(q)),aa=null;0<T.length?(q=Graph.decompress(T,null,F),null!=q&&0<q.length&&(aa=mxUtils.parseXml(q).documentElement)):(q=mxUtils.getChildNodes(q),0<q.length&&(aa=mxUtils.createXmlDocument(),aa.appendChild(aa.importNode(q[0],!0)),aa=aa.documentElement));return aa};Editor.getDiagramNodeXml=function(q){var F=mxUtils.getTextContent(q),T=null;0<F.length?T=Graph.decompress(F):null!=q.firstChild&&(T=mxUtils.getXml(q.firstChild));return T};Editor.extractGraphModelFromPdf=
+function(q){q=q.substring(q.indexOf(",")+1);q=window.atob&&!mxClient.IS_SF?atob(q):Base64.decode(q,!0);if("%PDF-1.7"==q.substring(0,8)){var F=q.indexOf("EmbeddedFile");if(-1<F){var T=q.indexOf("stream",F)+9;if(0<q.substring(F,T).indexOf("application#2Fvnd.jgraph.mxfile"))return F=q.indexOf("endstream",T-1),pako.inflateRaw(Graph.stringToArrayBuffer(q.substring(T,F)),{to:"string"})}return null}T=null;F="";for(var aa=0,U=0,da=[],fa=null;U<q.length;){var na=q.charCodeAt(U);U+=1;10!=na&&(F+=String.fromCharCode(na));
+na=="/Subject (%3Cmxfile".charCodeAt(aa)?aa++:aa=0;if(19==aa){var sa=q.indexOf("%3C%2Fmxfile%3E)",U)+15;U-=9;if(sa>U){T=q.substring(U,sa);break}}10==na&&("endobj"==F?fa=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(fa=[],da[F.split(" ")[0]]=fa):null!=fa&&fa.push(F),F="")}null==T&&(T=Editor.extractGraphModelFromXref(da));null!=T&&(T=decodeURIComponent(T.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return T};Editor.extractGraphModelFromXref=function(q){var F=q.trailer,T=null;
null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(F=q[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(q=q[F[1]],null!=q&&(q=q.join("\n"),T=q.substring(1,q.length-1))))));return T};Editor.extractParserError=function(q,F){var T=null;q=null!=q?q.getElementsByTagName("parsererror"):null;null!=q&&0<q.length&&(T=F||mxResources.get("invalidChars"),F=q[0].getElementsByTagName("div"),0<F.length&&(T=mxUtils.getTextContent(F[0])));return null!=
T?mxUtils.trim(T):T};Editor.addRetryToError=function(q,F){null!=q&&(q=null!=q.error?q.error:q,null==q.retry&&(q.retry=F))};Editor.configure=function(q){if(null!=q){Editor.config=q;Editor.configVersion=q.version;Menus.prototype.defaultFonts=q.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=q.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=q.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=q.colorNames||
ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=q.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=q.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=q.autosaveDelay||DrawioFile.prototype.autosaveDelay;q.debug&&(urlParams.test="1");null!=q.templateFile&&(EditorUi.templateFile=q.templateFile);null!=q.styles&&(Array.isArray(q.styles)?Editor.styles=q.styles:EditorUi.debug("Configuration Error: Array expected for styles"));
@@ -3188,49 +3189,49 @@ null!=q.zoomWheel&&(Graph.zoomWheel=q.zoomWheel);null!=q.zoomFactor&&(F=parseFlo
new mxRectangle(0,0,F,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));q.thumbWidth&&(Sidebar.prototype.thumbWidth=q.thumbWidth);q.thumbHeight&&(Sidebar.prototype.thumbHeight=q.thumbHeight);q.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=q.emptyLibraryXml);q.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=q.emptyDiagramXml);q.sidebarWidth&&(EditorUi.prototype.hsplitPosition=q.sidebarWidth);
q.sidebarTitles&&(Sidebar.prototype.sidebarTitles=q.sidebarTitles);q.sidebarTitleSize&&(F=parseInt(q.sidebarTitleSize),!isNaN(F)&&0<F?Sidebar.prototype.sidebarTitleSize=F:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));q.fontCss&&("string"===typeof q.fontCss?Editor.configureFontCss(q.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=q.autosaveDelay&&(F=parseInt(q.autosaveDelay),!isNaN(F)&&0<F?DrawioFile.prototype.autosaveDelay=F:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
null!=q.maxImageBytes&&(EditorUi.prototype.maxImageBytes=q.maxImageBytes);null!=q.maxImageSize&&(EditorUi.prototype.maxImageSize=q.maxImageSize);null!=q.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=q.shareCursorPosition);null!=q.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=q.showRemoteCursors)}};Editor.configureFontCss=function(q){if(null!=q){Editor.prototype.fontCss=q;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var T=document.createElement("style");
-T.setAttribute("type","text/css");T.appendChild(document.createTextNode(q));F.parentNode.insertBefore(T,F);q=q.split("url(");for(T=1;T<q.length;T++){var ba=q[T].indexOf(")");ba=Editor.trimCssUrl(q[T].substring(0,ba));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",ba);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+T.setAttribute("type","text/css");T.appendChild(document.createTextNode(q));F.parentNode.insertBefore(T,F);q=q.split("url(");for(T=1;T<q.length;T++){var aa=q[T].indexOf(")");aa=Editor.trimCssUrl(q[T].substring(0,aa));var U=document.createElement("link");U.setAttribute("rel","preload");U.setAttribute("href",aa);U.setAttribute("as","font");U.setAttribute("crossorigin","");F.parentNode.insertBefore(U,F)}}}};Editor.trimCssUrl=function(q){return q.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
"g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(q){q=null!=q?q:Editor.GUID_LENGTH;for(var F=[],T=0;T<q;T++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(q){q=null!=q&&"mxlibrary"!=q.nodeName?this.extractGraphModel(q):null;if(null!=q){var F=Editor.extractParserError(q,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[q],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==q.nodeName){F=q.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=
-F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(ba=new mxCodec(T.ownerDocument),ba.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=T){var ba=new mxCodec(T.ownerDocument);ba.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
+F)F!=this.graph.currentStyle&&(T=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=T&&(aa=new mxCodec(T.ownerDocument),aa.decode(T,this.graph.getStylesheet())));else{var T=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=T){var aa=new mxCodec(T.ownerDocument);aa.decode(T,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||
"1"==q.getAttribute("math");F=q.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==q.getAttribute("shadow"),!1);if(F=q.getAttribute("extFonts"))try{for(F=F.split("|").map(function(U){U=U.split("^");return{name:U[0],url:U[1]}}),T=0;T<F.length;T++)this.graph.addExtFont(F[T].name,
F[T].url)}catch(U){console.log("ExtFonts format error: "+U.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var T=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",
-this.graph.currentStyle);var ba=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=ba&&T.setAttribute("backgroundImage",JSON.stringify(ba));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(ba=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",ba.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
-if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(ba){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
+this.graph.currentStyle);var aa=this.graph.getBackgroundImageObject(this.graph.backgroundImage,F);null!=aa&&T.setAttribute("backgroundImage",JSON.stringify(aa));T.setAttribute("math",this.graph.mathEnabled?"1":"0");T.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(aa=this.graph.extFonts.map(function(U){return U.name+"^"+U.url}),T.setAttribute("extFonts",aa.join("|")));return T};Editor.prototype.isDataSvg=function(q){try{var F=mxUtils.parseXml(q).documentElement.getAttribute("content");
+if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var T=mxUtils.parseXml(F).documentElement;return"mxfile"==T.nodeName||"mxGraphModel"==T.nodeName}}catch(aa){}return!1};Editor.prototype.extractGraphModel=function(q,F,T){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled=
"1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=
function(q,F){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){q=null!=q?q:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(U){try{MathJax.typesetClear([U]),MathJax.typeset([U]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([U]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([U]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=F?F:{options:{skipHtmlTags:{"[+]":["text"]}},
loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var U=0;U<Editor.mathJaxQueue.length;U++)Editor.doMathJaxRender(Editor.mathJaxQueue[U])}}};Editor.MathJaxRender=function(U){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(U):Editor.mathJaxQueue.push(U)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var T=Editor.prototype.init;
-Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var ba=document.createElement("script");ba.setAttribute("type","text/javascript");ba.setAttribute("src",q);F[0].parentNode.appendChild(ba)}}};
-Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],ba=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[ba]+=da),U=!U):","===da&&U?da=T[++ba]="":T[ba]+=da,F=da;return T}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
+Editor.prototype.init=function(){T.apply(this,arguments);var U=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,U);this.graph.addListener(mxEvent.REFRESH,U)};F=document.getElementsByTagName("script");if(null!=F&&0<F.length){var aa=document.createElement("script");aa.setAttribute("type","text/javascript");aa.setAttribute("src",q);F[0].parentNode.appendChild(aa)}}};
+Editor.prototype.csvToArray=function(q){if(0<q.length){var F="",T=[""],aa=0,U=!0,da;q=$jscomp.makeIterator(q);for(da=q.next();!da.done;da=q.next())da=da.value,'"'===da?(U&&da===F&&(T[aa]+=da),U=!U):","===da&&U?da=T[++aa]="":T[aa]+=da,F=da;return T}return[]};Editor.prototype.getProxiedUrl=function(q){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(q)){var F=/(\.v(dx|sdx?))($|\?)/i.test(q)||/(\.vs(x|sx?))($|\?)/i.test(q);
F=/\.png$/i.test(q)||/\.pdf$/i.test(q)||F;var T="t="+(new Date).getTime();q=PROXY_URL+"?url="+encodeURIComponent(q)+"&"+T+(F?"&base64=1":"")}return q};Editor.prototype.isCorsEnabledForUrl=function(q){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||q.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(q)||"https://raw.githubusercontent.com/"===
-q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,T=this;q.convert=function(ba){if(null!=ba){var U="http://"==ba.substring(0,7)||"https://"==ba.substring(0,8);U&&!navigator.onLine?ba=Editor.svgBrokenImage.src:!U||ba.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(ba)?"chrome-extension://"==
-ba.substring(0,19)||mxClient.IS_CHROMEAPP||(ba=F.apply(this,arguments)):ba=PROXY_URL+"?url="+encodeURIComponent(ba)}return ba};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,ba=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(ba);
-T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(ba);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(ba);if(T)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(ba);T&&F(Editor.svgBrokenImage.src)};U.src=
-q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,ba){null==ba&&(ba=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,function(za){try{if(null!=za){var ua=ba.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;
-0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,ba=q.length,U,da,fa;T<ba;){U=q.charCodeAt(T++)&255;if(T==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==ba){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
+q.substring(0,34)||"https://fonts.googleapis.com/"===q.substring(0,29)||"https://fonts.gstatic.com/"===q.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var q=new mxUrlConverter;q.updateBaseUrl();var F=q.convert,T=this;q.convert=function(aa){if(null!=aa){var U="http://"==aa.substring(0,7)||"https://"==aa.substring(0,8);U&&!navigator.onLine?aa=Editor.svgBrokenImage.src:!U||aa.substring(0,q.baseUrl.length)==q.baseUrl||T.crossOriginImages&&T.isCorsEnabledForUrl(aa)?"chrome-extension://"==
+aa.substring(0,19)||mxClient.IS_CHROMEAPP||(aa=F.apply(this,arguments)):aa=PROXY_URL+"?url="+encodeURIComponent(aa)}return aa};return q};Editor.createSvgDataUri=function(q){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(q)))};Editor.prototype.convertImageToDataUri=function(q,F){try{var T=!0,aa=window.setTimeout(mxUtils.bind(this,function(){T=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(q))mxUtils.get(q,mxUtils.bind(this,function(da){window.clearTimeout(aa);
+T&&F(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(aa);if(T)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=U.height;da.width=U.width;fa.drawImage(U,0,0);F(da.toDataURL())}catch(na){F(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(aa);T&&F(Editor.svgBrokenImage.src)};U.src=
+q}}catch(da){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(q,F,T,aa){null==aa&&(aa=this.createImageUrlConverter());var U=0,da=T||{};T=mxUtils.bind(this,function(fa,na){fa=q.getElementsByTagName(fa);for(var sa=0;sa<fa.length;sa++)mxUtils.bind(this,function(za){try{if(null!=za){var ua=aa.convert(za.getAttribute(na));if(null!=ua&&"data:"!=ua.substring(0,5)){var Ba=da[ua];null==Ba?(U++,this.convertImageToDataUri(ua,function(oa){null!=oa&&(da[ua]=oa,za.setAttribute(na,oa));U--;
+0==U&&F(q)})):za.setAttribute(na,Ba)}else null!=ua&&za.setAttribute(na,ua)}}catch(oa){}})(fa[sa])});T("image","xlink:href");T("img","src");0==U&&F(q)};Editor.base64Encode=function(q){for(var F="",T=0,aa=q.length,U,da,fa;T<aa;){U=q.charCodeAt(T++)&255;if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4);F+="==";break}da=q.charCodeAt(T++);if(T==aa){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>
2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);F+="=";break}fa=q.charCodeAt(T++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&3)<<4|(da&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>
-6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,ba,U,da,fa,na){try{var sa=!fa&&(ba||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&
+6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return F};Editor.prototype.loadUrl=function(q,F,T,aa,U,da,fa,na){try{var sa=!fa&&(aa||/(\.png)($|\?)/i.test(q)||/(\.jpe?g)($|\?)/i.test(q)||/(\.gif)($|\?)/i.test(q)||/(\.pdf)($|\?)/i.test(q));U=null!=U?U:!0;var za=mxUtils.bind(this,function(){mxUtils.get(q,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=F){var Ba=ua.getText();if(sa){if((9==document.documentMode||10==document.documentMode)&&
"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Ba=Array(ua.length);for(var oa=0;oa<ua.length;oa++)Ba[oa]=String.fromCharCode(ua[oa]);Ba=Ba.join("")}da=null!=da?da:"data:image/png;base64,";Ba=da+Editor.base64Encode(Ba)}F(Ba)}}else null!=T&&(0==ua.getStatus()?T({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?T({code:ua.getStatus()},ua):T({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=T&&
-T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;var ba=null!=q?q.lastIndexOf("/"):-1;0<=ba&&(q=q.substring(0,ba+1));ba=document.getElementsByTagName("base");var U=null;null!=ba&&0<ba.length&&(U=ba[0].getAttribute("href"));for(var da=1;da<
-T.length;da++)if(ba=T[da].indexOf(")"),0<ba){var fa=Editor.trimCssUrl(T[da].substring(0,ba));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(ba))}else F.push(T[da])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=
-function(q,F){var T=q.split("url("),ba=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==ba){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",
-na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;ba++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";
-else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;ba--;U()}),mxUtils.bind(this,function(oa){ba--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
-F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],ba=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==ba&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,
-na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(ba++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");ba--;U()}),mxUtils.bind(this,function(sa){ba--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
-T=0;T<F.length;T++){var ba=mxUtils.getTextContent(F[T]);0>ba.indexOf("mxPageSelector")&&0<ba.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),ba=q.ownerDocument;0==T.length?(T=null!=ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"defs"):ba.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=
-ba.createElementNS?ba.createElementNS(mxConstants.NS_SVG,"style"):ba.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,T){var ba=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(ba/q,ba/F))};Editor.prototype.exportToCanvas=function(q,F,T,ba,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Ma){try{da=null!=
-da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=ba);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Ma),mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){aa.drawImage(ab,0,0);q(O,wa)},0):(aa.drawImage(ab,
-0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);O.setAttribute("height",X);var aa=O.getContext("2d");null!=Ia&&(aa.beginPath(),aa.rect(0,0,P,X),aa.fillStyle=Ia,aa.fill());1!=na&&aa.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));
-W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var ra=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ca=W.translate.x*ea,Ea=W.translate.y*ea,Na=Ca+(va.x-Ca)/ea-oa,Wa=Ea+(va.y-Ea)/ea-oa,Ra=new Image;Ra.onload=function(){try{for(var Ga=-Math.round(ra-mxUtils.mod((Ca-Na)*na,ra)),Ka=-Math.round(ra-mxUtils.mod((Ea-Wa)*na,ra));Ga<P;Ga+=ra)for(var Pa=Ka;Pa<X;Pa+=ra)aa.drawImage(Ra,Ga/na,Pa/na);x()}catch($a){null!=U&&U($a)}};Ra.onerror=function(Ga){null!=U&&U(Ga)};Ra.src=ta}else x()}catch(Ga){null!=U&&
-U(Ga)}});ab.onerror=function(x){null!=U&&U(x)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(wa,x),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(x){null!=U&&U(x)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=
-[];for(var B=0;256>B;B++)for(var p=B,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[B]=p;Editor.updateCRC=function(q,F,T,ba){for(var U=0;U<ba;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,ba,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
-(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(ba/.0254),
-T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+ba;ba=4294967295;ba=Editor.updateCRC(ba,F,0,4);ba=Editor.updateCRC(ba,T,0,T.length);U+=na(T.length)+F+T+na(ba^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=
+T({message:mxResources.get("error")+" "+ua.getStatus()})},sa,this.timeout,function(){U&&null!=T&&T({code:App.ERROR_TIMEOUT,retry:za})},na)});za()}catch(ua){null!=T&&T(ua)}};Editor.prototype.absoluteCssFonts=function(q){var F=null;if(null!=q){var T=q.split("url(");if(0<T.length){F=[T[0]];q=window.location.pathname;var aa=null!=q?q.lastIndexOf("/"):-1;0<=aa&&(q=q.substring(0,aa+1));aa=document.getElementsByTagName("base");var U=null;null!=aa&&0<aa.length&&(U=aa[0].getAttribute("href"));for(var da=1;da<
+T.length;da++)if(aa=T[da].indexOf(")"),0<aa){var fa=Editor.trimCssUrl(T[da].substring(0,aa));this.graph.isRelativeUrl(fa)&&(fa=null!=U?U+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":q)+fa);F.push('url("'+fa+'"'+T[da].substring(aa))}else F.push(T[da])}else F=[q]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(q,F,T){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));T(q,F)};Editor.prototype.embedCssFonts=
+function(q,F){var T=q.split("url("),aa=0;null==this.cachedFonts&&(this.cachedFonts={});var U=mxUtils.bind(this,function(){if(0==aa){for(var sa=[T[0]],za=1;za<T.length;za++){var ua=T[za].indexOf(")");sa.push('url("');sa.push(this.cachedFonts[Editor.trimCssUrl(T[za].substring(0,ua))]);sa.push('"'+T[za].substring(ua))}F(sa.join(""))}});if(0<T.length){for(q=1;q<T.length;q++){var da=T[q].indexOf(")"),fa=null,na=T[q].indexOf("format(",da);0<na&&(fa=Editor.trimCssUrl(T[q].substring(na+7,T[q].indexOf(")",
+na))));mxUtils.bind(this,function(sa){if(null==this.cachedFonts[sa]){this.cachedFonts[sa]=sa;aa++;var za="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(sa))za="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(sa))za="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(sa))za="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(sa))za="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(sa))za="application/vnd.ms-fontobject";
+else if("sfnt"==fa||/(\.sfnt)($|\?)/i.test(sa))za="application/font-sfnt";this.mapFontUrl(za,sa,mxUtils.bind(this,function(ua,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(oa){this.cachedFonts[sa]=oa;aa--;U()}),mxUtils.bind(this,function(oa){aa--;U()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(T[q].substring(0,da)),fa)}U()}else F(q)};Editor.prototype.loadFonts=function(q){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=
+F;null!=q&&q()})):null!=q&&q()};Editor.prototype.createGoogleFontCache=function(){var q={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(q[F]=Graph.fontMapping[F]);return q};Editor.prototype.embedExtFonts=function(q){var F=this.graph.getCustomFonts();if(0<F.length){var T=[],aa=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var U=mxUtils.bind(this,function(){0==aa&&this.embedCssFonts(T.join(""),q)}),da=0;da<F.length;da++)mxUtils.bind(this,function(fa,
+na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(aa++,this.loadUrl(na,mxUtils.bind(this,function(sa){this.cachedGoogleFonts[na]=sa;T.push(sa+"\n");aa--;U()}),mxUtils.bind(this,function(sa){aa--;T.push("@import url("+na+");\n");U()}))):T.push(this.cachedGoogleFonts[na]+"\n"):T.push('@font-face {font-family: "'+fa+'";src: url("'+na+'")}\n')})(F[da].name,F[da].url);U()}else q()};Editor.prototype.addMathCss=function(q){q=q.getElementsByTagName("defs");if(null!=q&&0<q.length)for(var F=document.getElementsByTagName("style"),
+T=0;T<F.length;T++){var aa=mxUtils.getTextContent(F[T]);0>aa.indexOf("mxPageSelector")&&0<aa.indexOf("MathJax")&&q[0].appendChild(F[T].cloneNode(!0))}};Editor.prototype.addFontCss=function(q,F){F=null!=F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var T=q.getElementsByTagName("defs"),aa=q.ownerDocument;0==T.length?(T=null!=aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"defs"):aa.createElement("defs"),null!=q.firstChild?q.insertBefore(T,q.firstChild):q.appendChild(T)):T=T[0];q=null!=
+aa.createElementNS?aa.createElementNS(mxConstants.NS_SVG,"style"):aa.createElement("style");q.setAttribute("type","text/css");mxUtils.setTextContent(q,F);T.appendChild(q)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(q,F,T){var aa=mxClient.IS_FF?8192:16384;return Math.min(T,Math.min(aa/q,aa/F))};Editor.prototype.exportToCanvas=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa,ya,La,Oa,Na){try{da=null!=
+da?da:!0;fa=null!=fa?fa:!0;Ba=null!=Ba?Ba:this.graph;oa=null!=oa?oa:0;var Ia=sa?null:Ba.background;Ia==mxConstants.NONE&&(Ia=null);null==Ia&&(Ia=aa);null==Ia&&0==sa&&(Ia=La?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,oa,Aa,null,fa,null,null,null,za,null,La,Oa,Na),mxUtils.bind(this,function(wa){try{var ab=new Image;ab.onload=mxUtils.bind(this,function(){try{var x=function(){mxClient.IS_SF?window.setTimeout(function(){ba.drawImage(ab,0,0);q(O,wa)},0):(ba.drawImage(ab,
+0,0),q(O,wa))},O=document.createElement("canvas"),P=parseInt(wa.getAttribute("width")),X=parseInt(wa.getAttribute("height"));na=null!=na?na:1;null!=F&&(na=da?Math.min(1,Math.min(3*F/(4*X),F/P)):F/P);na=this.getMaxCanvasScale(P,X,na);P=Math.ceil(na*P);X=Math.ceil(na*X);O.setAttribute("width",P);O.setAttribute("height",X);var ba=O.getContext("2d");null!=Ia&&(ba.beginPath(),ba.rect(0,0,P,X),ba.fillStyle=Ia,ba.fill());1!=na&&ba.scale(na,na);if(ya){var W=Ba.view,ea=W.scale;W.scale=1;var ta=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));
+W.scale=ea;ta="data:image/svg+xml;base64,"+ta;var qa=Ba.gridSize*W.gridSteps*na,va=Ba.getGraphBounds(),Ea=W.translate.x*ea,Ca=W.translate.y*ea,Ma=Ea+(va.x-Ea)/ea-oa,Sa=Ca+(va.y-Ca)/ea-oa,Qa=new Image;Qa.onload=function(){try{for(var Fa=-Math.round(qa-mxUtils.mod((Ea-Ma)*na,qa)),Ka=-Math.round(qa-mxUtils.mod((Ca-Sa)*na,qa));Fa<P;Fa+=qa)for(var Pa=Ka;Pa<X;Pa+=qa)ba.drawImage(Qa,Fa/na,Pa/na);x()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else x()}catch(Fa){null!=U&&
+U(Fa)}});ab.onerror=function(x){null!=U&&U(x)};za&&this.graph.addSvgShadow(wa);this.graph.mathEnabled&&this.addMathCss(wa);var Ya=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(wa,this.resolvedFontCss),ab.src=Editor.createSvgDataUri(mxUtils.getXml(wa))}catch(x){null!=U&&U(x)}});this.embedExtFonts(mxUtils.bind(this,function(x){try{null!=x&&this.addFontCss(wa,x),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(x){null!=U&&U(x)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=
+[];for(var B=0;256>B;B++)for(var p=B,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[B]=p;Editor.updateCRC=function(q,F,T,aa){for(var U=0;U<aa;U++)q=Editor.crcTable[(q^F.charCodeAt(T+U))&255]^q>>>8;return q};Editor.crc32=function(q){for(var F=-1,T=0;T<q.length;T++)F=F>>>8^Editor.crcTable[(F^q.charCodeAt(T))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(q,F,T,aa,U){function da(ua,Ba){var oa=sa;sa+=Ba;return ua.substring(oa,sa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function na(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}q=q.substring(q.indexOf(",")+1);q=window.atob?atob(q):Base64.decode(q,!0);var sa=0;if(da(q,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=U&&U();else if(da(q,4),"IHDR"!=da(q,4))null!=U&&U();else{da(q,17);U=q.substring(0,sa);do{var za=fa(q);if("IDAT"==da(q,4)){U=q.substring(0,sa-8);"pHYs"==F&&"dpi"==T?(T=Math.round(aa/.0254),
+T=na(T)+na(T)+String.fromCharCode(1)):T=T+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+aa;aa=4294967295;aa=Editor.updateCRC(aa,F,0,4);aa=Editor.updateCRC(aa,T,0,T.length);U+=na(T.length)+F+T+na(aa^4294967295);U+=q.substring(sa-8,q.length);break}U+=q.substring(sa-8,sa-4+za);da(q,za);da(q,4)}while(za);return"data:image/png;base64,"+(window.btoa?btoa(U):Base64.encode(U,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var M=
ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(q,F){M.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(q,F){var T=null;null!=q.editor.graph.getModel().getParent(F)?T=F.getId():null!=q.currentPage&&(T=
q.currentPage.getId());return T});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var K=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?K.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var q=this.editorUi.getCurrentFile();
-return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,T=F.editor.graph,ba=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;
-da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(ba.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(ba,60));q.appendChild(ba)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
-var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var ba=F.getCurrentFile();if(null!=ba&&ba.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&ba.isModified()&&ba.fileChanged()},{install:function(fa){this.listener=function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
+return"1"==urlParams.embed||null!=q&&q.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(q){return!1};var Q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(q){q=Q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,T=F.editor.graph,aa=this.createOption(mxResources.get("shadow"),function(){return T.shadowVisible},function(U){var da=new ChangePageSetup(F);da.ignoreColor=!0;
+da.ignoreImage=!0;da.shadowVisible=U;T.model.execute(da)},{install:function(U){this.listener=function(){U(T.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||(aa.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(aa,60));q.appendChild(aa)}return q};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=e.apply(this,arguments);
+var F=this.editorUi,T=F.editor.graph;if(T.isEnabled()){var aa=F.getCurrentFile();if(null!=aa&&aa.isAutosaveOptional()){var U=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(fa){F.editor.setAutosave(fa);F.editor.autosave&&aa.isModified()&&aa.fileChanged()},{install:function(fa){this.listener=function(){fa(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});q.appendChild(U)}}if(this.isMathOptionVisible()&&
T.isEnabled()&&"undefined"!==typeof MathJax){U=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return T.mathEnabled},function(fa){F.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(T.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});U.style.paddingTop="5px";q.appendChild(U);var da=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position=
"relative";da.style.marginLeft="6px";da.style.top="2px";U.appendChild(da)}return q};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
@@ -3254,91 +3255,91 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,T){if(null!=F){var ba=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||
-delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),ba(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{ba(JSON.parse(q))}catch(da){}}};var f=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},T=q.vertices,ba=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<ba.length;U++)this.findCommonProperties(ba[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&
-0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function ba(aa,W,ea,ta){Ba.getModel().beginUpdate();try{var ra=[],va=[];if(null!=ea.index){for(var Ca=[],Ea=ea.parentRow.nextSibling;Ea&&
-Ea.getAttribute("data-pName")==aa;)Ca.push(Ea.getAttribute("data-pValue")),Ea=Ea.nextSibling;ea.index<Ca.length?null!=ta?Ca.splice(ta,1):Ca[ea.index]=W:Ca.push(W);null!=ea.size&&Ca.length>ea.size&&(Ca=Ca.slice(0,ea.size));W=Ca.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ca.length,Ba.getSelectionCells()),ra.push(ea.countProperty),va.push(Ca.length))}Ba.setCellStyles(aa,W,Ba.getSelectionCells());ra.push(aa);va.push(W);if(null!=ea.dependentProps)for(aa=0;aa<ea.dependentProps.length;aa++){var Na=
-ea.dependentPropsDefVal[aa],Wa=ea.dependentPropsVals[aa];if(Wa.length>W)Wa=Wa.slice(0,W);else for(var Ra=Wa.length;Ra<W;Ra++)Wa.push(Na);Wa=Wa.join(",");Ba.setCellStyles(ea.dependentProps[aa],Wa,Ba.getSelectionCells());ra.push(ea.dependentProps[aa]);va.push(Wa)}if("function"==typeof ea.onChange)ea.onChange(Ba,W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(aa,W,ea){var ta=mxUtils.getOffset(q,
-!0),ra=mxUtils.getOffset(aa,!0);W.style.position="absolute";W.style.left=ra.x-ta.x+"px";W.style.top=ra.y-ta.y+"px";W.style.width=aa.offsetWidth+"px";W.style.height=aa.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(aa,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height="4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(ra){this.editorUi.pickColor(W,
-function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;ba(aa,va,ea)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(aa,W,ea,ta,ra,va,Ca){null!=W&&(W=W.split(","),oa.push({name:aa,values:W,type:ea,defVal:ta,countProperty:ra,parentRow:va,isDeletable:!0,flipBkg:Ca}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ea){for(var Na=va,Wa=0;null!=Na.nextSibling;)if(Na.nextSibling.getAttribute("data-pName")==
-aa)Na=Na.nextSibling,Wa++;else break;var Ra={type:ea,parentRow:va,index:Wa,isDeletable:!0,defVal:ta,countProperty:ra};Wa=za(aa,"",Ra,0==Wa%2,Ca);ba(aa,ta,Ra);Na.parentNode.insertBefore(Wa,Na.nextSibling);mxEvent.consume(Ea)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(aa,W,ea,ta,ra,va,Ca){if(0<ra){var Ea=Array(ra);W=null!=W?W.split(","):[];for(var Na=0;Na<ra;Na++)Ea[Na]=null!=W[Na]?W[Na]:null!=ta?ta:"";oa.push({name:aa,values:Ea,type:ea,defVal:ta,
-parentRow:va,flipBkg:Ca,size:ra})}return document.createElement("div")}function sa(aa,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){ba(aa,ta.checked?"1":"0",ea)});return ta}function za(aa,W,ea,ta,ra){var va=ea.dispName,Ca=ea.type,Ea=document.createElement("tr");Ea.className="gePropRow"+(ra?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ea.setAttribute("data-pName",aa);Ea.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&
-(Ea.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Na=document.createElement("td");Na.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Na,va);Na.setAttribute("title",va);ta&&(Na.style.textAlign="right");Ea.appendChild(Na);Na=document.createElement("td");Na.className="gePropRowCell";if("color"==Ca)Na.appendChild(da(aa,W,ea));else if("bool"==Ca||"boolean"==Ca)Na.appendChild(sa(aa,W,ea));else if("enum"==Ca){var Wa=ea.enumList;for(ra=0;ra<Wa.length;ra++)if(va=
-Wa[ra],va.val==W){mxUtils.write(Na,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Na,"click",mxUtils.bind(ua,function(){var Ra=document.createElement("select");U(Na,Ra);for(var Ga=0;Ga<Wa.length;Ga++){var Ka=Wa[Ga],Pa=document.createElement("option");Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Ra.appendChild(Pa)}Ra.value=W;q.appendChild(Ra);mxEvent.addListener(Ra,"change",function(){var $a=mxUtils.htmlEntities(Ra.value);
-ba(aa,$a,ea)});Ra.focus();mxEvent.addListener(Ra,"blur",function(){q.removeChild(Ra)})}))}else"dynamicArr"==Ca?Na.appendChild(fa(aa,W,ea.subType,ea.subDefVal,ea.countProperty,Ea,ra)):"staticArr"==Ca?Na.appendChild(na(aa,W,ea.subType,ea.subDefVal,ea.size,Ea,ra)):"readOnly"==Ca?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=W,ra.style.width="96px",ra.style.borderWidth="0px",Na.appendChild(ra)):(Na.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Na,
-"click",mxUtils.bind(ua,function(){function Ra(){var Ka=Ga.value;Ka=0==Ka.length&&"string"!=Ca?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ca="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ca?parseInt(Ka):Ka)+"");ba(aa,Ka,ea)}var Ga=document.createElement("input");U(Na,Ga,!0);Ga.value=decodeURIComponent(W);Ga.className="gePropEditor";"int"!=Ca&&"float"!=Ca||ea.allowAuto||
-(Ga.type="number",Ga.step="int"==Ca?"1":"any",null!=ea.min&&(Ga.min=parseFloat(ea.min)),null!=ea.max&&(Ga.max=parseFloat(ea.max)));q.appendChild(Ga);mxEvent.addListener(Ga,"keypress",function(Ka){13==Ka.keyCode&&Ra()});Ga.focus();mxEvent.addListener(Ga,"blur",function(){Ra()})})));ea.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(ua,function(Ra){ba(aa,"",ea,ea.index);mxEvent.consume(Ra)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Na.appendChild(ra));
-Ea.appendChild(Na);return Ea}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);
-mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Ma=function(){var aa=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=q.childNodes[ea],ra=ta.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<aa.length;ea++)aa[ea].style.display=W};mxEvent.addListener(ya,
-"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Ma()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(q,F,T){if(null!=F){var aa=function(da){if(null!=da)if(T)for(var fa=0;fa<da.length;fa++)F[da[fa].name]=da[fa];else for(var na in F){var sa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==na&&da[fa].type==F[na].type){sa=!0;break}sa||
+delete F[na]}},U=this.editorUi.editor.graph.view.getState(q);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),aa(U.shape.customProperties));q=q.getAttribute("customProperties");if(null!=q)try{aa(JSON.parse(q))}catch(da){}}};var f=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var q=this.editorUi.getSelectionState();"image"!=q.style.shape&&!q.containsLabel&&0<q.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));f.apply(this,arguments);if(Editor.enableCustomProperties){for(var F={},T=q.vertices,aa=q.edges,U=0;U<T.length;U++)this.findCommonProperties(T[U],F,0==U);for(U=0;U<aa.length;U++)this.findCommonProperties(aa[U],F,0==T.length&&0==U);null!=Object.getOwnPropertyNames&&
+0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,q))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(q){this.addActions(q,["copyStyle","pasteStyle"]);return g.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(q,F,T){function aa(ba,W,ea,ta){Ba.getModel().beginUpdate();try{var qa=[],va=[];if(null!=ea.index){for(var Ea=[],Ca=ea.parentRow.nextSibling;Ca&&
+Ca.getAttribute("data-pName")==ba;)Ea.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ea.index<Ea.length?null!=ta?Ea.splice(ta,1):Ea[ea.index]=W:Ea.push(W);null!=ea.size&&Ea.length>ea.size&&(Ea=Ea.slice(0,ea.size));W=Ea.join(",");null!=ea.countProperty&&(Ba.setCellStyles(ea.countProperty,Ea.length,Ba.getSelectionCells()),qa.push(ea.countProperty),va.push(Ea.length))}Ba.setCellStyles(ba,W,Ba.getSelectionCells());qa.push(ba);va.push(W);if(null!=ea.dependentProps)for(ba=0;ba<ea.dependentProps.length;ba++){var Ma=
+ea.dependentPropsDefVal[ba],Sa=ea.dependentPropsVals[ba];if(Sa.length>W)Sa=Sa.slice(0,W);else for(var Qa=Sa.length;Qa<W;Qa++)Sa.push(Ma);Sa=Sa.join(",");Ba.setCellStyles(ea.dependentProps[ba],Sa,Ba.getSelectionCells());qa.push(ea.dependentProps[ba]);va.push(Sa)}if("function"==typeof ea.onChange)ea.onChange(Ba,W);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",qa,"values",va,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function U(ba,W,ea){var ta=mxUtils.getOffset(q,
+!0),qa=mxUtils.getOffset(ba,!0);W.style.position="absolute";W.style.left=qa.x-ta.x+"px";W.style.top=qa.y-ta.y+"px";W.style.width=ba.offsetWidth+"px";W.style.height=ba.offsetHeight-(ea?4:0)+"px";W.style.zIndex=5}function da(ba,W,ea){var ta=document.createElement("div");ta.style.width="32px";ta.style.height="4px";ta.style.margin="2px";ta.style.border="1px solid black";ta.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(qa){this.editorUi.pickColor(W,
+function(va){ta.style.background="none"==va?"url('"+Dialog.prototype.noColorImage+"')":va;aa(ba,va,ea)});mxEvent.consume(qa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ta);return btn}function fa(ba,W,ea,ta,qa,va,Ea){null!=W&&(W=W.split(","),oa.push({name:ba,values:W,type:ea,defVal:ta,countProperty:qa,parentRow:va,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Ca){for(var Ma=va,Sa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
+ba)Ma=Ma.nextSibling,Sa++;else break;var Qa={type:ea,parentRow:va,index:Sa,isDeletable:!0,defVal:ta,countProperty:qa};Sa=za(ba,"",Qa,0==Sa%2,Ea);aa(ba,ta,Qa);Ma.parentNode.insertBefore(Sa,Ma.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(ba,W,ea,ta,qa,va,Ea){if(0<qa){var Ca=Array(qa);W=null!=W?W.split(","):[];for(var Ma=0;Ma<qa;Ma++)Ca[Ma]=null!=W[Ma]?W[Ma]:null!=ta?ta:"";oa.push({name:ba,values:Ca,type:ea,defVal:ta,
+parentRow:va,flipBkg:Ea,size:qa})}return document.createElement("div")}function sa(ba,W,ea){var ta=document.createElement("input");ta.type="checkbox";ta.checked="1"==W;mxEvent.addListener(ta,"change",function(){aa(ba,ta.checked?"1":"0",ea)});return ta}function za(ba,W,ea,ta,qa){var va=ea.dispName,Ea=ea.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(qa?"Dark":"")+(ta?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ba);Ca.setAttribute("data-pValue",W);ta=!1;null!=ea.index&&
+(Ca.setAttribute("data-index",ea.index),va=(null!=va?va:"")+"["+ea.index+"]",ta=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";va=mxResources.get(va,null,va);mxUtils.write(Ma,va);Ma.setAttribute("title",va);ta&&(Ma.style.textAlign="right");Ca.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Ea)Ma.appendChild(da(ba,W,ea));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(sa(ba,W,ea));else if("enum"==Ea){var Sa=ea.enumList;for(qa=0;qa<Sa.length;qa++)if(va=
+Sa[qa],va.val==W){mxUtils.write(Ma,mxResources.get(va.dispName,null,va.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Qa=document.createElement("select");U(Ma,Qa);for(var Fa=0;Fa<Sa.length;Fa++){var Ka=Sa[Fa],Pa=document.createElement("option");Pa.value=mxUtils.htmlEntities(Ka.val);mxUtils.write(Pa,mxResources.get(Ka.dispName,null,Ka.dispName));Qa.appendChild(Pa)}Qa.value=W;q.appendChild(Qa);mxEvent.addListener(Qa,"change",function(){var $a=mxUtils.htmlEntities(Qa.value);
+aa(ba,$a,ea)});Qa.focus();mxEvent.addListener(Qa,"blur",function(){q.removeChild(Qa)})}))}else"dynamicArr"==Ea?Ma.appendChild(fa(ba,W,ea.subType,ea.subDefVal,ea.countProperty,Ca,qa)):"staticArr"==Ea?Ma.appendChild(na(ba,W,ea.subType,ea.subDefVal,ea.size,Ca,qa)):"readOnly"==Ea?(qa=document.createElement("input"),qa.setAttribute("readonly",""),qa.value=W,qa.style.width="96px",qa.style.borderWidth="0px",Ma.appendChild(qa)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,
+"click",mxUtils.bind(ua,function(){function Qa(){var Ka=Fa.value;Ka=0==Ka.length&&"string"!=Ea?0:Ka;ea.allowAuto&&(null!=Ka.trim&&"auto"==Ka.trim().toLowerCase()?(Ka="auto",Ea="string"):(Ka=parseFloat(Ka),Ka=isNaN(Ka)?0:Ka));null!=ea.min&&Ka<ea.min?Ka=ea.min:null!=ea.max&&Ka>ea.max&&(Ka=ea.max);Ka=encodeURIComponent(("int"==Ea?parseInt(Ka):Ka)+"");aa(ba,Ka,ea)}var Fa=document.createElement("input");U(Ma,Fa,!0);Fa.value=decodeURIComponent(W);Fa.className="gePropEditor";"int"!=Ea&&"float"!=Ea||ea.allowAuto||
+(Fa.type="number",Fa.step="int"==Ea?"1":"any",null!=ea.min&&(Fa.min=parseFloat(ea.min)),null!=ea.max&&(Fa.max=parseFloat(ea.max)));q.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ka){13==Ka.keyCode&&Qa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Qa()})})));ea.isDeletable&&(qa=mxUtils.button("-",mxUtils.bind(ua,function(Qa){aa(ba,"",ea,ea.index);mxEvent.consume(Qa)})),qa.style.height="16px",qa.style.width="25px",qa.style.float="right",qa.className="geColorBtn",Ma.appendChild(qa));
+Ca.appendChild(Ma);return Ca}var ua=this,Ba=this.editorUi.editor.graph,oa=[];q.style.position="relative";q.style.padding="0";var Aa=document.createElement("table");Aa.className="geProperties";Aa.style.whiteSpace="nowrap";Aa.style.width="100%";var ya=document.createElement("tr");ya.className="gePropHeader";var La=document.createElement("th");La.className="gePropHeaderCell";var Oa=document.createElement("img");Oa.src=Sidebar.prototype.expandedImage;Oa.style.verticalAlign="middle";La.appendChild(Oa);
+mxUtils.write(La,mxResources.get("property"));ya.style.cursor="pointer";var Na=function(){var ba=Aa.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Oa.src=Sidebar.prototype.collapsedImage;var W="none";for(var ea=q.childNodes.length-1;0<=ea;ea--)try{var ta=q.childNodes[ea],qa=ta.nodeName.toUpperCase();"INPUT"!=qa&&"SELECT"!=qa||q.removeChild(ta)}catch(va){}}else Oa.src=Sidebar.prototype.expandedImage,W="";for(ea=0;ea<ba.length;ea++)ba[ea].style.display=W};mxEvent.addListener(ya,
+"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Na()});ya.appendChild(La);La=document.createElement("th");La.className="gePropHeaderCell";La.innerHTML=mxResources.get("value");ya.appendChild(La);Aa.appendChild(ya);var Ia=!1,wa=!1;ya=null;1==T.vertices.length&&0==T.edges.length?ya=T.vertices[0].id:0==T.vertices.length&&1==T.edges.length&&(ya=T.edges[0].id);null!=ya&&Aa.appendChild(za("id",mxUtils.htmlEntities(ya),{dispName:"ID",type:"readOnly"},!0,!1));for(var ab in F)if(ya=
F[ab],"function"!=typeof ya.isVisible||ya.isVisible(T,this)){var Ya=null!=T.style[ab]?mxUtils.htmlEntities(T.style[ab]+""):null!=ya.getDefaultValue?ya.getDefaultValue(T,this):ya.defVal;if("separator"==ya.type)wa=!wa;else{if("staticArr"==ya.type)ya.size=parseInt(T.style[ya.sizeProperty]||F[ya.sizeProperty].defVal)||0;else if(null!=ya.dependentProps){var x=ya.dependentProps,O=[],P=[];for(La=0;La<x.length;La++){var X=T.style[x[La]];P.push(F[x[La]].subDefVal);O.push(null!=X?X.split(","):[])}ya.dependentPropsDefVal=
-P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Ma();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,
-"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,ba=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
+P;ya.dependentPropsVals=O}Aa.appendChild(za(ab,Ya,ya,Ia,wa));Ia=!Ia}}for(La=0;La<oa.length;La++)for(ya=oa[La],F=ya.parentRow,T=0;T<ya.values.length;T++)ab=za(ya.name,ya.values[T],{type:ya.type,parentRow:ya.parentRow,isDeletable:ya.isDeletable,index:T,defVal:ya.defVal,countProperty:ya.countProperty,size:ya.size},0==T%2,ya.flipBkg),F.parentNode.insertBefore(ab,F.nextSibling),F=ab;q.appendChild(Aa);Na();return q};StyleFormatPanel.prototype.addStyles=function(q){function F(ya){mxEvent.addListener(ya,
+"mouseenter",function(){ya.style.opacity="1"});mxEvent.addListener(ya,"mouseleave",function(){ya.style.opacity="0.5"})}var T=this.editorUi,aa=T.editor.graph,U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.paddingLeft="24px";U.style.paddingRight="20px";q.style.paddingLeft="16px";q.style.paddingBottom="6px";q.style.position="relative";q.appendChild(U);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var na=[],sa=0;sa<this.defaultColorSchemes.length;sa++){var za=document.createElement("div");za.style.display="inline-block";za.style.width="6px";za.style.height="6px";za.style.marginLeft="4px";za.style.marginRight="3px";za.style.borderRadius="3px";za.style.cursor="pointer";za.style.background="transparent";za.style.border="1px solid #b5b6b7";mxUtils.bind(this,
function(ya){mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(ya)}))})(sa);na.push(za);fa.appendChild(za)}var ua=mxUtils.bind(this,function(ya){null!=na[ya]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ya,Ba(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(ya){var La=mxUtils.bind(this,
-function(Ma){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){ba.getModel().beginUpdate();try{for(var x=T.getSelectionState().cells,O=0;O<x.length;O++){for(var P=ba.getModel().getStyle(x[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var aa=ba.getModel().isVertex(x[O])?ba.defaultVertexStyle:ba.defaultEdgeStyle;null!=Ma?(mxEvent.isShiftDown(Ya)||(P=""==Ma.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Ma.fill||mxUtils.getValue(aa,
-mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Ma.gradient||mxUtils.getValue(aa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!ba.getModel().isVertex(x[O])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Ma.font||mxUtils.getValue(aa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Ma.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
-Ma.stroke||mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(aa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(aa,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(aa,mxConstants.STYLE_GRADIENTCOLOR,null)),ba.getModel().isVertex(x[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(aa,
-mxConstants.STYLE_FONTCOLOR,null))));ba.getModel().setStyle(x[O],P)}}finally{ba.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Ma){var wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ma.border&&(wa=Ma.border);null!=Ma.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ma.fill+"', EndColorStr='"+
-Ma.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Ma.fill+" 0px,"+Ma.gradient+" 100%)":Ma.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Ma.fill?mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ma.fill||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Ma.stroke==
-mxConstants.NONE?wa+" transparent":""==Ma.stroke?wa+" "+mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Ma.stroke||mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ma.title&&Ia.setAttribute("title",Ma.title)}else{wa=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(ba.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
+function(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var x=T.getSelectionState().cells,O=0;O<x.length;O++){for(var P=aa.getModel().getStyle(x[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(x[O])?aa.defaultVertexStyle:aa.defaultEdgeStyle;null!=Na?(mxEvent.isShiftDown(Ya)||(P=""==Na.fill?mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,Na.fill||mxUtils.getValue(ba,
+mxConstants.STYLE_FILLCOLOR,null)),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,Na.gradient||mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ya)||mxClient.IS_MAC&&mxEvent.isMetaDown(Ya)||!aa.getModel().isVertex(x[O])||(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,Na.font||mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ya)||(P=""==Na.stroke?mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,
+Na.stroke||mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,null)))):(P=mxUtils.setStyle(P,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FILLCOLOR,"#ffffff")),P=mxUtils.setStyle(P,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ba,mxConstants.STYLE_STROKECOLOR,"#000000")),P=mxUtils.setStyle(P,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_GRADIENTCOLOR,null)),aa.getModel().isVertex(x[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,
+mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(x[O],P)}}finally{aa.getModel().endUpdate()}}));Ia.className="geStyleButton";Ia.style.width="36px";Ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ia.style.margin="0px 6px 6px 0px";if(null!=Na){var wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Na.border&&(wa=Na.border);null!=Na.gradient?mxClient.IS_IE&&10>document.documentMode?Ia.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Na.fill+"', EndColorStr='"+
+Na.gradient+"', GradientType=0)":Ia.style.backgroundImage="linear-gradient("+Na.fill+" 0px,"+Na.gradient+" 100%)":Na.fill==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor=""==Na.fill?mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Na.fill||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ia.style.border=Na.stroke==
+mxConstants.NONE?wa+" transparent":""==Na.stroke?wa+" "+mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):wa+" "+(Na.stroke||mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Na.title&&Ia.setAttribute("title",Na.title)}else{wa=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ab=mxUtils.getValue(aa.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,
"#000000");Ia.style.backgroundColor=wa;Ia.style.border="1px solid "+ab}Ia.style.borderRadius="0";U.appendChild(Ia)});U.innerText="";for(var Oa=0;Oa<ya.length;Oa++)0<Oa&&0==mxUtils.mod(Oa,4)&&mxUtils.br(U),La(ya[Oa])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);sa=10>=this.defaultColorSchemes.length?28:8;var oa=document.createElement("div");oa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+sa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(oa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+sa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(q.appendChild(oa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(oa);F(Aa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(fa);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),T=this.editorUi.editor.graph,ba=null;1==F.cells.length&&(ba=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),ba.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),ba.style.width="210px",ba.style.marginBottom="2px",q.appendChild(ba));T=1==F.cells.length?T.view.getState(F.cells[0]):null;null!=T&&null!=T.shape&&null!=T.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
-mxResources.get("editShape")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(U){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==ba?F.style.width="210px":(ba.style.width="104px",F.style.width="104px",F.style.marginLeft=
+1<this.defaultColorSchemes.length&&(q.appendChild(oa),q.appendChild(Aa));mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(oa);F(Aa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&q.appendChild(fa);return q};StyleFormatPanel.prototype.addEditOps=function(q){var F=this.editorUi.getSelectionState(),T=this.editorUi.editor.graph,aa=null;1==F.cells.length&&(aa=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(U){this.editorUi.actions.get("editStyle").funct()})),aa.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),aa.style.width="210px",aa.style.marginBottom="2px",q.appendChild(aa));T=1==F.cells.length?T.view.getState(F.cells[0]):null;null!=T&&null!=T.shape&&null!=T.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(U){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
+mxResources.get("editShape")),F.style.marginBottom="2px",null==aa?F.style.width="210px":(aa.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),q.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(U){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==aa?F.style.width="210px":(aa.style.width="104px",F.style.width="104px",F.style.marginLeft=
"2px"),q.appendChild(F));return q}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(q){return q.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(q){return Graph.isGoogleFontUrl(q)};Graph.createFontElement=function(q,
-F){var T=Graph.fontMapping[F];null==T&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==T&&(T='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,T));return q};Graph.addFont=function(q,F,T){if(null!=q&&0<q.length&&null!=F&&0<F.length){var ba=q.toLowerCase();if("helvetica"!=ba&&"arial"!=q&&"sans-serif"!=
-ba){var U=Graph.customFontElements[ba];null!=U&&U.url!=F&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=F,"http:"==F.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(F)),U={name:q,url:F,elt:Graph.createFontElement(q,U)},Graph.customFontElements[ba]=U,Graph.recentCustomFonts[ba]=U,F=document.getElementsByTagName("head")[0],null!=T&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=T,U.elt.onerror=T):T()),null!=F&&F.appendChild(U.elt)):null!=T&&T()}else null!=T&&T()}else null!=T&&
-T();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var T=q[F].getAttribute("data-font-src");if(null!=T){var ba="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=ba&&Graph.addFont(ba,T)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var T=mxUtils.getValue(q,
+F){var T=Graph.fontMapping[F];null==T&&Graph.isCssFontUrl(F)?(q=document.createElement("link"),q.setAttribute("rel","stylesheet"),q.setAttribute("type","text/css"),q.setAttribute("charset","UTF-8"),q.setAttribute("href",F)):(null==T&&(T='@font-face {\nfont-family: "'+q+'";\nsrc: url("'+F+'");\n}'),q=document.createElement("style"),mxUtils.write(q,T));return q};Graph.addFont=function(q,F,T){if(null!=q&&0<q.length&&null!=F&&0<F.length){var aa=q.toLowerCase();if("helvetica"!=aa&&"arial"!=q&&"sans-serif"!=
+aa){var U=Graph.customFontElements[aa];null!=U&&U.url!=F&&(U.elt.parentNode.removeChild(U.elt),U=null);null==U?(U=F,"http:"==F.substring(0,5)&&(U=PROXY_URL+"?url="+encodeURIComponent(F)),U={name:q,url:F,elt:Graph.createFontElement(q,U)},Graph.customFontElements[aa]=U,Graph.recentCustomFonts[aa]=U,F=document.getElementsByTagName("head")[0],null!=T&&("link"==U.elt.nodeName.toLowerCase()?(U.elt.onload=T,U.elt.onerror=T):T()),null!=F&&F.appendChild(U.elt)):null!=T&&T()}else null!=T&&T()}else null!=T&&
+T();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowerCase()];null!=q&&(F=q.url);return F};Graph.processFontAttributes=function(q){q=q.getElementsByTagName("*");for(var F=0;F<q.length;F++){var T=q[F].getAttribute("data-font-src");if(null!=T){var aa="FONT"==q[F].nodeName?q[F].getAttribute("face"):q[F].style.fontFamily;null!=aa&&Graph.addFont(aa,T)}}};Graph.processFontStyle=function(q){if(null!=q){var F=mxUtils.getValue(q,"fontSource",null);if(null!=F){var T=mxUtils.getValue(q,
mxConstants.STYLE_FONTFAMILY,null);null!=T&&Graph.addFont(T,decodeURIComponent(F))}}return q};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";
-Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var u=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}u.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
-F};var T=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):T.apply(this,arguments)};var ba=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var da=this.graph.getCellStyle(U);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||
-0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return ba.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(y.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
-F,T,ba,U,da,fa,na,sa,za,ua){C.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function ba(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
-ba();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Ma=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var O=document.createElement("img");
-O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";x.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),ba(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(x);x=document.createElement("td");
-x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var aa=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(aa):fa.highlightCells(aa)}else if(ab&&
-0<fa.hiddenTags.length)U(!0);else{aa=na.slice();var W=mxUtils.indexOf(aa,wa);aa.splice(W,1);fa.setHiddenTags(aa);ba();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(x);if(fa.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==La){x.style.align="center";x.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
-ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var aa=mxUtils.indexOf(na,wa);0<=aa&&na.splice(aa,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});x.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
-wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});x.appendChild(P)}Ya.appendChild(x)}Ma.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Ma);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
+Graph.prototype.edgeMode="move"!=urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var v=Graph.prototype.init;Graph.prototype.init=function(){function q(U){F=U}v.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",q);mxEvent.addListener(this.container,"mousemove",q);mxEvent.addListener(this.container,"mouseleave",function(U){F=null});this.isMouseInsertPoint=function(){return null!=
+F};var T=this.getInsertPoint;this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):T.apply(this,arguments)};var aa=this.layoutManager.getLayout;this.layoutManager.getLayout=function(U){var da=this.graph.getCellStyle(U);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||
+0;fa.marginTop=da.marginTop||0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return aa.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(y.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,T,aa,U,da,fa,na,sa,za,ua){C.apply(this,arguments);Graph.processFontAttributes(ua)};var I=mxText.prototype.redraw;mxText.prototype.redraw=function(){I.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(q,F,T){function aa(){for(var ya=fa.getSelectionCells(),La=[],Oa=0;Oa<ya.length;Oa++)fa.isCellVisible(ya[Oa])&&La.push(ya[Oa]);fa.setSelectionCells(La)}function U(ya){fa.setHiddenTags(ya?[]:na.slice());
+aa();fa.refresh()}function da(ya,La){za.innerText="";if(0<ya.length){var Oa=document.createElement("table");Oa.setAttribute("cellpadding","2");Oa.style.boxSizing="border-box";Oa.style.tableLayout="fixed";Oa.style.width="100%";var Na=document.createElement("tbody");if(null!=ya&&0<ya.length)for(var Ia=0;Ia<ya.length;Ia++)(function(wa){var ab=0>mxUtils.indexOf(fa.hiddenTags,wa),Ya=document.createElement("tr"),x=document.createElement("td");x.style.align="center";x.style.width="16px";var O=document.createElement("img");
+O.setAttribute("src",ab?Editor.visibleImage:Editor.hiddenImage);O.setAttribute("title",mxResources.get(ab?"hideIt":"show",[wa]));mxUtils.setOpacity(O,ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";x.appendChild(O);mxEvent.addListener(O,"click",function(X){mxEvent.isShiftDown(X)?U(0<=mxUtils.indexOf(fa.hiddenTags,wa)):(fa.toggleHiddenTag(wa),aa(),fa.refresh());mxEvent.consume(X)});Ya.appendChild(x);x=document.createElement("td");
+x.style.overflow="hidden";x.style.whiteSpace="nowrap";x.style.textOverflow="ellipsis";x.style.verticalAlign="middle";x.style.cursor="pointer";x.setAttribute("title",wa);a=document.createElement("a");mxUtils.write(a,wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ab?100:40);x.appendChild(a);mxEvent.addListener(x,"click",function(X){if(mxEvent.isShiftDown(X)){U(!0);var ba=fa.getCellsForTags([wa],null,null,!0);fa.isEnabled()?fa.setSelectionCells(ba):fa.highlightCells(ba)}else if(ab&&
+0<fa.hiddenTags.length)U(!0);else{ba=na.slice();var W=mxUtils.indexOf(ba,wa);ba.splice(W,1);fa.setHiddenTags(ba);aa();fa.refresh()}mxEvent.consume(X)});Ya.appendChild(x);if(fa.isEnabled()){x=document.createElement("td");x.style.verticalAlign="middle";x.style.textAlign="center";x.style.width="18px";if(null==La){x.style.align="center";x.style.width="16px";O=document.createElement("img");O.setAttribute("src",Editor.crossImage);O.setAttribute("title",mxResources.get("removeIt",[wa]));mxUtils.setOpacity(O,
+ab?75:25);O.style.verticalAlign="middle";O.style.cursor="pointer";O.style.width="16px";if(F||Editor.isDarkMode())O.style.filter="invert(100%)";mxEvent.addListener(O,"click",function(X){var ba=mxUtils.indexOf(na,wa);0<=ba&&na.splice(ba,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[wa]);fa.refresh();mxEvent.consume(X)});x.appendChild(O)}else{var P=document.createElement("input");P.setAttribute("type","checkbox");P.style.margin="0px";P.defaultChecked=null!=La&&0<=mxUtils.indexOf(La,
+wa);P.checked=P.defaultChecked;P.style.background="transparent";P.setAttribute("title",mxResources.get(P.defaultChecked?"removeIt":"add",[wa]));mxEvent.addListener(P,"change",function(X){P.checked?fa.addTagsForCells(fa.getSelectionCells(),[wa]):fa.removeTagsForCells(fa.getSelectionCells(),[wa]);mxEvent.consume(X)});x.appendChild(P)}Ya.appendChild(x)}Na.appendChild(Ya)})(ya[Ia]);Oa.appendChild(Na);za.appendChild(Oa)}}var fa=this,na=fa.hiddenTags.slice(),sa=document.createElement("div");sa.style.userSelect=
"none";sa.style.overflow="hidden";sa.style.padding="10px";sa.style.height="100%";var za=document.createElement("div");za.style.boxSizing="border-box";za.style.borderRadius="4px";za.style.userSelect="none";za.style.overflow="auto";za.style.position="absolute";za.style.left="10px";za.style.right="10px";za.style.top="10px";za.style.border=fa.isEnabled()?"1px solid #808080":"none";za.style.bottom=fa.isEnabled()?"48px":"10px";sa.appendChild(za);var ua=mxUtils.button(mxResources.get("reset"),function(ya){fa.setHiddenTags([]);
-mxEvent.isShiftDown(ya)||(na=fa.hiddenTags.slice());ba();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=T&&T(na,function(ya){na=ya;oa()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";fa.addListener(mxEvent.ROOT,function(){na=fa.hiddenTags.slice()});var oa=mxUtils.bind(this,function(ya,La){if(q()){ya=fa.getAllTags();for(La=0;La<
+mxEvent.isShiftDown(ya)||(na=fa.hiddenTags.slice());aa();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=T&&T(na,function(ya){na=ya;oa()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";fa.addListener(mxEvent.ROOT,function(){na=fa.hiddenTags.slice()});var oa=mxUtils.bind(this,function(ya,La){if(q()){ya=fa.getAllTags();for(La=0;La<
ya.length;La++)0>mxUtils.indexOf(na,ya[La])&&na.push(ya[La]);na.sort();fa.isSelectionEmpty()?da(na):da(na,fa.getCommonTagsForCells(fa.getSelectionCells()))}});fa.selectionModel.addListener(mxEvent.CHANGE,oa);fa.model.addListener(mxEvent.CHANGE,oa);fa.addListener(mxEvent.REFRESH,oa);var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.whiteSpace="nowrap";Aa.style.position="absolute";Aa.style.overflow="hidden";Aa.style.bottom="0px";Aa.style.height="42px";Aa.style.right="10px";
Aa.style.left="10px";fa.isEnabled()&&(Aa.appendChild(ua),Aa.appendChild(Ba),sa.appendChild(Aa));return{div:sa,refresh:oa}};Graph.prototype.getCustomFonts=function(){var q=this.extFonts;q=null!=q?q.slice():[];for(var F in Graph.customFontElements){var T=Graph.customFontElements[F];q.push({name:T.name,url:T.url})}return q};Graph.prototype.setFont=function(q,F){Graph.addFont(q,F);document.execCommand("fontname",!1,q);if(null!=F){var T=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(q,
-F);for(var ba=0;ba<T.length;ba++)T[ba].getAttribute("face")==q&&T[ba].getAttribute("data-font-src")!=F&&T[ba].setAttribute("data-font-src",F)}};var D=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return D.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
+F);for(var aa=0;aa<T.length;aa++)T[aa].getAttribute("face")==q&&T[aa].getAttribute("data-font-src")!=F&&T[aa].setAttribute("data-font-src",F)}};var D=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return D.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var q=JSON.parse(decodeURIComponent(urlParams.vars));
if(null!=q)for(var F in q)this.globalVars[F]=q[F]}catch(T){null!=window.console&&console.log("Error in vars URL parameter: "+T)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(q){var F=N.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[q]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var q=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,T,ba,U,da,fa,na,sa,za,ua,Ba,oa,Aa){var ya=null,La=null,Oa=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ya=this.stylesheet,La=this.shapeForegroundColor,Oa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ma=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Ma.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",x="",O=0;O<Ia.length;O++){var P=
-Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+x));Ma.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Ma),Editor.MathJaxRender(Ma),Ma.parentNode.removeChild(Ma));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Ma};var ha=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(q){ha.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var ka=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ka.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(q.ownerDocument)).decode(q)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var G=Graph.prototype.getSvg;Graph.prototype.getSvg=function(q,F,T,aa,U,da,fa,na,sa,za,ua,Ba,oa,Aa){var ya=null,La=null,Oa=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(ya=this.stylesheet,La=this.shapeForegroundColor,Oa=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Na=G.apply(this,arguments),Ia=this.getCustomFonts();if(ua&&0<Ia.length){var wa=Na.ownerDocument,ab=null!=wa.createElementNS?wa.createElementNS(mxConstants.NS_SVG,"style"):wa.createElement("style");null!=wa.setAttributeNS?ab.setAttributeNS("type","text/css"):ab.setAttribute("type","text/css");for(var Ya="",x="",O=0;O<Ia.length;O++){var P=
+Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":x+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+x));Na.getElementsByTagName("defs")[0].appendChild(ab)}this.mathEnabled&&(document.body.appendChild(Na),Editor.MathJaxRender(Na),Na.parentNode.removeChild(Na));null!=ya&&(this.shapeBackgroundColor=Oa,this.shapeForegroundColor=La,this.stylesheet=ya,this.refresh());return Na};var ia=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(q){ia.apply(this,arguments);null!=q.secondLabel&&(q.secondLabel.destroy(),q.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(q){return[q.shape,q.text,q.secondLabel,q.control]};var ka=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ka.apply(this,arguments);this.enumerationState=0};var ja=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(q){null!=q.shape&&this.redrawEnumerationState(q);return ja.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(q){q=decodeURIComponent(mxUtils.getValue(q.style,"enumerateValue",""));""==q&&(q=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(q)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(q){var F="1"==mxUtils.getValue(q.style,"enumerate",0);F&&null==q.secondLabel?(q.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var T=q.view.scale,ba=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*T,q.y+4*T,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==ba&&F.scale==T||(F.bounds=q,F.value=ba,F.scale=
+q.secondLabel.size=12,q.secondLabel.state=q,q.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(q,q.secondLabel)):F||null==q.secondLabel||(q.secondLabel.destroy(),q.secondLabel=null);F=q.secondLabel;if(null!=F){var T=q.view.scale,aa=this.createEnumerationValue(q);q=this.graph.model.isVertex(q.cell)?new mxRectangle(q.x+q.width-4*T,q.y+4*T,0,0):mxRectangle.fromPoint(q.view.getPoint(q));F.bounds.equals(q)&&F.value==aa&&F.scale==T||(F.bounds=q,F.value=aa,F.scale=
T,F.redraw())}};var ca=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ca.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var q=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",q.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,q.ownerSVGElement))}};var pa=Graph.prototype.refresh;Graph.prototype.refresh=function(){pa.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var qa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){qa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
-null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,ba=0,U=0,da=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),fa=
-mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<ba&&ba--;0==ba&&sa()}),sa=mxUtils.bind(this,function(){if(U<q.length){var za=this.stoppingCustomActions,ua=q[U++],Ba=[];if(null!=ua.open)if(fa(),this.isCustomLink(ua.open)){if(!this.customLinkClicked(ua.open))return}else this.openLink(ua.open);null==ua.wait||za||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;na()}),ba++,this.pendingWaitThread=
-window.setTimeout(this.pendingExecuteNextAction,""!=ua.wait?parseInt(ua.wait):1E3),fa());null!=ua.opacity&&null!=ua.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ua.opacity,!0)),ua.opacity.value);null!=ua.fadeIn&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeIn,!0)),0,1,na,za?0:ua.fadeIn.delay));null!=ua.fadeOut&&(ba++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeOut,!0)),1,0,na,za?0:ua.fadeOut.delay));null!=
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var ra=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){ra.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(q){"data:action/json,"==q.substring(0,17)&&(q=JSON.parse(q.substring(17)),
+null!=q.actions&&this.executeCustomActions(q.actions))};Graph.prototype.executeCustomActions=function(q,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,aa=0,U=0,da=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),fa=
+mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<aa&&aa--;0==aa&&sa()}),sa=mxUtils.bind(this,function(){if(U<q.length){var za=this.stoppingCustomActions,ua=q[U++],Ba=[];if(null!=ua.open)if(fa(),this.isCustomLink(ua.open)){if(!this.customLinkClicked(ua.open))return}else this.openLink(ua.open);null==ua.wait||za||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;na()}),aa++,this.pendingWaitThread=
+window.setTimeout(this.pendingExecuteNextAction,""!=ua.wait?parseInt(ua.wait):1E3),fa());null!=ua.opacity&&null!=ua.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ua.opacity,!0)),ua.opacity.value);null!=ua.fadeIn&&(aa++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeIn,!0)),0,1,na,za?0:ua.fadeIn.delay));null!=ua.fadeOut&&(aa++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeOut,!0)),1,0,na,za?0:ua.fadeOut.delay));null!=
ua.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeIn,!0),!0)));null!=ua.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeOut,!0),!1)));null!=ua.toggle&&(da(),this.toggleCells(this.getCellsForAction(ua.toggle,!0)));if(null!=ua.show){da();var oa=this.getCellsForAction(ua.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(oa),1);this.setCellsVisible(oa,!0)}null!=ua.hide&&(da(),oa=this.getCellsForAction(ua.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(oa),
0),this.setCellsVisible(oa,!1));null!=ua.toggleStyle&&null!=ua.toggleStyle.key&&(da(),this.toggleCellStyles(ua.toggleStyle.key,null!=ua.toggleStyle.defaultValue?ua.toggleStyle.defaultValue:"0",this.getCellsForAction(ua.toggleStyle,!0)));null!=ua.style&&null!=ua.style.key&&(da(),this.setCellStyles(ua.style.key,ua.style.value,this.getCellsForAction(ua.style,!0)));oa=[];null!=ua.select&&this.isEnabled()&&(oa=this.getCellsForAction(ua.select),this.setSelectionCells(oa));null!=ua.highlight&&(oa=this.getCellsForAction(ua.highlight),
this.highlightCells(oa,ua.highlight.color,ua.highlight.duration,ua.highlight.opacity));null!=ua.scroll&&(oa=this.getCellsForAction(ua.scroll));null!=ua.viewbox&&this.fitWindow(ua.viewbox,ua.viewbox.border);0<oa.length&&this.scrollCellToVisible(oa[0]);if(null!=ua.tags){oa=[];null!=ua.tags.hidden&&(oa=oa.concat(ua.tags.hidden));if(null!=ua.tags.visible)for(var Aa=this.getAllTags(),ya=0;ya<Aa.length;ya++)0>mxUtils.indexOf(ua.tags.visible,Aa[ya])&&0>mxUtils.indexOf(oa,Aa[ya])&&oa.push(Aa[ya]);this.setHiddenTags(oa);
-this.refresh()}0<Ba.length&&(ba++,this.executeAnimations(Ba,na,za?1:ua.steps,za?0:ua.delay));0==ba?sa():fa()}else this.stoppingCustomActions=this.executingCustomActions=!1,fa(),null!=F&&F()});sa()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var T=this.getLinkForCell(F);null!=T&&"data:action/json,"==T.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,T));if(this.isHtmlLabel(F)){var ba=document.createElement("div");ba.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var U=
-ba.getElementsByTagName("a"),da=!1,fa=0;fa<U.length;fa++)T=U[fa].getAttribute("href"),null!=T&&"data:action/json,"==T.substring(0,17)&&(U[fa].setAttribute("href",this.updateCustomLink(q,T)),da=!0);da&&this.labelChanged(F,ba.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var T=JSON.parse(F.substring(17));null!=T.actions&&(this.updateCustomLinkActions(q,T.actions),F="data:action/json,"+JSON.stringify(T))}catch(ba){}return F};Graph.prototype.updateCustomLinkActions=
-function(q,F){for(var T=0;T<F.length;T++){var ba=F[T],U;for(U in ba)this.updateCustomLinkAction(q,ba[U],"cells"),this.updateCustomLinkAction(q,ba[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,T){if(null!=F&&null!=F[T]){for(var ba=[],U=0;U<F[T].length;U++)if("*"==F[T][U])ba.push(F[T][U]);else{var da=q[F[T][U]];null!=da?""!=da&&ba.push(da):ba.push(F[T][U])}F[T]=ba}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,
-null,F));if(null!=q.excludeCells){for(var T=[],ba=0;ba<F.length;ba++)0>q.excludeCells.indexOf(F[ba].id)&&T.push(F[ba]);F=T}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var T=0;T<q.length;T++)if("*"==q[T]){var ba=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(da){return da!=ba},ba))}else{var U=this.model.getCell(q[T]);null!=U&&F.push(U)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&
+this.refresh()}0<Ba.length&&(aa++,this.executeAnimations(Ba,na,za?1:ua.steps,za?0:ua.delay));0==aa?sa():fa()}else this.stoppingCustomActions=this.executingCustomActions=!1,fa(),null!=F&&F()});sa()}};Graph.prototype.doUpdateCustomLinksForCell=function(q,F){var T=this.getLinkForCell(F);null!=T&&"data:action/json,"==T.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(q,T));if(this.isHtmlLabel(F)){var aa=document.createElement("div");aa.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var U=
+aa.getElementsByTagName("a"),da=!1,fa=0;fa<U.length;fa++)T=U[fa].getAttribute("href"),null!=T&&"data:action/json,"==T.substring(0,17)&&(U[fa].setAttribute("href",this.updateCustomLink(q,T)),da=!0);da&&this.labelChanged(F,aa.innerHTML)}};Graph.prototype.updateCustomLink=function(q,F){if("data:action/json,"==F.substring(0,17))try{var T=JSON.parse(F.substring(17));null!=T.actions&&(this.updateCustomLinkActions(q,T.actions),F="data:action/json,"+JSON.stringify(T))}catch(aa){}return F};Graph.prototype.updateCustomLinkActions=
+function(q,F){for(var T=0;T<F.length;T++){var aa=F[T],U;for(U in aa)this.updateCustomLinkAction(q,aa[U],"cells"),this.updateCustomLinkAction(q,aa[U],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(q,F,T){if(null!=F&&null!=F[T]){for(var aa=[],U=0;U<F[T].length;U++)if("*"==F[T][U])aa.push(F[T][U]);else{var da=q[F[T][U]];null!=da?""!=da&&aa.push(da):aa.push(F[T][U])}F[T]=aa}};Graph.prototype.getCellsForAction=function(q,F){F=this.getCellsById(q.cells).concat(this.getCellsForTags(q.tags,
+null,F));if(null!=q.excludeCells){for(var T=[],aa=0;aa<F.length;aa++)0>q.excludeCells.indexOf(F[aa].id)&&T.push(F[aa]);F=T}return F};Graph.prototype.getCellsById=function(q){var F=[];if(null!=q)for(var T=0;T<q.length;T++)if("*"==q[T]){var aa=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(da){return da!=aa},aa))}else{var U=this.model.getCell(q[T]);null!=U&&F.push(U)}return F};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(q){return L.apply(this,arguments)&&
!this.isAllTagsHidden(this.getTagsForCell(q))};Graph.prototype.setHiddenTags=function(q){this.hiddenTags=q;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(q){var F=mxUtils.indexOf(this.hiddenTags,q);0>F?this.hiddenTags.push(q):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(q){if(null==q||0==q.length||0==this.hiddenTags.length)return!1;q=q.split(" ");if(q.length>this.hiddenTags.length)return!1;
-for(var F=0;F<q.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,T,ba){var U=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var da=0,fa={},na=0;na<q.length;na++)0<q[na].length&&(fa[q[na]]=!0,da++);for(na=0;na<F.length;na++)if(T&&this.model.getParent(F[na])==this.model.root||this.model.isVertex(F[na])||this.model.isEdge(F[na])){var sa=this.getTagsForCell(F[na]),za=!1;if(0<sa.length&&(sa=sa.split(" "),
-sa.length>=q.length)){for(var ua=za=0;ua<sa.length&&za<da;ua++)null!=fa[sa[ua]]&&za++;za=za==da}za&&(1!=ba||this.isCellVisible(F[na]))&&U.push(F[na])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,T=[],ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);T=[];if(0<U.length){U=U.split(" ");for(var da={},fa=0;fa<U.length;fa++)if(null==F||null!=F[U[fa]])da[U[fa]]=
-!0,T.push(U[fa]);F=da}else return[]}return T};Graph.prototype.getTagsForCells=function(q){for(var F=[],T={},ba=0;ba<q.length;ba++){var U=this.getTagsForCell(q[ba]);if(0<U.length){U=U.split(" ");for(var da=0;da<U.length;da++)null==T[U[da]]&&(T[U[da]]=!0,F.push(U[da]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var T=0;T<q.length;T++){for(var ba=
-this.getTagsForCell(q[T]),U=ba.split(" "),da=!1,fa=0;fa<F.length;fa++){var na=mxUtils.trim(F[fa]);""!=na&&0>mxUtils.indexOf(U,na)&&(ba=0<ba.length?ba+" "+na:na,da=!0)}da&&this.setAttributeForCell(q[T],"tags",ba)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var T=0;T<q.length;T++){var ba=this.getTagsForCell(q[T]);if(0<ba.length){for(var U=ba.split(" "),da=!1,fa=0;fa<F.length;fa++){var na=mxUtils.indexOf(U,
+for(var F=0;F<q.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,q[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(q,F,T,aa){var U=[];if(null!=q){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var da=0,fa={},na=0;na<q.length;na++)0<q[na].length&&(fa[q[na]]=!0,da++);for(na=0;na<F.length;na++)if(T&&this.model.getParent(F[na])==this.model.root||this.model.isVertex(F[na])||this.model.isEdge(F[na])){var sa=this.getTagsForCell(F[na]),za=!1;if(0<sa.length&&(sa=sa.split(" "),
+sa.length>=q.length)){for(var ua=za=0;ua<sa.length&&za<da;ua++)null!=fa[sa[ua]]&&za++;za=za==da}za&&(1!=aa||this.isCellVisible(F[na]))&&U.push(F[na])}}return U};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(q){for(var F=null,T=[],aa=0;aa<q.length;aa++){var U=this.getTagsForCell(q[aa]);T=[];if(0<U.length){U=U.split(" ");for(var da={},fa=0;fa<U.length;fa++)if(null==F||null!=F[U[fa]])da[U[fa]]=
+!0,T.push(U[fa]);F=da}else return[]}return T};Graph.prototype.getTagsForCells=function(q){for(var F=[],T={},aa=0;aa<q.length;aa++){var U=this.getTagsForCell(q[aa]);if(0<U.length){U=U.split(" ");for(var da=0;da<U.length;da++)null==T[U[da]]&&(T[U[da]]=!0,F.push(U[da]))}}return F};Graph.prototype.getTagsForCell=function(q){return this.getAttributeForCell(q,"tags","")};Graph.prototype.addTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var T=0;T<q.length;T++){for(var aa=
+this.getTagsForCell(q[T]),U=aa.split(" "),da=!1,fa=0;fa<F.length;fa++){var na=mxUtils.trim(F[fa]);""!=na&&0>mxUtils.indexOf(U,na)&&(aa=0<aa.length?aa+" "+na:na,da=!0)}da&&this.setAttributeForCell(q[T],"tags",aa)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(q,F){if(0<q.length&&0<F.length){this.model.beginUpdate();try{for(var T=0;T<q.length;T++){var aa=this.getTagsForCell(q[T]);if(0<aa.length){for(var U=aa.split(" "),da=!1,fa=0;fa<F.length;fa++){var na=mxUtils.indexOf(U,
F[fa]);0<=na&&(U.splice(na,1),da=!0)}da&&this.setAttributeForCell(q[T],"tags",U.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(q){this.model.beginUpdate();try{for(var F=0;F<q.length;F++)this.model.setVisible(q[F],!this.model.isVisible(q[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(q,F){this.model.beginUpdate();try{for(var T=0;T<q.length;T++)this.model.setVisible(q[T],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=
-function(q,F,T,ba){for(var U=0;U<q.length;U++)this.highlightCell(q[U],F,T,ba)};Graph.prototype.highlightCell=function(q,F,T,ba,U){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;T=null!=T?T:1E3;q=this.view.getState(q);var da=null;null!=q&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+U),da=new mxCellHighlight(this,F,U,!1),null!=ba&&(da.opacity=ba),da.highlight(q),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition",
-"all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},1200)},T));return da};Graph.prototype.addSvgShadow=function(q,F,T,ba){T=null!=T?T:!1;ba=null!=ba?ba:!0;var U=q.ownerDocument,da=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"filter"):U.createElement("filter");da.setAttribute("id",this.shadowId);var fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):U.createElement("feGaussianBlur");fa.setAttribute("in",
+function(q,F,T,aa){for(var U=0;U<q.length;U++)this.highlightCell(q[U],F,T,aa)};Graph.prototype.highlightCell=function(q,F,T,aa,U){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;T=null!=T?T:1E3;q=this.view.getState(q);var da=null;null!=q&&(U=null!=U?U:4,U=Math.max(U+1,mxUtils.getValue(q.style,mxConstants.STYLE_STROKEWIDTH,1)+U),da=new mxCellHighlight(this,F,U,!1),null!=aa&&(da.opacity=aa),da.highlight(q),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition",
+"all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},1200)},T));return da};Graph.prototype.addSvgShadow=function(q,F,T,aa){T=null!=T?T:!1;aa=null!=aa?aa:!0;var U=q.ownerDocument,da=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"filter"):U.createElement("filter");da.setAttribute("id",this.shadowId);var fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):U.createElement("feGaussianBlur");fa.setAttribute("in",
"SourceAlpha");fa.setAttribute("stdDeviation",this.svgShadowBlur);fa.setAttribute("result","blur");da.appendChild(fa);fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feOffset"):U.createElement("feOffset");fa.setAttribute("in","blur");fa.setAttribute("dx",this.svgShadowSize);fa.setAttribute("dy",this.svgShadowSize);fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feFlood"):U.createElement("feFlood");fa.setAttribute("flood-color",
this.svgShadowColor);fa.setAttribute("flood-opacity",this.svgShadowOpacity);fa.setAttribute("result","offsetColor");da.appendChild(fa);fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feComposite"):U.createElement("feComposite");fa.setAttribute("in","offsetColor");fa.setAttribute("in2","offsetBlur");fa.setAttribute("operator","in");fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"feBlend"):U.createElement("feBlend");
-fa.setAttribute("in","SourceGraphic");fa.setAttribute("in2","offsetBlur");da.appendChild(fa);fa=q.getElementsByTagName("defs");0==fa.length?(U=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"defs"):U.createElement("defs"),null!=q.firstChild?q.insertBefore(U,q.firstChild):q.appendChild(U)):U=fa[0];U.appendChild(da);T||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&ba&&(q.setAttribute("width",
+fa.setAttribute("in","SourceGraphic");fa.setAttribute("in2","offsetBlur");da.appendChild(fa);fa=q.getElementsByTagName("defs");0==fa.length?(U=null!=U.createElementNS?U.createElementNS(mxConstants.NS_SVG,"defs"):U.createElement("defs"),null!=q.firstChild?q.insertBefore(U,q.firstChild):q.appendChild(U)):U=fa[0];U.appendChild(da);T||(F=null!=F?F:q.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(q.getAttribute("width")))&&aa&&(q.setAttribute("width",
parseInt(q.getAttribute("width"))+6),q.setAttribute("height",parseInt(q.getAttribute("height"))+6),F=q.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,q.setAttribute("viewBox",F[0]+" "+F[1]+" "+w+" "+h))))));return da};Graph.prototype.setShadowVisible=function(q,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=q)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),
F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var q=this.model.getChildCount(this.model.root),F=0;do var T=this.model.getChildAt(this.model.root,F);while(F++<q&&"1"==mxUtils.getValue(this.getCellStyle(T),"locked","0"));null!=T&&this.setDefaultParent(T)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=
[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+
@@ -3352,362 +3353,363 @@ STENCIL_PATH+"/electrical/abstract.xml"];mxStencilRegistry.libraries["electrical
"/ibm.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.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",
STENCIL_PATH+"/veeam/veeam2.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(q){var F=null;null!=q&&0<q.length&&("ER"==q.substring(0,2)?F="mxgraph.er":"sysML"==q.substring(0,
-5)&&(F="mxgraph.sysml"));return F};var V=mxMarker.createMarker;mxMarker.createMarker=function(q,F,T,ba,U,da,fa,na,sa,za){if(null!=T&&null==mxMarker.markers[T]){var ua=this.getPackageForType(T);null!=ua&&mxStencilRegistry.getStencil(ua)}return V.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,T,ba,U,da){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,
-arguments)};PrintDialog.prototype.create=function(q,F){function T(){oa.value=Math.max(1,Math.min(na,Math.max(parseInt(oa.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(na,Math.min(parseInt(oa.value),parseInt(Ba.value))))}function ba(va){function Ca(Xa,Za,fb){var hb=Xa.useCssTransforms,qb=Xa.currentTranslate,kb=Xa.currentScale,ib=Xa.view.translate,ub=Xa.view.scale;Xa.useCssTransforms&&(Xa.useCssTransforms=!1,Xa.currentTranslate=new mxPoint(0,0),Xa.currentScale=1,Xa.view.translate=new mxPoint(0,
-0),Xa.view.scale=1);var ob=Xa.getGraphBounds(),nb=0,wb=0,lb=ta.get(),gb=1/Xa.pageScale,tb=Ma.checked;if(tb){gb=parseInt(W.value);var Cb=parseInt(ea.value);gb=Math.min(lb.height*Cb/(ob.height/Xa.view.scale),lb.width*gb/(ob.width/Xa.view.scale))}else gb=parseInt(Oa.value)/(100*Xa.pageScale),isNaN(gb)&&(Ea=1/Xa.pageScale,Oa.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Ea);lb.height=Math.ceil(lb.height*Ea);gb*=Ea;!tb&&Xa.pageVisible?(ob=Xa.getPageLayout(),nb-=ob.x*lb.width,
+5)&&(F="mxgraph.sysml"));return F};var V=mxMarker.createMarker;mxMarker.createMarker=function(q,F,T,aa,U,da,fa,na,sa,za){if(null!=T&&null==mxMarker.markers[T]){var ua=this.getPackageForType(T);null!=ua&&mxStencilRegistry.getStencil(ua)}return V.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(q,F,T,aa,U,da){"1"==mxUtils.getValue(F.style,"lineShape",null)&&q.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,
+arguments)};PrintDialog.prototype.create=function(q,F){function T(){oa.value=Math.max(1,Math.min(na,Math.max(parseInt(oa.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(na,Math.min(parseInt(oa.value),parseInt(Ba.value))))}function aa(va){function Ea(Xa,Za,fb){var hb=Xa.useCssTransforms,qb=Xa.currentTranslate,kb=Xa.currentScale,ib=Xa.view.translate,ub=Xa.view.scale;Xa.useCssTransforms&&(Xa.useCssTransforms=!1,Xa.currentTranslate=new mxPoint(0,0),Xa.currentScale=1,Xa.view.translate=new mxPoint(0,
+0),Xa.view.scale=1);var ob=Xa.getGraphBounds(),nb=0,wb=0,lb=ta.get(),gb=1/Xa.pageScale,tb=Na.checked;if(tb){gb=parseInt(W.value);var Cb=parseInt(ea.value);gb=Math.min(lb.height*Cb/(ob.height/Xa.view.scale),lb.width*gb/(ob.width/Xa.view.scale))}else gb=parseInt(Oa.value)/(100*Xa.pageScale),isNaN(gb)&&(Ca=1/Xa.pageScale,Oa.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Ca);lb.height=Math.ceil(lb.height*Ca);gb*=Ca;!tb&&Xa.pageVisible?(ob=Xa.getPageLayout(),nb-=ob.x*lb.width,
wb-=ob.y*lb.height):tb=!0;if(null==Za){Za=PrintDialog.createPrintPreview(Xa,gb,lb,0,nb,wb,tb);Za.pageSelector=!1;Za.mathEnabled=!1;Aa.checked&&(Za.isCellVisible=function(pb){return Xa.isCellSelected(pb)});nb=q.getCurrentFile();null!=nb&&(Za.title=nb.getTitle());var xb=Za.writeHead;Za.writeHead=function(pb){xb.apply(this,arguments);mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),pb.writeln("}"),pb.writeln("</style>"));
null!=q.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(q.editor.fontCss),pb.writeln("</style>"));for(var yb=Xa.getCustomFonts(),Ab=0;Ab<yb.length;Ab++){var c=yb[Ab].name,m=yb[Ab].url;Graph.isCssFontUrl(m)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(m)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(c)+'";\nsrc: url("'+mxUtils.htmlEntities(m)+'");\n}'),pb.writeln("</style>"))}};
-if("undefined"!==typeof MathJax){var zb=Za.renderPage;Za.renderPage=function(pb,yb,Ab,c,m,v){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}nb=null;wb=U.shapeForegroundColor;tb=U.shapeBackgroundColor;lb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(nb=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",
+if("undefined"!==typeof MathJax){var zb=Za.renderPage;Za.renderPage=function(pb,yb,Ab,c,m,u){var n=mxClient.NO_FO,t=zb.apply(this,arguments);mxClient.NO_FO=n;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:t.className="geDisableMathJax";return t}}nb=null;wb=U.shapeForegroundColor;tb=U.shapeBackgroundColor;lb=U.enableFlowAnimation;U.enableFlowAnimation=!1;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(nb=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",
U.shapeBackgroundColor="#ffffff",U.refresh());Za.open(null,null,fb,!0);U.enableFlowAnimation=lb;null!=nb&&(U.shapeForegroundColor=wb,U.shapeBackgroundColor=tb,U.stylesheet=nb,U.refresh())}else{lb=Xa.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";Za.backgroundColor=lb;Za.autoOrigin=tb;Za.appendGraph(Xa,gb,nb,wb,fb,!0);fb=Xa.getCustomFonts();if(null!=Za.wnd)for(nb=0;nb<fb.length;nb++)wb=fb[nb].name,tb=fb[nb].url,Graph.isCssFontUrl(tb)?Za.wnd.document.writeln('<link rel="stylesheet" href="'+
-mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(Za.wnd.document.writeln('<style type="text/css">'),Za.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(wb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),Za.wnd.document.writeln("</style>"))}hb&&(Xa.useCssTransforms=hb,Xa.currentTranslate=qb,Xa.currentScale=kb,Xa.view.translate=ib,Xa.view.scale=ub);return Za}var Ea=parseInt(ra.value)/100;isNaN(Ea)&&(Ea=1,ra.value="100 %");Ea*=.75;var Na=null,Wa=U.shapeForegroundColor,
-Ra=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(Na=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Ga=Ba.value,Ka=oa.value,Pa=!za.checked,$a=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,za.checked,Ga,Ka,Ma.checked,W.value,ea.value,parseInt(Oa.value)/100,parseInt(ra.value)/100,ta.get());else{Pa&&(Pa=Aa.checked||Ga==sa&&Ka==sa);if(!Pa&&null!=q.pages&&q.pages.length){var eb=
-0;Pa=q.pages.length-1;za.checked||(eb=parseInt(Ga)-1,Pa=parseInt(Ka)-1);for(var cb=eb;cb<=Pa;cb++){var db=q.pages[cb];Ga=db==q.currentPage?U:null;if(null==Ga){Ga=q.createTemporaryGraph(U.stylesheet);Ga.shapeForegroundColor=U.shapeForegroundColor;Ga.shapeBackgroundColor=U.shapeBackgroundColor;Ka=!0;eb=!1;var rb=null,mb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ka=db.viewState.pageVisible,eb=db.viewState.mathEnabled,rb=db.viewState.background,mb=db.viewState.backgroundImage,
-Ga.extFonts=db.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=q.createImageForPageLink(mb.originalSrc,db));Ga.background=rb;Ga.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;Ga.pageVisible=Ka;Ga.mathEnabled=eb;var vb=Ga.getGraphBounds;Ga.getGraphBounds=function(){var Xa=vb.apply(this,arguments),Za=this.backgroundImage;if(null!=Za&&null!=Za.width&&null!=Za.height){var fb=this.view.translate,hb=this.view.scale;Xa=mxRectangle.fromRectangle(Xa);Xa.add(new mxRectangle((fb.x+
-Za.x)*hb,(fb.y+Za.y)*hb,Za.width*hb,Za.height*hb))}return Xa};var Bb=Ga.getGlobalVariable;Ga.getGlobalVariable=function(Xa){return"page"==Xa?db.getName():"pagenumber"==Xa?cb+1:"pagecount"==Xa?null!=q.pages?q.pages.length:1:Bb.apply(this,arguments)};document.body.appendChild(Ga.container);q.updatePageRoot(db);Ga.model.setRoot(db.root)}$a=Ca(Ga,$a,cb!=Pa);Ga!=U&&Ga.container.parentNode.removeChild(Ga.container)}}else $a=Ca(U);null==$a?q.handleError({message:mxResources.get("errorUpdatingPreview")}):
-($a.mathEnabled&&(Pa=$a.wnd.document,va&&($a.wnd.IMMEDIATE_PRINT=!0),Pa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),$a.closeDocument(),!$a.mathEnabled&&va&&PrintDialog.printPreview($a));null!=Na&&(U.shapeForegroundColor=Wa,U.shapeBackgroundColor=Ra,U.stylesheet=Na,U.refresh())}}var U=q.editor.graph,da=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,
+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):(Za.wnd.document.writeln('<style type="text/css">'),Za.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(wb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),Za.wnd.document.writeln("</style>"))}hb&&(Xa.useCssTransforms=hb,Xa.currentTranslate=qb,Xa.currentScale=kb,Xa.view.translate=ib,Xa.view.scale=ub);return Za}var Ca=parseInt(qa.value)/100;isNaN(Ca)&&(Ca=1,qa.value="100 %");Ca*=.75;var Ma=null,Sa=U.shapeForegroundColor,
+Qa=U.shapeBackgroundColor;null!=U.themes&&"darkTheme"==U.defaultThemeName&&(Ma=U.stylesheet,U.stylesheet=U.getDefaultStylesheet(),U.shapeForegroundColor="#000000",U.shapeBackgroundColor="#ffffff",U.refresh());var Fa=Ba.value,Ka=oa.value,Pa=!za.checked,$a=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(q,za.checked,Fa,Ka,Na.checked,W.value,ea.value,parseInt(Oa.value)/100,parseInt(qa.value)/100,ta.get());else{Pa&&(Pa=Aa.checked||Fa==sa&&Ka==sa);if(!Pa&&null!=q.pages&&q.pages.length){var eb=
+0;Pa=q.pages.length-1;za.checked||(eb=parseInt(Fa)-1,Pa=parseInt(Ka)-1);for(var cb=eb;cb<=Pa;cb++){var db=q.pages[cb];Fa=db==q.currentPage?U:null;if(null==Fa){Fa=q.createTemporaryGraph(U.stylesheet);Fa.shapeForegroundColor=U.shapeForegroundColor;Fa.shapeBackgroundColor=U.shapeBackgroundColor;Ka=!0;eb=!1;var rb=null,mb=null;null==db.viewState&&null==db.root&&q.updatePageRoot(db);null!=db.viewState&&(Ka=db.viewState.pageVisible,eb=db.viewState.mathEnabled,rb=db.viewState.background,mb=db.viewState.backgroundImage,
+Fa.extFonts=db.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=q.createImageForPageLink(mb.originalSrc,db));Fa.background=rb;Fa.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;Fa.pageVisible=Ka;Fa.mathEnabled=eb;var vb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var Xa=vb.apply(this,arguments),Za=this.backgroundImage;if(null!=Za&&null!=Za.width&&null!=Za.height){var fb=this.view.translate,hb=this.view.scale;Xa=mxRectangle.fromRectangle(Xa);Xa.add(new mxRectangle((fb.x+
+Za.x)*hb,(fb.y+Za.y)*hb,Za.width*hb,Za.height*hb))}return Xa};var Bb=Fa.getGlobalVariable;Fa.getGlobalVariable=function(Xa){return"page"==Xa?db.getName():"pagenumber"==Xa?cb+1:"pagecount"==Xa?null!=q.pages?q.pages.length:1:Bb.apply(this,arguments)};document.body.appendChild(Fa.container);q.updatePageRoot(db);Fa.model.setRoot(db.root)}$a=Ea(Fa,$a,cb!=Pa);Fa!=U&&Fa.container.parentNode.removeChild(Fa.container)}}else $a=Ea(U);null==$a?q.handleError({message:mxResources.get("errorUpdatingPreview")}):
+($a.mathEnabled&&(Pa=$a.wnd.document,va&&($a.wnd.IMMEDIATE_PRINT=!0),Pa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),$a.closeDocument(),!$a.mathEnabled&&va&&PrintDialog.printPreview($a));null!=Ma&&(U.shapeForegroundColor=Sa,U.shapeBackgroundColor=Qa,U.stylesheet=Ma,U.refresh())}}var U=q.editor.graph,da=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,
F||mxResources.get("print"));da.appendChild(fa);var na=1,sa=1;fa=document.createElement("div");fa.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var za=document.createElement("input");za.style.cssText="margin-right:8px;margin-bottom:8px;";za.setAttribute("value","all");za.setAttribute("type","radio");za.setAttribute("name","pages-printdialog");fa.appendChild(za);F=document.createElement("span");mxUtils.write(F,mxResources.get("printAllPages"));fa.appendChild(F);
mxUtils.br(fa);var ua=za.cloneNode(!0);za.setAttribute("checked","checked");ua.setAttribute("value","range");fa.appendChild(ua);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");fa.appendChild(F);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("type","number");Ba.setAttribute("min","1");Ba.style.width="50px";fa.appendChild(Ba);F=document.createElement("span");mxUtils.write(F,mxResources.get("to"));
fa.appendChild(F);var oa=Ba.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener(Ba,"focus",function(){ua.checked=!0});mxEvent.addListener(oa,"focus",function(){ua.checked=!0});mxEvent.addListener(Ba,"change",T);mxEvent.addListener(oa,"change",T);if(null!=q.pages&&(na=q.pages.length,null!=q.currentPage))for(F=0;F<q.pages.length;F++)if(q.currentPage==q.pages[F]){sa=F+1;Ba.value=sa;oa.value=sa;break}Ba.setAttribute("max",na);oa.setAttribute("max",na);q.isPagesEnabled()?1<na&&(da.appendChild(fa),ua.checked=
!0):ua.checked=!0;mxUtils.br(fa);var Aa=document.createElement("input");Aa.setAttribute("value","all");Aa.setAttribute("type","radio");Aa.style.marginRight="8px";U.isSelectionEmpty()&&Aa.setAttribute("disabled","disabled");var ya=document.createElement("div");ya.style.marginBottom="10px";1==na?(Aa.setAttribute("type","checkbox"),Aa.style.marginBottom="12px",ya.appendChild(Aa)):(Aa.setAttribute("name","pages-printdialog"),Aa.style.marginBottom="8px",fa.appendChild(Aa));F=document.createElement("span");
mxUtils.write(F,mxResources.get("selectionOnly"));Aa.parentNode.appendChild(F);1==na&&mxUtils.br(Aa.parentNode);var La=document.createElement("input");La.style.marginRight="8px";La.setAttribute("value","adjust");La.setAttribute("type","radio");La.setAttribute("name","printZoom");ya.appendChild(La);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));ya.appendChild(F);var Oa=document.createElement("input");Oa.style.cssText="margin:0 8px 0 8px;";Oa.setAttribute("value","100 %");
-Oa.style.width="50px";ya.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){La.checked=!0});da.appendChild(ya);fa=fa.cloneNode(!1);var Ma=La.cloneNode(!0);Ma.setAttribute("value","fit");La.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Ma);fa.appendChild(F);ya=document.createElement("table");ya.style.display="inline-block";var Ia=document.createElement("tbody"),wa=document.createElement("tr"),
-ab=wa.cloneNode(!0),Ya=document.createElement("td"),x=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),aa=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";x.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
-O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Ma.checked=!0});mxEvent.addListener(ea,"focus",function(){Ma.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));aa.appendChild(F);wa.appendChild(Ya);wa.appendChild(x);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(aa);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
-da.appendChild(fa);fa=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));fa.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));fa.appendChild(F);var ra=
-document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";fa.appendChild(ra);da.appendChild(fa);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});fa.className="geBtn";q.editor.cancelFirst&&F.appendChild(fa);q.isOffline()||(ya=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-ya.className="geBtn",F.appendChild(ya));PrintDialog.previewEnabled&&(ya=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();ba(!1)}),ya.className="geBtn",F.appendChild(ya));ya=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();ba(!0)});ya.className="geBtn gePrimaryBtn";F.appendChild(ya);q.editor.cancelFirst||F.appendChild(fa);da.appendChild(F);this.container=da};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
+Oa.style.width="50px";ya.appendChild(Oa);mxEvent.addListener(Oa,"focus",function(){La.checked=!0});da.appendChild(ya);fa=fa.cloneNode(!1);var Na=La.cloneNode(!0);Na.setAttribute("value","fit");La.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(Na);fa.appendChild(F);ya=document.createElement("table");ya.style.display="inline-block";var Ia=document.createElement("tbody"),wa=document.createElement("tr"),
+ab=wa.cloneNode(!0),Ya=document.createElement("td"),x=Ya.cloneNode(!0),O=Ya.cloneNode(!0),P=Ya.cloneNode(!0),X=Ya.cloneNode(!0),ba=Ya.cloneNode(!0);Ya.style.textAlign="right";P.style.textAlign="right";mxUtils.write(Ya,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";x.appendChild(W);F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsAcross"));
+O.appendChild(F);mxUtils.write(P,mxResources.get("fitToBy"));var ea=W.cloneNode(!0);X.appendChild(ea);mxEvent.addListener(W,"focus",function(){Na.checked=!0});mxEvent.addListener(ea,"focus",function(){Na.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));ba.appendChild(F);wa.appendChild(Ya);wa.appendChild(x);wa.appendChild(O);ab.appendChild(P);ab.appendChild(X);ab.appendChild(ba);Ia.appendChild(wa);Ia.appendChild(ab);ya.appendChild(Ia);fa.appendChild(ya);
+da.appendChild(fa);fa=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));fa.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var ta=PageSetupDialog.addPageFormatPanel(F,"printdialog",q.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(F);F=document.createElement("span");mxUtils.write(F,mxResources.get("pageScale"));fa.appendChild(F);var qa=
+document.createElement("input");qa.style.cssText="margin:0 8px 0 8px;";qa.setAttribute("value","100 %");qa.style.width="60px";fa.appendChild(qa);da.appendChild(fa);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){q.hideDialog()});fa.className="geBtn";q.editor.cancelFirst&&F.appendChild(fa);q.isOffline()||(ya=mxUtils.button(mxResources.get("help"),function(){U.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+ya.className="geBtn",F.appendChild(ya));PrintDialog.previewEnabled&&(ya=mxUtils.button(mxResources.get("preview"),function(){q.hideDialog();aa(!1)}),ya.className="geBtn",F.appendChild(ya));ya=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){q.hideDialog();aa(!0)});ya.className="geBtn gePrimaryBtn";F.appendChild(ya);q.editor.cancelFirst||F.appendChild(fa);da.appendChild(F);this.container=da};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=
function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var q=this.image;null!=q&&null!=q.src&&Graph.isPageLink(q.src)&&(q={originalSrc:q.src});this.page.viewState.backgroundImage=q}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else Y.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var Z=document.createElement("canvas"),la=new Image;la.onload=function(){try{Z.getContext("2d").drawImage(la,
0,0);var q=Z.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=q&&6<q.length}catch(F){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(q){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);null!=l.mathEnabled&&(l.mathEnabled=!l.mathEnabled);null!=l.shadowVisible&&(l.shadowVisible=!l.shadowVisible);return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.6";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.3.7";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,f,g,u,y,C,I){C=null!=C?C:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(e);(new Image).src=D+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=u?":colno:"+
-encodeURIComponent(u):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(N){}try{I||null==window.console||console.error(C,e,f,g,u,y)}catch(N){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(e,f,g,v,y,C,I){C=null!=C?C:0<=e.indexOf("NetworkError")||0<=e.indexOf("SecurityError")||0<=e.indexOf("NS_ERROR_FAILURE")||0<=e.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(e!=EditorUi.lastErrorMessage&&(null==e||null==f||-1==e.indexOf("Script error")&&-1==e.indexOf("extension"))&&null!=e&&0>e.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=e;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";y=null!=y?y:Error(e);(new Image).src=D+"/log?severity="+C+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(e)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
+encodeURIComponent(v):"")+(null!=y&&null!=y.stack?"&stack="+encodeURIComponent(y.stack):"")}}catch(N){}try{I||null==window.console||console.error(C,e,f,g,v,y)}catch(N){}};EditorUi.logEvent=function(e){if("1"==urlParams.dev)EditorUi.debug("logEvent",e);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=e?"&data="+encodeURIComponent(JSON.stringify(e)):"")}catch(g){}};EditorUi.sendReport=
function(e,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",e);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,e.length>f&&(e=e.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(e))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var e=[(new Date).toISOString()],f=0;f<arguments.length;f++)e.push(arguments[f]);console.log.apply(console,
e)}}catch(g){}};EditorUi.removeChildNodes=function(e){for(;null!=e.firstChild;)e.removeChild(e.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var e=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!e.getContext||!e.getContext("2d"))}catch(y){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var y=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(C){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var u=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==u.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(e,f,g){return this.editor.graph.openLink(e,f,g)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,g){localStorage.setItem(e,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=y&&6<y.length}catch(C){}};g.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(y){}try{f=document.createElement("canvas");f.width=f.height=1;var v=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==v.match("image/jpeg")}catch(y){}})();EditorUi.prototype.openLink=function(e,f,g){return this.editor.graph.openLink(e,f,g)};EditorUi.prototype.showSplash=function(e){};EditorUi.prototype.getLocalData=function(e,f){f(localStorage.getItem(e))};EditorUi.prototype.setLocalData=function(e,f,g){localStorage.setItem(e,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(e,f){localStorage.removeItem(e);f()};EditorUi.prototype.setShareCursorPosition=function(e){this.shareCursorPosition=
e;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(e){this.showRemoteCursors=e;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(e){this.editor.graph.mathEnabled=e;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=e;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(e){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(e){return this.isOfflineApp()||!navigator.onLine||!e&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(e,f,g){var u=null==e||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=y.spin;y.spin=function(D,N){var G=!1;this.active||(C.call(this,D),this.active=!0,null!=N&&(u&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(e,f,g){var v=null==e||null==f;g=null!=g?g:24;var y=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=y.spin;y.spin=function(D,N){var G=!1;this.active||(C.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,e=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,e)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var ha=function(){};this.active&&(ha=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ha}),G=!0);return G};var I=y.stop;y.stop=function(){I.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
-return y};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(u){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=N.substring(N.length-3,N.length)&&"!"!=N.charAt(N.length-1)&&(N+="..."),G.innerHTML=N,D.appendChild(G),y.status=G),this.pause=mxUtils.bind(this,function(){var ia=function(){};this.active&&(ia=mxUtils.bind(this,function(){this.spin(D,N)}));this.stop();return ia}),G=!0);return G};var I=y.stop;y.stop=function(){I.call(this);this.active=!1;null!=y.status&&null!=y.status.parentNode&&y.status.parentNode.removeChild(y.status);y.status=null};y.pause=function(){return function(){}};
+return y};EditorUi.prototype.isCompatibleString=function(e){try{var f=mxUtils.parseXml(e),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&
3==e.charCodeAt(2)&&4==e.charCodeAt(3)||80==e.charCodeAt(0)&&75==e.charCodeAt(1)&&3==e.charCodeAt(2)&&6==e.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(e){return 8<e.length&&(208==e.charCodeAt(0)&&207==e.charCodeAt(1)&&17==e.charCodeAt(2)&&224==e.charCodeAt(3)&&161==e.charCodeAt(4)&&177==e.charCodeAt(5)&&26==e.charCodeAt(6)&&225==e.charCodeAt(7)||60==e.charCodeAt(0)&&63==e.charCodeAt(1)&&120==e.charCodeAt(2)&&109==e.charCodeAt(3)&&108==e.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,u=this.editor.graph,y=this;f.getFunction=function(C){if(u.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var I=y.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&y.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&y.movePage(I,0)};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,
+EditorUi.prototype.createKeyHandler=function(e){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,y=this;f.getFunction=function(C){if(v.isSelectionEmpty()&&null!=y.pages&&0<y.pages.length){var I=y.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<I&&y.movePage(I,I-1)};if(38==C.keyCode)return function(){0<I&&y.movePage(I,0)};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,
I+1)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.movePage(I,y.pages.length-1)}}else if(mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)){if(37==C.keyCode)return function(){0<I&&y.selectNextPage(!1)};if(38==C.keyCode)return function(){0<I&&y.selectPage(y.pages[0])};if(39==C.keyCode)return function(){I<y.pages.length-1&&y.selectNextPage(!0)};if(40==C.keyCode)return function(){I<y.pages.length-1&&y.selectPage(y.pages[y.pages.length-1])}}}return!(65<=C.keyCode&&90>=C.keyCode)||
-u.isSelectionEmpty()||mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?g.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var g=e.indexOf("&lt;mxfile ");if(0<=g){var u=e.lastIndexOf("&lt;/mxfile&gt;");u>g&&(f=e.substring(g,u+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+v.isSelectionEmpty()||mxEvent.isAltDown(C)||mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMetaDown(C)?g.apply(this,arguments):null}}return f};var d=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(e){var f=d.apply(this,arguments);if(null==f)try{var g=e.indexOf("&lt;mxfile ");if(0<=g){var v=e.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=e.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
""))}else{var y=mxUtils.parseXml(e),C=this.editor.extractGraphModel(y.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(e){if(null!=e&&0<e.length){var f=e.indexOf('<meta charset="utf-8">');0<=f&&(e=e.slice(0,f)+'<meta charset="utf-8"/>'+e.slice(f+23-1,e.length));e=Graph.zapGremlins(e)}return e};EditorUi.prototype.replaceFileData=function(e){e=this.validateFileData(e);
-e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,u=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<u.length||1==u.length&&u[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var y=u.length-1;0<=y;y--){var C=this.updatePageRoot(new DiagramPage(u[y]));null==C.getName()&&
+e=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:null;var f=null!=e?this.editor.extractGraphModel(e,!0):null;null!=f&&(e=f);if(null!=e){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=e.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=e;this.pages=null!=this.pages?this.pages:[];for(var y=v.length-1;0<=y;y--){var C=this.updatePageRoot(new DiagramPage(v[y]));null==C.getName()&&
C.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,C,0==y?C:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(e),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
-if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,g,u,y,C,I,D,N,G,ha){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=u;if(null==e)return"";var ca=e;if("mxfile"!=ca.nodeName.toLowerCase()){if(ha){var pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
+if(null!=g)for(y=0;y<g.length;y++)f.model.execute(new ChangePage(this,g[y],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(e,f,g,v,y,C,I,D,N,G,ia){f=null!=f?f:this.editor.graph;y=null!=y?y:!1;N=null!=N?N:!0;var ka=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ja="_blank";else ka=ja=v;if(null==e)return"";var ca=e;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
pa.appendChild(e)}else{pa=Graph.zapGremlins(mxUtils.getXml(e));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=e.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=e.ownerDocument.createElement("mxfile");ca.appendChild(pa)}G?(ca=ca.cloneNode(!0),ca.removeAttribute("modified"),ca.removeAttribute("host"),ca.removeAttribute("agent"),ca.removeAttribute("etag"),ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),
ca.removeAttribute("type")):(ca.removeAttribute("userAgent"),ca.removeAttribute("version"),ca.removeAttribute("editor"),ca.removeAttribute("pages"),ca.removeAttribute("type"),mxClient.IS_CHROMEAPP?ca.setAttribute("host","Chrome"):EditorUi.isElectronApp?ca.setAttribute("host","Electron"):ca.setAttribute("host",window.location.hostname),ca.setAttribute("modified",(new Date).toISOString()),ca.setAttribute("agent",navigator.appVersion),ca.setAttribute("version",EditorUi.VERSION),ca.setAttribute("etag",
-Editor.guid()),e=null!=g?g.getMode():this.mode,null!=e&&ca.setAttribute("type",e),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ha=ha?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!C&&!y&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ha=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(C||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(u=null),
-ha=this.getEmbeddedSvg(ha,f,u,null,D,N,ka);return ha};EditorUi.prototype.getXmlFileData=function(e,f,g,u){e=null!=e?e:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(e,u);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
+Editor.guid()),e=null!=g?g.getMode():this.mode,null!=e&&ca.setAttribute("type",e),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!C&&!y&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(C||!y&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(v=null),
+ia=this.getEmbeddedSvg(ia,f,v,null,D,N,ka);return ia};EditorUi.prototype.getXmlFileData=function(e,f,g,v){e=null!=e?e:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var y=this.editor.getGraphXml(e,v);if(e&&null!=this.fileNode&&null!=this.currentPage)if(e=function(N){var G=N.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(N)),N=N.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&N.appendChild(mxUtils.parseXml(G).documentElement))):
null==G||g?N=N.cloneNode(!0):(N=N.cloneNode(!1),mxUtils.setTextContent(N,Graph.compressNode(G)));y.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(y)),y=this.fileNode.cloneNode(!1),f)e(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],I=C.node;if(C!=this.currentPage)if(C.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,
-D,null,u);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete C.needsUpdate}else u&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&
-null!=C.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,D,null,u),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));e(I)}return y};EditorUi.prototype.anonymizeString=function(e,f){for(var g=[],u=0;u<e.length;u++){var y=e.charAt(u);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
+D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete C.needsUpdate}else v&&(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&
+null!=C.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(C.root)),this.editor.graph.saveViewState(C.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));e(I)}return y};EditorUi.prototype.anonymizeString=function(e,f){for(var g=[],v=0;v<e.length;v++){var y=e.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(y)?g.push(y):isNaN(parseInt(y))?y.toLowerCase()!=y?g.push(String.fromCharCode(65+Math.round(25*
Math.random()))):y.toUpperCase()!=y?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(y)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(e){if(null!=e[EditorUi.DIFF_INSERT])for(var f=0;f<e[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(e[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
-e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(C){e[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var u in e[EditorUi.DIFF_UPDATE]){var y=e[EditorUi.DIFF_UPDATE][u];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(C){var I=y.cells[C];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
-"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete y.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete e[EditorUi.DIFF_UPDATE][u]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var g=0;g<e.attributes.length;g++)"as"!=e.attributes[g].name&&
+e[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(C){e[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=e[EditorUi.DIFF_UPDATE]){for(var v in e[EditorUi.DIFF_UPDATE]){var y=e[EditorUi.DIFF_UPDATE][v];null!=y.name&&(y.name=this.anonymizeString(y.name));null!=y.cells&&(f=mxUtils.bind(this,function(C){var I=y.cells[C];if(null!=I){for(var D in I)null!=I[D].value&&(I[D].value="["+I[D].value.length+"]"),null!=I[D].xmlValue&&(I[D].xmlValue="["+I[D].xmlValue.length+"]"),null!=I[D].style&&(I[D].style=
+"["+I[D].style.length+"]"),mxUtils.isEmptyObject(I[D])&&delete I[D];mxUtils.isEmptyObject(I)&&delete y.cells[C]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(y.cells)&&delete y.cells);mxUtils.isEmptyObject(y)&&delete e[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(e[EditorUi.DIFF_UPDATE])&&delete e[EditorUi.DIFF_UPDATE]}return e};EditorUi.prototype.anonymizeAttributes=function(e,f){if(null!=e.attributes)for(var g=0;g<e.attributes.length;g++)"as"!=e.attributes[g].name&&
e.setAttribute(e.attributes[g].name,this.anonymizeString(e.attributes[g].value,f));if(null!=e.childNodes)for(g=0;g<e.childNodes.length;g++)this.anonymizeAttributes(e.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(e,f){f=e.getElementsByTagName("mxCell");for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+
"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],f[g].parentNode));return e};EditorUi.prototype.synchronizeCurrentFile=function(e){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!e&&f.invalidChecksum?
-f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(e,f,g,u,y,C,I,
-D,N,G,ha){y=null!=y?y:!0;C=null!=C?C:!1;var ka=this.editor.graph;if(f||!e&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
-null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(qa){return"page"==qa?pa.getName():"pagenumber"==qa?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(y,C,G,ha);N=null!=N?N:this.getCurrentFile();e=this.createFileData(I,ka,N,window.location.href,e,f,g,u,y,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return e};EditorUi.prototype.getHtml=
-function(e,f,g,u,y,C){C=null!=C?C:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;C=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",C);e.setAttribute("y0",N)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
-"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=u&&e.setAttribute("edit",u));null!=y&&(y=y.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";u=Graph.compress(e);Graph.decompress(u)!=e&&(u=encodeURIComponent(e));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
-"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+u+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
-y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,g,u,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),e?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(e,f,g,v,y,C,I,
+D,N,G,ia){y=null!=y?y:!0;C=null!=C?C:!1;var ka=this.editor.graph;if(f||!e&&null!=N&&/(\.svg)$/i.test(N.getTitle())){var ja=null!=ka.themes&&"darkTheme"==ka.defaultThemeName;G=!1;if(ja||null!=this.pages&&this.currentPage!=this.pages[0]){var ca=ka.getGlobalVariable;ka=this.createTemporaryGraph(ja?ka.getDefaultStylesheet():ka.getStylesheet());ka.setBackgroundImage=this.editor.graph.setBackgroundImage;ka.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ka.setBackgroundImage(this.editor.graph.backgroundImage):
+null!=pa.viewState&&null!=pa.viewState&&ka.setBackgroundImage(pa.viewState.backgroundImage);ka.getGlobalVariable=function(ra){return"page"==ra?pa.getName():"pagenumber"==ra?1:ca.apply(this,arguments)};document.body.appendChild(ka.container);ka.model.setRoot(pa.root)}}I=null!=I?I:this.getXmlFileData(y,C,G,ia);N=null!=N?N:this.getCurrentFile();e=this.createFileData(I,ka,N,window.location.href,e,f,g,v,y,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return e};EditorUi.prototype.getHtml=
+function(e,f,g,v,y,C){C=null!=C?C:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;C=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==y&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));e.setAttribute("x0",C);e.setAttribute("y0",N)}null!=e&&(e.setAttribute("pan","1"),e.setAttribute("zoom","1"),e.setAttribute("resize",
+"0"),e.setAttribute("fit","0"),e.setAttribute("border","20"),e.setAttribute("links","1"),null!=v&&e.setAttribute("edit",v));null!=y&&(y=y.replace(/&/g,"&amp;"));e=null!=e?Graph.zapGremlins(mxUtils.getXml(e)):"";v=Graph.compress(e);Graph.decompress(v)!=e&&(v=encodeURIComponent(e));return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+"</head>\n<body"+(null==y&&null!=I&&I!=mxConstants.NONE?' style="background-color:'+I+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+(null==y?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(e,f,g,v,y){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=y&&(y=y.replace(/&/g,"&amp;"));e={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(e),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage));
return(null==y?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=y?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==y?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=y?'<meta http-equiv="refresh" content="0;URL=\''+y+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
mxUtils.htmlEntities(JSON.stringify(e))+'"></div>\n'+(null==y?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+y+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(e){e=this.validateFileData(e);this.pages=this.fileNode=this.currentPage=null;var f=null!=e&&0<e.length?mxUtils.parseXml(e).documentElement:
-null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var u=0;u<e.length;u++)null==
-e[u].getAttribute("id")&&e[u].setAttribute("id",u),f=new DiagramPage(e[u]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[u+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
-this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(u=0;u<y.length;u++)f[y[u]]=!0;var C=this.editor.graph.getModel(),I=C.getChildren(C.root);for(u=0;u<I.length;u++){var D=I[u];C.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(e){var f=
+null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[e],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");e=null!=f?this.editor.extractGraphModel(f,!0):null;null!=e&&(f=e);if(null!=f&&"mxfile"==f.nodeName&&(e=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<e.length||1==e.length&&e[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<e.length;v++)null==
+e[v].getAttribute("id")&&e[v].setAttribute("id",v),f=new DiagramPage(e[v]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[v+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),
+this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var y=urlParams["layer-ids"].split(" ");f={};for(v=0;v<y.length;v++)f[y[v]]=!0;var C=this.editor.graph.getModel(),I=C.getChildren(C.root);for(v=0;v<I.length;v++){var D=I[v];C.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(e){var f=
this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!e&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=
-function(e,f,g,u,y,C,I,D,N,G,ha,ka){try{u=null!=u?u:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!y),ca=ja+("xml"==e||"pdf"==e&&ha?".drawio":"")+"."+e;if("xml"==e){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,u,y,null,null,null,f);this.saveData(ca,e,pa,"text/xml")}else if("html"==e)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,e,pa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
-mxResources.get("export"))){if("xmlpng"==e)ca=ja+".png";else if("jpeg"==e)ca=ja+".jpg";else if("remoteSvg"==e){ca=ja+".svg";e="svg";var qa=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<qa){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*qa);var Y=Math.ceil(V.height*D/L.view.scale+2*qa)}}this.saveRequest(ca,e,mxUtils.bind(this,function(T,ba){try{var U=this.editor.graph.pageVisible;0==C&&(this.editor.graph.pageVisible=C);var da=this.createDownloadRequest(T,
-e,u,ba,I,y,D,N,G,ha,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,u);g&&
-this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),u)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(e,f,g,u,y,C,I,D,N,G,ha,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
-null,g,0==C?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var qa="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ha?L="&from="+ha.from+"&to="+ha.to:0==C&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){qa="&from="+C;break}C=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?
-y||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;y={globalVars:ca.getExportVariables()};N&&(y.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+qa+L+"&bg="+(null!=C?C:mxConstants.NONE)+"&base64="+u+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=I?
-"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,g){var u=window.location.hash,y=mxUtils.bind(this,function(I){var D=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=e.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
-I.getHash=function(){return u};this.fileLoaded(I);"csv"==e.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var N=null!=e.interval?parseInt(e.interval):6E4,G=null,ha=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
-300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ha,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ha()}));ka();ha()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var C=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){y(I)}),
-mxUtils.bind(this,function(I){null!=g&&g(I)}))}else y("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var Z=new mxCellOverlay(Y.image||y.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){u.alert(Y.tooltip)});return Z}var g=null,u=this;if(null!=e&&0<e.length&&(g=mxUtils.parseXml(e),e=null!=g?g.documentElement:null,null!=e&&"updates"==e.nodeName)){var y=this.editor.graph,C=y.getModel();C.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
-e;){if("update"==e.nodeName){var D=C.getCell(e.getAttribute("id"));if(null!=D){try{var N=e.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))C.setValue(D,G);else for(var ha=G.attributes,ka=0;ka<ha.length;ka++)y.setAttributeForCell(D,ha[ka].nodeName,0<ha[ka].nodeValue.length?ha[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&y.model.setStyle(D,
-ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=e.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||y.removeCellOverlays(D);null!=pa&&y.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var qa=e.getAttribute("geometry");if(null!=qa){qa=JSON.parse(qa);var L=y.getCellGeometry(D);if(null!=L){L=L.clone();for(key in qa){var V=parseFloat(qa[key]);"dx"==key?L.x+=
-V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(qa[key])}y.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==e.nodeName){for(var R=e.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(e.firstChild)).decode(R,C)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(y.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))y.view.translate=
-new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(e,f){var g=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var u=g.lastIndexOf(".");0<=u&&(e=g.substring(u),g=g.substring(0,u));if(f){f=g;var y=new Date;
-g=y.getFullYear();u=y.getMonth()+1;var C=y.getDate(),I=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+u+"-"+C+"-"+I+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+e};EditorUi.prototype.fileLoaded=function(e,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var u=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
+function(e,f,g,v,y,C,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==e?!1:!y),ca=ja+("xml"==e||"pdf"==e&&ia?".drawio":"")+"."+e;if("xml"==e){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,y,null,null,null,f);this.saveData(ca,e,pa,"text/xml")}else if("html"==e)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,e,pa,"text/html");else if("svg"!=e&&"xmlsvg"!=e||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==e)ca=ja+".png";else if("jpeg"==e)ca=ja+".jpg";else if("remoteSvg"==e){ca=ja+".svg";e="svg";var ra=parseInt(N);"string"===typeof D&&0<D.indexOf("%")&&(D=parseInt(D)/100);if(0<ra){var L=this.editor.graph,V=L.getGraphBounds();var R=Math.ceil(V.width*D/L.view.scale+2*ra);var Y=Math.ceil(V.height*D/L.view.scale+2*ra)}}this.saveRequest(ca,e,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==C&&(this.editor.graph.pageVisible=C);var da=this.createDownloadRequest(T,
+e,v,aa,I,y,D,N,G,ia,ka,R,Y);this.editor.graph.pageVisible=U;return da}catch(fa){this.handleError(fa)}}))}else{var Z=null,la=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(ca,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==e){var q=this.editor.graph.background;if(I||q==mxConstants.NONE)q=null;var F=this.editor.graph.getSvg(q,null,null,null,null,v);g&&
+this.editor.graph.addSvgShadow(F);this.editor.convertImages(F,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();la(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else ca=ja+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();la(T)}),v)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
+null,g,0==C?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var ra="",L="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=ia?L="&from="+ia.from+"&to="+ia.to:0==C&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){ra="&from="+C;break}C=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!y?
+y||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;y={globalVars:ca.getExportVariables()};N&&(y.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(y.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=C?C:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=e?"&filename="+encodeURIComponent(e):"")+"&extras="+encodeURIComponent(JSON.stringify(y))+(null!=I?
+"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(e,f){this.mode=e};EditorUi.prototype.loadDescriptor=function(e,f,g){var v=window.location.hash,y=mxUtils.bind(this,function(I){var D=null!=e.data?e.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=e.format&&0<D.length?D:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);
+I.getHash=function(){return v};this.fileLoaded(I);"csv"==e.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=e.update){var N=null!=e.interval?parseInt(e.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(e.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(ca){ja===this.currentPage&&(200<=ca.getStatus()&&
+300>=ca.getStatus()?(this.updateDiagram(ca.getText()),ka()):this.handleError({message:mxResources.get("error")+" "+ca.getStatus()}))}),mxUtils.bind(this,function(ca){this.handleError(ca)}))}),ka=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(ia,N)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){ka();ia()}));ka();ia()}null!=f&&f()});if(null!=e.url&&0<e.url.length){var C=this.editor.getProxiedUrl(e.url);this.editor.loadUrl(C,mxUtils.bind(this,function(I){y(I)}),
+mxUtils.bind(this,function(I){null!=g&&g(I)}))}else y("")};EditorUi.prototype.updateDiagram=function(e){function f(Y){var Z=new mxCellOverlay(Y.image||y.warningImage,Y.tooltip,Y.align,Y.valign,Y.offset);Z.addListener(mxEvent.CLICK,function(la,q){v.alert(Y.tooltip)});return Z}var g=null,v=this;if(null!=e&&0<e.length&&(g=mxUtils.parseXml(e),e=null!=g?g.documentElement:null,null!=e&&"updates"==e.nodeName)){var y=this.editor.graph,C=y.getModel();C.beginUpdate();var I=null;try{for(e=e.firstChild;null!=
+e;){if("update"==e.nodeName){var D=C.getCell(e.getAttribute("id"));if(null!=D){try{var N=e.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))C.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)y.setAttributeForCell(D,ia[ka].nodeName,0<ia[ka].nodeValue.length?ia[ka].nodeValue:null)}}catch(Y){null!=window.console&&console.log("Error in value for "+D.id+": "+Y)}try{var ja=e.getAttribute("style");null!=ja&&y.model.setStyle(D,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=e.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||y.removeCellOverlays(D);null!=pa&&y.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=e.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=y.getCellGeometry(D);if(null!=L){L=L.clone();for(key in ra){var V=parseFloat(ra[key]);"dx"==key?L.x+=
+V:"dy"==key?L.y+=V:"dw"==key?L.width+=V:"dh"==key?L.height+=V:L[key]=parseFloat(ra[key])}y.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==e.nodeName){for(var R=e.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(e.firstChild)).decode(R,C)}else if("view"==e.nodeName){if(e.hasAttribute("scale")&&(y.view.scale=parseFloat(e.getAttribute("scale"))),e.hasAttribute("dx")||e.hasAttribute("dy"))y.view.translate=
+new mxPoint(parseFloat(e.getAttribute("dx")||0),parseFloat(e.getAttribute("dy")||0))}else"fit"==e.nodeName&&(I=e.hasAttribute("max-scale")?parseFloat(e.getAttribute("max-scale")):1);e=e.nextSibling}}finally{C.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(e,f){var g=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;e="";var v=g.lastIndexOf(".");0<=v&&(e=g.substring(v),g=g.substring(0,v));if(f){f=g;var y=new Date;
+g=y.getFullYear();v=y.getMonth()+1;var C=y.getDate(),I=y.getHours(),D=y.getMinutes();y=y.getSeconds();g=f+(" "+(g+"-"+v+"-"+C+"-"+I+"-"+D+"-"+y))}return g=mxResources.get("copyOf",[g])+e};EditorUi.prototype.fileLoaded=function(e,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var v=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
var y=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
if(null!=e)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(e);e.addListener("descriptorChanged",this.descriptorChangedListener);e.addListener("contentChanged",this.descriptorChangedListener);e.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(e.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();e.isEditable()?e.isModified()?(e.addUnsavedStatus(),
null!=e.backupPatch&&e.patch([e.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));
-u=!0;if(!this.isOffline()&&null!=e.getMode()){var C="1"==urlParams.sketch?"sketch":uiTheme;if(null==C)C="default";else if("sketch"==C||"min"==C)C+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+C})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+v=!0;if(!this.isOffline()&&null!=e.getMode()){var C="1"==urlParams.sketch?"sketch":uiTheme;if(null==C)C="default";else if("sketch"==C||"min"==C)C+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:e.getMode().toUpperCase()+"-OPEN-FILE-"+e.getHash(),action:"size_"+e.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+C})}EditorUi.debug("File.opened",[e]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
e.getMode()&&e.getMode()!=App.MODE_DEVICE&&null!=e.getMode())try{this.addRecent({id:e.getHash(),title:e.getTitle(),mode:e.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=e)try{e.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=e?e.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}e=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else y();return u};EditorUi.prototype.getHashValueForPages=function(e,f){var g=0,u=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<e.length;C++){this.updatePageRoot(e[C]);var I=
-e[C].node.cloneNode(!1);I.removeAttribute("name");u.root=e[C].root;var D=y.encode(u);this.editor.graph.saveViewState(e[C].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ha,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
-"previous"==G?null:ha:Math.round(ha)},f)<<0}return g};EditorUi.prototype.hashValue=function(e,f,g){var u=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(u^=this.hashValue(e.nodeName,f,g));if(null!=e.attributes){null!=g&&(g.attrCount+=e.attributes.length);for(var y=0;y<e.attributes.length;y++){var C=e.attributes[y].name,I=null!=f?f(e,C,e.attributes[y].value,!0):e.attributes[y].value;null!=I&&(u^=this.hashValue(C,
-f,g)+this.hashValue(I,f,g))}}if(null!=e.childNodes)for(y=0;y<e.childNodes.length;y++)u=(u<<5)-u+this.hashValue(e.childNodes[y],f,g)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=g&&(g.byteCount+=e.length);for(y=0;y<e.length;y++)f=(f<<5)-f+e.charCodeAt(y)<<0;u^=f}return u};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,g,u,y,C,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||y():y()});f?e():this.handleError(I,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else y();return v};EditorUi.prototype.getHashValueForPages=function(e,f){var g=0,v=new mxGraphModel,y=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<e.length;C++){this.updatePageRoot(e[C]);var I=
+e[C].node.cloneNode(!1);I.removeAttribute("name");v.root=e[C].root;var D=y.encode(v);this.editor.graph.saveViewState(e[C].viewState,D,!0);D.removeAttribute("pageWidth");D.removeAttribute("pageHeight");I.appendChild(D);null!=f&&(f.eltCount+=I.getElementsByTagName("*").length,f.nodeCount+=I.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(I,function(N,G,ia,ka){return!ka||"mxGeometry"!=N.nodeName&&"mxPoint"!=N.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ka&&"mxCell"==N.nodeName&&
+"previous"==G?null:ia:Math.round(ia)},f)<<0}return g};EditorUi.prototype.hashValue=function(e,f,g){var v=0;if(null!=e&&"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName&&"function"===typeof e.getAttribute){null!=e.nodeName&&(v^=this.hashValue(e.nodeName,f,g));if(null!=e.attributes){null!=g&&(g.attrCount+=e.attributes.length);for(var y=0;y<e.attributes.length;y++){var C=e.attributes[y].name,I=null!=f?f(e,C,e.attributes[y].value,!0):e.attributes[y].value;null!=I&&(v^=this.hashValue(C,
+f,g)+this.hashValue(I,f,g))}}if(null!=e.childNodes)for(y=0;y<e.childNodes.length;y++)v=(v<<5)-v+this.hashValue(e.childNodes[y],f,g)<<0}else if(null!=e&&"function"!==typeof e){e=String(e);f=0;null!=g&&(g.byteCount+=e.length);for(y=0;y<e.length;y++)f=(f<<5)-f+e.charCodeAt(y)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(e,f,g,v,y,C,I){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(e){null==e&&(e=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,e,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(e){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(e));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(e){null!=e&&(this.removeLibrarySidebar(e.getHash()),e.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(e.getHash()),".scratchpad"==e.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(e){var f=this.sidebar.palettes[e];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[e]}};EditorUi.prototype.repositionLibrary=function(e){var f=this.sidebar.container;
-if(null==e){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(e=g[g.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var u=g.previousSibling;f.insertBefore(g,e);f.insertBefore(u,g)};EditorUi.prototype.loadLibrary=function(e,f){var g=mxUtils.parseXml(e.getData());if("mxlibrary"==g.documentElement.nodeName){var u=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(e,u,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,g,u){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var y=this.sidebar.palettes[e.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var C=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&e.isEditable()?
-(null==C&&(C=document.createElement("div"),C.className="geDropTarget",mxUtils.write(C,mxResources.get("dragElementsHere"))),Y.appendChild(C)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=e.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(e.getHash(),g,null!=u?u:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(y);var N=D.parentNode.previousSibling;u=N.getAttribute("title");
-null!=u&&0<u.length&&".scratchpad"!=e.title&&N.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+u);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ha=document.createElement("img");ha.className="geAdaptiveAsset";ha.setAttribute("src",Editor.crossImage);ha.setAttribute("title",mxResources.get("close"));ha.setAttribute("valign","absmiddle");ha.setAttribute("border",
-"0");ha.style.position="relative";ha.style.top="2px";ha.style.width="14px";ha.style.cursor="pointer";ha.style.margin="0 3px";var ka=null;if(".scratchpad"!=e.title||this.closableScratchpad)G.appendChild(ha),mxEvent.addListener(ha,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
-if(e.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(e.getTitle(),D,f,e,e.getMode());mxEvent.consume(R)}),qa=mxUtils.bind(this,function(R){e.setModified(!0);e.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ha.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
-N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ha.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
+if(null==e){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(e=g[g.length-1].nextSibling)}e=null!=e?e:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,e);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(e,f){var g=mxUtils.parseXml(e.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(e,v,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(e){return""};EditorUi.prototype.libraryLoaded=function(e,f,g,v){if(null!=this.sidebar){e.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(e.getHash());".scratchpad"==e.title&&(this.scratchpad=e);var y=this.sidebar.palettes[e.getHash()];y=null!=y?y[y.length-1].nextSibling:null;this.removeLibrarySidebar(e.getHash());var C=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&e.isEditable()?
+(null==C&&(C=document.createElement("div"),C.className="geDropTarget",mxUtils.write(C,mxResources.get("dragElementsHere"))),Y.appendChild(C)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=e.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(e.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(y);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
+null!=v&&0<v.length&&".scratchpad"!=e.title&&N.setAttribute("title",this.getLibraryStorageHint(e)+"\n"+v);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";N.style.position="relative";var ia=document.createElement("img");ia.className="geAdaptiveAsset";ia.setAttribute("src",Editor.crossImage);ia.setAttribute("title",mxResources.get("close"));ia.setAttribute("valign","absmiddle");ia.setAttribute("border",
+"0");ia.style.position="relative";ia.style.top="2px";ia.style.width="14px";ia.style.cursor="pointer";ia.style.margin="0 3px";var ka=null;if(".scratchpad"!=e.title||this.closableScratchpad)G.appendChild(ia),mxEvent.addListener(ia,"click",mxUtils.bind(this,function(R){if(!mxEvent.isConsumed(R)){var Y=mxUtils.bind(this,function(){this.closeLibrary(e)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
+if(e.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(e.getTitle(),D,f,e,e.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){e.setModified(!0);e.isAutosave()?(null!=ca&&null!=ca.parentNode&&ca.parentNode.removeChild(ca),ca=ia.cloneNode(!1),ca.setAttribute("src",Editor.spinImage),ca.setAttribute("title",mxResources.get("saving")),ca.style.cursor="default",ca.style.marginRight="2px",ca.style.marginTop="-2px",G.insertBefore(ca,G.firstChild),
+N.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(e.getTitle(),f,e,e.getMode(),!0,!0,function(){null!=ca&&null!=ca.parentNode&&(ca.parentNode.removeChild(ca),N.style.paddingRight=18*G.childNodes.length+"px")})):null==ka&&(ka=ia.cloneNode(!1),ka.setAttribute("src",Editor.saveImage),ka.setAttribute("title",mxResources.get("save")),G.insertBefore(ka,G.firstChild),mxEvent.addListener(ka,"click",mxUtils.bind(this,function(Y){this.saveLibrary(e.getTitle(),f,e,e.getMode(),e.constructor==
LocalLibrary,!0,function(){null==ka||e.isModified()||(N.style.paddingRight=18*G.childNodes.length+"px",ka.parentNode.removeChild(ka),ka=null)});mxEvent.consume(Y)})),N.style.paddingRight=18*G.childNodes.length+"px")}),L=mxUtils.bind(this,function(R,Y,Z,la){R=ja.cloneCells(mxUtils.sortCells(ja.model.getTopmostCells(R)));for(var q=0;q<R.length;q++){var F=ja.getCellGeometry(R[q]);null!=F&&F.translate(-Y.x,-Y.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(R,Y.width,Y.height,la||"",!0,null,
-!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);qa(Z);null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
+!1));R={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(R))),w:Y.width,h:Y.height};null!=la&&(R.title=la);f.push(R);ra(Z);null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)}),V=mxUtils.bind(this,function(R){if(ja.isSelectionEmpty())ja.getRubberband().isActive()?(ja.getRubberband().execute(R),ja.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var Y=ja.getSelectionCells(),Z=ja.view.getBounds(Y),
la=ja.view.scale;Z.x/=la;Z.y/=la;Z.width/=la;Z.height/=la;Z.x-=ja.view.translate.x;Z.y-=ja.view.translate.y;L(Y,Z)}mxEvent.consume(R)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler.first&&(ja.graphHandler.suspend(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="#f1f3f4",D.style.cursor="copy",ja.panningManager.stop(),ja.autoScroll=!1,mxEvent.consume(R))}),
mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.panningManager&&null!=ja.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,ja.panningManager.stop(),ja.graphHandler.reset(),ja.isMouseDown=!1,ja.autoScroll=!0,V(R),mxEvent.consume(R))}));mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(R){ja.isMouseDown&&null!=ja.graphHandler.first&&(ja.graphHandler.resume(),null!=ja.graphHandler.hint&&(ja.graphHandler.hint.style.visibility="visible"),
D.style.backgroundColor="",D.style.cursor="",ja.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){D.style.backgroundColor="#f1f3f4";R.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();R.stopPropagation();R.preventDefault()})),mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){D.style.cursor="";D.style.backgroundColor="";0<R.dataTransfer.files.length&&this.importFiles(R.dataTransfer.files,0,0,this.maxImageSize,
-mxUtils.bind(this,function(Y,Z,la,q,F,T,ba,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
-za){null!=sa&&"application/pdf"==za&&(za=Editor.extractGraphModelFromPdf(sa),null!=za&&0<za.length&&(sa=za));if(null!=sa)if(sa=mxUtils.parseXml(sa),"mxlibrary"==sa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(sa.documentElement));I(ua,D);f=f.concat(ua);qa(R);this.spinner.stop();fa=!0}catch(ya){}else if("mxfile"==sa.documentElement.nodeName)try{var Ba=sa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<Ba.length;ua++){var oa=this.stringToCells(Editor.getDiagramNodeXml(Ba[ua])),
-Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)});null!=da&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,ba):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(Y,ba)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(sa){4==sa.readyState&&(this.spinner.stop(),200<=sa.status&&299>=sa.status?na(sa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==sa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,Z)}}));R.stopPropagation();R.preventDefault()})),
-mxEvent.addListener(D,"dragleave",function(R){D.style.cursor="";D.style.backgroundColor="";R.stopPropagation();R.preventDefault()}));ha=ha.cloneNode(!1);ha.setAttribute("src",Editor.editImage);ha.setAttribute("title",mxResources.get("edit"));G.insertBefore(ha,G.firstChild);mxEvent.addListener(ha,"click",pa);mxEvent.addListener(D,"dblclick",function(R){mxEvent.getSource(R)==D&&pa(R)});u=ha.cloneNode(!1);u.setAttribute("src",Editor.plusImage);u.setAttribute("title",mxResources.get("add"));G.insertBefore(u,
-G.firstChild);mxEvent.addListener(u,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(u=document.createElement("span"),u.setAttribute("title",mxResources.get("help")),u.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(u,"?"),mxEvent.addGestureListeners(u,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(u,G.firstChild))}N.appendChild(G);N.style.paddingRight=
-18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var g=0;g<e.length;g++){var u=e[g],y=u.data;if(null!=y){y=this.convertDataUri(y);var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==u.aspect&&(C+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(C+"image="+y,u.w,u.h,"",u.title||"",!1,null,!0))}else null!=u.xml&&(y=this.stringToCells(Graph.decompress(u.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,
-u.w,u.h,u.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground=
+mxUtils.bind(this,function(Y,Z,la,q,F,T,aa,U,da){if(null!=Y&&"image/"==Z.substring(0,6))Y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(Y),Y=[new mxCell("",new mxGeometry(0,0,F,T),Y)],Y[0].vertex=!0,L(Y,new mxRectangle(0,0,F,T),R,mxEvent.isAltDown(R)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null);else{var fa=!1,na=mxUtils.bind(this,function(sa,
+za){null!=sa&&"application/pdf"==za&&(za=Editor.extractGraphModelFromPdf(sa),null!=za&&0<za.length&&(sa=za));if(null!=sa)if(sa=mxUtils.parseXml(sa),"mxlibrary"==sa.documentElement.nodeName)try{var ua=JSON.parse(mxUtils.getTextContent(sa.documentElement));I(ua,D);f=f.concat(ua);ra(R);this.spinner.stop();fa=!0}catch(ya){}else if("mxfile"==sa.documentElement.nodeName)try{var Ba=sa.documentElement.getElementsByTagName("diagram");for(ua=0;ua<Ba.length;ua++){var oa=this.stringToCells(Editor.getDiagramNodeXml(Ba[ua])),
+Aa=this.editor.graph.getBoundingBoxFromGeometry(oa);L(oa,new mxRectangle(0,0,Aa.width,Aa.height),R)}fa=!0}catch(ya){null!=window.console&&console.log("error in drop handler:",ya)}fa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=C&&null!=C.parentNode&&0<f.length&&(C.parentNode.removeChild(C),C=null)});null!=da&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(da,function(sa){na(sa,"text/xml")},null,aa):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(Y,aa)&&null!=da?this.isExternalDataComms()?this.parseFile(da,mxUtils.bind(this,function(sa){4==sa.readyState&&(this.spinner.stop(),200<=sa.status&&299>=sa.status?na(sa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==sa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):na(Y,Z)}}));R.stopPropagation();R.preventDefault()})),
+mxEvent.addListener(D,"dragleave",function(R){D.style.cursor="";D.style.backgroundColor="";R.stopPropagation();R.preventDefault()}));ia=ia.cloneNode(!1);ia.setAttribute("src",Editor.editImage);ia.setAttribute("title",mxResources.get("edit"));G.insertBefore(ia,G.firstChild);mxEvent.addListener(ia,"click",pa);mxEvent.addListener(D,"dblclick",function(R){mxEvent.getSource(R)==D&&pa(R)});v=ia.cloneNode(!1);v.setAttribute("src",Editor.plusImage);v.setAttribute("title",mxResources.get("add"));G.insertBefore(v,
+G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=e.title||null==EditorUi.scratchpadHelpLink||(v=document.createElement("span"),v.setAttribute("title",mxResources.get("help")),v.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(v,"?"),mxEvent.addGestureListeners(v,mxUtils.bind(this,function(R){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(R)})),G.insertBefore(v,G.firstChild))}N.appendChild(G);N.style.paddingRight=
+18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(e,f){for(var g=0;g<e.length;g++){var v=e[g],y=v.data;if(null!=y){y=this.convertDataUri(y);var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(C+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(C+"image="+y,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(y=this.stringToCells(Graph.decompress(v.xml)),0<y.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(y,
+v.w,v.h,v.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(e){return null!=e?e[mxLanguage]||e.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="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);"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",
-targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,g,u,y,C,I){e=new ImageDialog(this,e,f,g,u,y,C,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?
-200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(g,u){u||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,g,u,y){e=new LibraryDialog(this,e,f,g,u,y);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&
+targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(e,f,g,v,y,C,I){e=new ImageDialog(this,e,f,g,v,y,C,I);this.showDialog(e.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);e.init()};EditorUi.prototype.showBackgroundImageDialog=function(e,f){e=null!=e?e:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});e=new BackgroundImageDialog(this,e,f);this.showDialog(e.container,400,200,!0,!0);e.init()};EditorUi.prototype.showLibraryDialog=function(e,f,g,v,y){e=new LibraryDialog(this,e,f,g,v,y);this.showDialog(e.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&
"1"!=urlParams.embed&&this.showSplash()}));e.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(e){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var e=this.createDiv("geSidebarContainer geSidebarFooter");e.style.position="absolute";e.style.overflow="hidden";var f=document.createElement("a");
-f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(u){u.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(u){this.actions.get("shapes").funct();
-mxEvent.consume(u)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,g,u,y,C,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(ca){}if(null!=
-N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ha=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ha=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(v){v.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(v){this.actions.get("shapes").funct();
+mxEvent.consume(v)}));e.appendChild(f);return e};EditorUi.prototype.handleError=function(e,f,g,v,y,C,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=e&&null!=e.error?e.error:e;if(null!=e&&("1"==urlParams.test||null!=e.stack)&&null!=e.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",e):EditorUi.logError("Caught: "+(""==e.message&&null!=e.name)?e.name:e.message,e.filename,e.lineNumber,e.columnNumber,e,"INFO")}catch(ca){}if(null!=
+N||null!=f){I=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),ia=null;f=null!=f?f:mxResources.get("error");if(null!=N){null!=N.retry&&(G=mxResources.get("cancel"),ia=function(){D();N.retry()});if(404==N.code||404==N.status||403==N.code){I=403==N.code?null!=N.message?mxUtils.htmlEntities(N.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=y?y:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=y?null:null!=C?C:window.location.hash;if(null!=ka&&("#G"==ka.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ka.substring(0,45))&&(null!=e&&null!=e.error&&(null!=e.error.errors&&0<e.error.errors.length&&"fileAccess"==e.error.errors[0].reason||null!=e.error.data&&0<e.error.data.length&&"fileAccess"==e.error.data[0].reason)||404==N.code||404==N.status)){ka="#U"==ka.substring(0,2)?ka.substring(45,ka.lastIndexOf("%26ex")):
-ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(e,f,g,u,y)}),ha,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
-"<"+pa[R].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=pa.length;V.appendChild(Y)}var pa=this.drive.getUsersList(),qa=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");qa.appendChild(L);var V=document.createElement("select");V.style.width="200px";ca();mxEvent.addListener(V,"change",mxUtils.bind(this,
-function(){var R=V.value,Y=pa.length!=R;Y&&this.drive.setUser(pa[R]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(pa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));qa.appendChild(V);qa=new CustomDialog(this,qa,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(qa.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
+ka.substring(2);this.showError(f,I,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ka);this.handleError(e,f,g,v,y)}),ia,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){V.innerText="";for(var R=0;R<pa.length;R++){var Y=document.createElement("option");mxUtils.write(Y,pa[R].displayName);Y.value=R;V.appendChild(Y);Y=document.createElement("option");Y.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(Y,
+"<"+pa[R].email+">");Y.setAttribute("disabled","disabled");V.appendChild(Y)}Y=document.createElement("option");mxUtils.write(Y,mxResources.get("addAccount"));Y.value=pa.length;V.appendChild(Y)}var pa=this.drive.getUsersList(),ra=document.createElement("div"),L=document.createElement("span");L.style.marginTop="6px";mxUtils.write(L,mxResources.get("changeUser")+": ");ra.appendChild(L);var V=document.createElement("select");V.style.width="200px";ca();mxEvent.addListener(V,"change",mxUtils.bind(this,
+function(){var R=V.value,Y=pa.length!=R;Y&&this.drive.setUser(pa[R]);this.drive.authorize(Y,mxUtils.bind(this,function(){Y||(pa=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ra.appendChild(V);ra=new CustomDialog(this,ra,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ra.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=
N.message?I=""==N.message&&null!=N.name?mxUtils.htmlEntities(N.name):mxUtils.htmlEntities(N.message):null!=N.response&&null!=N.response.error?I=mxUtils.htmlEntities(N.response.error):"undefined"!==typeof window.App&&(N.code==App.ERROR_TIMEOUT?I=mxUtils.htmlEntities(mxResources.get("timeout")):N.code==App.ERROR_BUSY?I=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof N&&0<N.length&&(I=mxUtils.htmlEntities(N)))}var ja=C=null;null!=N&&null!=N.helpLink?(C=mxResources.get("help"),ja=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(C=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+C+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ha,null,null,C,ja,null,null,null,u?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(e,f,g){e=new ErrorDialog(this,null,e,mxResources.get("ok"),f);this.showDialog(e.container,g||340,100,!0,
-!1);e.init()};EditorUi.prototype.confirm=function(e,f,g,u,y,C){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=g&&g()},u,y,null,null,null,null,D);this.showDialog(e.container,340,46+D,!0,C);e.init()};EditorUi.prototype.showBanner=function(e,f,g,u){var y=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&
+function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(C=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+C+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,C,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(e,f,g){e=new ErrorDialog(this,null,e,mxResources.get("ok"),f);this.showDialog(e.container,g||340,100,!0,
+!1);e.init()};EditorUi.prototype.confirm=function(e,f,g,v,y,C){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(e.length/50));e=new ConfirmDialog(this,e,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,y,null,null,null,null,D);this.showDialog(e.container,340,46+D,!0,C);e.init()};EditorUi.prototype.showBanner=function(e,f,g,v){var y=!1;if(!(this.bannerShowing||this["hideBanner"+e]||isLocalStorage&&null!=mxSettings.settings&&
null!=mxSettings.settings["close"+e])){var C=document.createElement("div");C.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(C.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(C.style,"transition","all 1s ease");C.className="geBtn gePrimaryBtn";
-y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";C.appendChild(y);y=document.createElement("img");y.setAttribute("src",Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(u?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
-C.appendChild(y);mxUtils.write(C,f);document.body.appendChild(C);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!u){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
-C.style.paddingBottom="30px";C.appendChild(f)}var N=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,I.checked||u)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(ha){mxEvent.consume(ha);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){N()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(ha){var ka=mxEvent.getSource(ha);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ha)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
-function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,g,u){e=e.toDataURL("image/"+g);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<u&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",u));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,g,u,y){var C="jpeg"==g?"jpg":g;u=this.getBaseFilename(u)+(null!=f?".drawio":"")+"."+C;e=this.createImageDataUri(e,
-f,g,y);this.saveData(u,C,e.substring(e.lastIndexOf(",")+1),"image/"+g,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
-!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,g,u,y,C){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=u?this.base64ToBlob(e,g):new Blob([e],{type:g}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(e,!0):(g.document.write(e),
-g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,g,u);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(D?parseInt(D[2],10):
-!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(u?this.base64ToBlob(e,g):new Blob([e],{type:g}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(e,f,g,u,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,g,u,y,C){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
-g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(u?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var g=e.length,u=Math.ceil(g/1024),y=Array(u),C=0;C<u;++C){for(var I=1024*C,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=e[I].charCodeAt(0);y[C]=new Uint8Array(N)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,g,u,y,C,I,D){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=
-y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(C);isLocalStorage&&y++;var N=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ha){try{if("_blank"==ha)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(e,g,u);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,e);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
-!1)+"</pre>"),ja.document.close())}else ha==App.MODE_DEVICE||"download"==ha?this.doSaveLocalFile(e,G,g,u,null,D):null!=G&&0<G.length&&this.pickFolder(ha,mxUtils.bind(this,function(ca){try{this.exportFile(e,G,g,u,ha,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,C,I,null,1<y,N,e,g,u);C=this.isServices(y)?y>N?390:280:160;this.showDialog(f.container,420,C,!0,!0);f.init()};
-EditorUi.prototype.openInNewWindow=function(e,f,g){var u=window.open("about:blank");null==u||null==u.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(e=g?e:btoa(unescape(encodeURIComponent(e))),u.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):u.document.write("<html>"+e+"</html>"):u.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),u.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
-EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(u){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
+y=document.createElement("img");y.setAttribute("src",IMAGE_PATH+"/logo.png");y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";C.appendChild(y);y=document.createElement("img");y.setAttribute("src",Dialog.prototype.closeImage);y.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));y.setAttribute("border","0");y.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+C.appendChild(y);mxUtils.write(C,f);document.body.appendChild(C);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var I=document.createElement("input");I.setAttribute("type","checkbox");I.setAttribute("id","geDoNotShowAgainCheckbox");I.style.marginRight="6px";if(!v){f.appendChild(I);var D=document.createElement("label");D.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(D,mxResources.get("doNotShowAgain"));f.appendChild(D);
+C.style.paddingBottom="30px";C.appendChild(f)}var N=mxUtils.bind(this,function(){null!=C.parentNode&&(C.parentNode.removeChild(C),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+e]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+e]=Date.now(),mxSettings.save()))});mxEvent.addListener(y,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){N()}),1E3)});mxEvent.addListener(C,"click",mxUtils.bind(this,function(ia){var ka=mxEvent.getSource(ia);ka!=I&&ka!=D?(null!=g&&g(),N(),mxEvent.consume(ia)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(C.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);y=!0}return y};EditorUi.prototype.setCurrentFile=function(e){null!=e&&(e.opened=new Date);this.currentFile=e};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(e,f,g,v){e=e.toDataURL("image/"+g);if(null!=e&&6<e.length)null!=f&&(e=Editor.writeGraphModelToPng(e,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(e=Editor.writeGraphModelToPng(e,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return e};EditorUi.prototype.saveCanvas=function(e,f,g,v,y){var C="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+C;e=this.createImageDataUri(e,
+f,g,y);this.saveData(v,C,e.substring(e.lastIndexOf(",")+1),"image/"+g,!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||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(e,f){e=new TextareaDialog(this,e,f,null,null,mxResources.get("close"));this.showDialog(e.container,620,460,
+!0,!0,null,null,null,null,!0);e.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(e,f,g,v,y,C){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)e=v?this.base64ToBlob(e,g):new Blob([e],{type:g}),navigator.msSaveOrOpenBlob(e,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(e,!0):(g.document.write(e),
+g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",e):this.openInNewWindow(e,g,v);else{var I=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof I.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var D=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(D?parseInt(D[2],10):
+!1)?!1:C}if(C||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(e,g):new Blob([e],{type:g}));C?I.download=f:I.setAttribute("target","_blank");document.body.appendChild(I);try{window.setTimeout(function(){URL.revokeObjectURL(I.href)},2E4),I.click(),I.parentNode.removeChild(I)}catch(N){}}else this.createEchoRequest(e,f,g,v,y).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(e,f,g,v,y,C){e="xml="+encodeURIComponent(e);return new mxXmlRequest(SAVE_URL,e+(null!=
+g?"&mime="+g:"")+(null!=y?"&format="+y:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(e,f){f=f||"";e=atob(e);for(var g=e.length,v=Math.ceil(g/1024),y=Array(v),C=0;C<v;++C){for(var I=1024*C,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=e[I].charCodeAt(0);y[C]=new Uint8Array(N)}return new Blob(y,{type:f})};EditorUi.prototype.saveLocalFile=function(e,f,g,v,y,C,I,D){C=null!=C?C:!1;I=null!=I?I:"vsdx"!=
+y&&(!mxClient.IS_IOS||!navigator.standalone);y=this.getServiceCount(C);isLocalStorage&&y++;var N=4>=y?2:6<y?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,ia){try{if("_blank"==ia)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(e,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,e);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(e,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(e,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(e,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(e,G,g,v,ia,ca)}catch(pa){this.handleError(pa)}}))}catch(ca){this.handleError(ca)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,C,I,null,1<y,N,e,g,v);C=this.isServices(y)?y>N?390:280:160;this.showDialog(f.container,420,C,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(e,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(e,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(e=g?e:btoa(unescape(encodeURIComponent(e))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+e+'"/></html>')):v.document.write("<html>"+e+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(e,!1)+"</pre></html>"),v.document.close())};var l=EditorUi.prototype.addChromelessToolbarItems;
+EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(e){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=e(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;
mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var y=f.getBoundingClientRect();this.tagsDialog.style.left=y.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";y=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=y.zIndex;document.body.appendChild(this.tagsDialog);
-this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(u)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var u=this.editor.graph.getAllTags();f.style.display=0<u.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
+this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(v)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var v=this.editor.graph.getAllTags();f.style.display=0<v.length?"":"none"}))}l.apply(this,arguments);this.editor.addListener("tagsDialogShown",mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=
null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,
-"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=e(mxUtils.bind(this,function(u){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&
+"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=e(mxUtils.bind(this,function(v){var y=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",y);null!=this.exportDialog&&
(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)y.apply(this);else{this.exportDialog=document.createElement("div");var C=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=C.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";C=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=C.zIndex;var I=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});I.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(D){I.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var N=this.createImageDataUri(D,null,"png");D=document.createElement("img");D.style.maxWidth="140px";D.style.maxHeight="140px";D.style.cursor="pointer";D.style.backgroundColor="white";D.setAttribute("title",mxResources.get("openInNewWindow"));
-D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(u)}),
-Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,g,u,y){this.isLocalFileSave()?this.saveLocalFile(g,e,u,y,f):this.saveRequest(e,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(g,C,u,y,f,I)}),g,y,u)};EditorUi.prototype.saveRequest=function(e,f,g,u,y,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(G,ha){if("_blank"==
-ha||null!=G&&0<G.length){var ka=g("_blank"==ha?null:G,ha==App.MODE_DEVICE||"download"==ha||null==ha||"_blank"==ha?"0":"1");null!=ka&&(ha==App.MODE_DEVICE||"download"==ha||"_blank"==ha?ka.simulate(document,"_blank"):this.pickFolder(ha,mxUtils.bind(this,function(ja){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=u)try{this.exportFile(u,G,C,!0,ha,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,C,!0,ha,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,u,C,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(e.container,420,D,!0,!0);e.init()};EditorUi.prototype.isServices=
-function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,g,u,y,C){};EditorUi.prototype.pickFolder=function(e,f,g){f(null)};EditorUi.prototype.exportSvg=function(e,f,g,u,y,C,I,D,N,G,ha,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var qa=f?null:this.editor.graph.background;qa==mxConstants.NONE&&(qa=null);null==qa&&0==f&&(qa=ha?
-this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(qa,e,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ha,ka);u&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(y?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
+D.setAttribute("border","0");D.setAttribute("src",N);this.exportDialog.appendChild(D);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.openInNewWindow(N.substring(N.indexOf(",")+1),"image/png",!0);y.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",y);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(e,f,g,v,y){this.isLocalFileSave()?this.saveLocalFile(g,e,v,y,f):this.saveRequest(e,f,mxUtils.bind(this,function(C,I){return this.createEchoRequest(g,C,v,y,f,I)}),g,y,v)};EditorUi.prototype.saveRequest=function(e,f,g,v,y,C,I){I=null!=I?I:!mxClient.IS_IOS||!navigator.standalone;var D=this.getServiceCount(!1);isLocalStorage&&D++;var N=4>=D?2:6<D?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(G,ia){if("_blank"==
+ia||null!=G&&0<G.length){var ka=g("_blank"==ia?null:G,ia==App.MODE_DEVICE||"download"==ia||null==ia||"_blank"==ia?"0":"1");null!=ka&&(ia==App.MODE_DEVICE||"download"==ia||"_blank"==ia?ka.simulate(document,"_blank"):this.pickFolder(ia,mxUtils.bind(this,function(ja){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.spinner.spin(document.body,mxResources.get("saving"))&&ka.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=ka.getStatus()&&299>=ka.getStatus())try{this.exportFile(ka.getText(),G,C,!0,ia,ja)}catch(ca){this.handleError(ca)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(ca){this.spinner.stop();this.handleError(ca)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,I,null,1<D,N,v,C,y);D=this.isServices(D)?4<D?390:280:160;this.showDialog(e.container,420,D,!0,!0);e.init()};EditorUi.prototype.isServices=
+function(e){return 1!=e};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(e,f,g,v,y,C){};EditorUi.prototype.pickFolder=function(e,f,g){f(null)};EditorUi.prototype.exportSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var ra=f?null:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);null==ra&&0==f&&(ra=ia?
+this.editor.graph.defaultPageBackgroundColor:"#ffffff");var L=this.editor.graph.getSvg(ra,e,I,D,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ja,ia,ka);v&&this.editor.graph.addSvgShadow(L);var V=this.getBaseFilename()+(y?".drawio":"")+".svg";ca=null!=ca?ca:mxUtils.bind(this,function(Z){this.isLocalFileSave()||Z.length<=MAX_REQUEST_SIZE?this.saveData(V,"svg",Z,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,
function(){mxUtils.popup(Z)}))});var R=mxUtils.bind(this,function(Z){this.spinner.stop();y&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(y?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){C?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(Z,R,this.thumbImageCache)):R(Z)});ja?this.embedFonts(L,
-Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(e,f,g,u,y,C,I){return this.addCheckbox(e,g,u,y,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,g,u,y,C,I,D){C=null!=C?C:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
-u&&N.setAttribute("disabled","disabled");C&&(e.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),e.appendChild(g),y||mxUtils.br(e));return N};EditorUi.prototype.addEditButton=function(e,f){var g=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var u=this.getCurrentFile(),y="";null!=u&&u.getMode()!=App.MODE_DEVICE&&u.getMode()!=App.MODE_BROWSER&&(y=window.location.href);var C=document.createElement("select");C.style.maxWidth=
-"200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";u=document.createElement("option");u.setAttribute("value","blank");mxUtils.write(u,mxResources.get("makeCopy"));C.appendChild(u);u=document.createElement("option");u.setAttribute("value","custom");mxUtils.write(u,mxResources.get("custom")+"...");C.appendChild(u);e.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var I=new FilenameDialog(this,y,mxResources.get("ok"),
+Y):(this.editor.addFontCss(L),Y(L))}catch(Z){this.handleError(Z)}};EditorUi.prototype.addRadiobox=function(e,f,g,v,y,C,I){return this.addCheckbox(e,g,v,y,C,I,!0,f)};EditorUi.prototype.addCheckbox=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;var N=document.createElement("input");N.style.marginRight="8px";N.style.marginTop="16px";N.setAttribute("type",I?"radio":"checkbox");I="geCheckbox-"+Editor.guid();N.id=I;null!=D&&N.setAttribute("name",D);g&&(N.setAttribute("checked","checked"),N.defaultChecked=!0);
+v&&N.setAttribute("disabled","disabled");C&&(e.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),e.appendChild(g),y||mxUtils.br(e));return N};EditorUi.prototype.addEditButton=function(e,f){var g=this.addCheckbox(e,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),y="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(y=window.location.href);var C=document.createElement("select");C.style.maxWidth=
+"200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));C.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");C.appendChild(v);e.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==C.value){var I=new FilenameDialog(this,y,mxResources.get("ok"),
function(D){null!=D?y=D:C.value="blank"},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(I.container,300,80,!0,!1);I.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(e);return{getLink:function(){return g.checked?"blank"===C.value?"_blank":y:null},getEditInput:function(){return g},getEditSelect:function(){return C}}};EditorUi.prototype.addLinkSection=
-function(e,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=C):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(e,mxResources.get("links")+":");var u=document.createElement("select");u.style.width=
-"100px";u.style.padding="0px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));u.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));u.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,mxResources.get("openInThisWindow"));u.appendChild(y);
-f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),u.appendChild(f));e.appendChild(u);mxUtils.write(e,mxResources.get("borderColor")+":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(C||"none",function(N){C=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
-"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return C},getTarget:function(){return u.value},focus:function(){u.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,g,u,y,C,I){I=null!=I?I:[];u&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
-I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&I.push("edit="+encodeURIComponent(y)),C&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,g,u,y,C,I,D,N,G){N=this.createUrlParameters(e,f,g,u,y,C,N);e=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
-D||null==e||e.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(e.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(u&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(e,f,g,u,y,C,I,D,N,G,ha,ka){this.getBasenames();var ja={};""!=y&&y!=mxConstants.NONE&&(ja.highlight=y);"auto"!==u&&(ja.target=u);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
-f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ha&&0<ha.length&&(ja.edit=ha);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";ka(f,'<script type="text/javascript" src="'+(0<e.length?
-("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,f,g,u){var y=document.createElement("div");y.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+function(e,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=C&&C!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=C):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(e,mxResources.get("links")+":");var v=document.createElement("select");v.style.width=
+"100px";v.style.padding="0px";v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var y=document.createElement("option");y.setAttribute("value","auto");mxUtils.write(y,mxResources.get("automatic"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","blank");mxUtils.write(y,mxResources.get("openInNewWindow"));v.appendChild(y);y=document.createElement("option");y.setAttribute("value","self");mxUtils.write(y,mxResources.get("openInThisWindow"));v.appendChild(y);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));e.appendChild(v);mxUtils.write(e,mxResources.get("borderColor")+":");var C="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(C||"none",function(N){C=N;g()});mxEvent.consume(D)}));g();I.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";I.style.marginLeft="4px";I.style.height="22px";I.style.width=
+"22px";I.style.position="relative";I.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";I.className="geColorBtn";e.appendChild(I);mxUtils.br(e);return{getColor:function(){return C},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(e,f,g,v,y,C,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=e&&I.push("target="+e),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=y&&0<y.length&&I.push("edit="+encodeURIComponent(y)),C&&I.push("layers=1"),this.editor.graph.foldingEnabled&&I.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&I.push("page-id="+this.currentPage.getId());return I};EditorUi.prototype.createLink=function(e,f,g,v,y,C,I,D,N,G){N=this.createUrlParameters(e,f,g,v,y,C,N);e=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(e=this.getCurrentFile(),
+D||null==e||e.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+e.getHash(),f=!1));f&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(e.getTitle()));G&&1<g.length&&(N.push("open="+g.substring(1)),g="");return(v&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<N.length?"?"+N.join("&"):"")+g};EditorUi.prototype.createHtml=function(e,f,g,v,y,C,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=y&&y!=mxConstants.NONE&&(ja.highlight=y);"auto"!==v&&(ja.target=v);G||(ja.lightbox=!1);ja.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ja.zoom=g/100);g=[];I&&(g.push("pages"),ja.resize=!0,null!=this.pages&&null!=this.currentPage&&(ja.page=mxUtils.indexOf(this.pages,this.currentPage)));
+f&&(g.push("zoom"),ja.resize=!0);D&&g.push("layers");N&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ja.toolbar=g.join(" "));null!=ia&&0<ia.length&&(ja.edit=ia);null!=e?ja.url=e:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';e=null!=e?"&fetch="+encodeURIComponent(e):"";ka(f,'<script type="text/javascript" src="'+(0<e.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+e:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(e,f,g,v){var y=document.createElement("div");y.style.whiteSpace="nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
y.appendChild(C);var I=document.createElement("div");I.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","type-embedhtmldialog");C=D.cloneNode(!0);C.setAttribute("value","copy");I.appendChild(C);var N=document.createElement("span");mxUtils.write(N,mxResources.get("includeCopyOfMyDiagram"));
I.appendChild(N);mxUtils.br(I);I.appendChild(D);N=document.createElement("span");mxUtils.write(N,mxResources.get("publicDiagramUrl"));I.appendChild(N);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(N=document.createElement("a"),N.style.paddingLeft="12px",N.style.color="gray",N.style.cursor="pointer",mxUtils.write(N,mxResources.get("share")),I.appendChild(N),mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));
-C.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(I);var ha=this.addLinkSection(y),ka=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";y.appendChild(ja);var ca=this.addCheckbox(y,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
-var pa=pa=this.addCheckbox(y,mxResources.get("allPages"),I,!I),qa=this.addCheckbox(y,mxResources.get("layers"),!0),L=this.addCheckbox(y,mxResources.get("tags"),!0),V=this.addCheckbox(y,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(y,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
-R.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,y,mxUtils.bind(this,function(){u(D.checked?g:null,ka.checked,ja.value,ha.getTarget(),ha.getColor(),ca.checked,pa.checked,qa.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,g,u,y,C,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
-e||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ha=this.getCurrentFile();e=0;if(null==ha||ha.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var ka=document.createElement("div");ka.style.whiteSpace="normal";mxUtils.write(ka,mxResources.get("linkAccountRequired"));G.appendChild(ka);ka=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ha.getId())}));ka.style.marginTop="12px";ka.className="geBtn";G.appendChild(ka);N.appendChild(G);ka=document.createElement("a");ka.style.paddingLeft="12px";ka.style.color="gray";ka.style.fontSize="11px";ka.style.cursor="pointer";mxUtils.write(ka,mxResources.get("check"));
-G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=u)e+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
-document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=u+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,C);g=
-null!=this.pages&&1<this.pages.length;var qa=null;if(null==ha||ha.constructor!=window.DriveFile||f)qa=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!C),V=this.addEditButton(N,L),R=V.getEditInput();C&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
+C.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");y.appendChild(I);var ia=this.addLinkSection(y),ka=this.addCheckbox(y,mxResources.get("zoom"),!0,null,!0);mxUtils.write(y,":");var ja=document.createElement("input");ja.setAttribute("type","text");ja.style.marginRight="16px";ja.style.width="60px";ja.style.marginLeft="4px";ja.style.marginRight="12px";ja.value="100%";y.appendChild(ja);var ca=this.addCheckbox(y,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var pa=pa=this.addCheckbox(y,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(y,mxResources.get("layers"),!0),L=this.addCheckbox(y,mxResources.get("tags"),!0),V=this.addCheckbox(y,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(y,V);var Y=R.getEditInput();Y.style.marginBottom="16px";I+=50;mxEvent.addListener(V,"change",function(){V.checked?Y.removeAttribute("disabled"):Y.setAttribute("disabled","disabled");Y.checked&&V.checked?R.getEditSelect().removeAttribute("disabled"):
+R.getEditSelect().setAttribute("disabled","disabled")})}e=new CustomDialog(this,y,mxUtils.bind(this,function(){v(D.checked?g:null,ka.checked,ja.value,ia.getTarget(),ia.getColor(),ca.checked,pa.checked,ra.checked,L.checked,V.checked,null!=R?R.getLink():null)}),null,e,f);this.showDialog(e.container,340,I,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(e,f,g,v,y,C,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
+e||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();e=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{e=80;I=null!=I?I:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var ka=document.createElement("div");ka.style.whiteSpace="normal";mxUtils.write(ka,mxResources.get("linkAccountRequired"));G.appendChild(ka);ka=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(ia.getId())}));ka.style.marginTop="12px";ka.className="geBtn";G.appendChild(ka);N.appendChild(G);ka=document.createElement("a");ka.style.paddingLeft="12px";ka.style.color="gray";ka.style.fontSize="11px";ka.style.cursor="pointer";mxUtils.write(ka,mxResources.get("check"));
+G.appendChild(ka);mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(la){this.spinner.stop();la=new ErrorDialog(this,null,mxResources.get(null!=la?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(la.container,300,80,!0,!1);la.init()}))}))}var ja=null,ca=null;if(null!=g||null!=v)e+=30,mxUtils.write(N,mxResources.get("width")+":"),ja=
+document.createElement("input"),ja.setAttribute("type","text"),ja.style.marginRight="16px",ja.style.width="50px",ja.style.marginLeft="6px",ja.style.marginRight="16px",ja.style.marginBottom="10px",ja.value="100%",N.appendChild(ja),mxUtils.write(N,mxResources.get("height")+":"),ca=document.createElement("input"),ca.setAttribute("type","text"),ca.style.width="50px",ca.style.marginLeft="6px",ca.style.marginBottom="10px",ca.value=v+"px",N.appendChild(ca),mxUtils.br(N);var pa=this.addLinkSection(N,C);g=
+null!=this.pages&&1<this.pages.length;var ra=null;if(null==ia||ia.constructor!=window.DriveFile||f)ra=this.addCheckbox(N,mxResources.get("allPages"),g,!g);var L=this.addCheckbox(N,mxResources.get("lightbox"),!0,null,null,!C),V=this.addEditButton(N,L),R=V.getEditInput();C&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",e-=20);var Y=this.addCheckbox(N,mxResources.get("layers"),!0);Y.style.marginLeft=R.style.marginLeft;Y.style.marginTop="8px";var Z=this.addCheckbox(N,mxResources.get("tags"),
!0);Z.style.marginLeft=R.style.marginLeft;Z.style.marginBottom="16px";Z.style.marginTop="16px";mxEvent.addListener(L,"change",function(){L.checked?(Y.removeAttribute("disabled"),R.removeAttribute("disabled")):(Y.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"));R.checked&&L.checked?V.getEditSelect().removeAttribute("disabled"):V.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,N,mxUtils.bind(this,function(){y(pa.getTarget(),pa.getColor(),null==
-qa?!0:qa.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,g,u,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
+ra?!0:ra.checked,L.checked,V.getLink(),Y.checked,null!=ja?ja.value:null,null!=ca?ca.value:null,Z.checked)}),null,mxResources.get("create"),I,D);this.showDialog(f.container,340,300+e,!0,!0);null!=ja?(ja.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ja.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=document.createElement("h3");mxUtils.write(I,
mxResources.get("image"));I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(y?"10":"4")+"px";C.appendChild(I);if(y){mxUtils.write(C,mxResources.get("zoom")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value=this.lastExportZoom||"100%";C.appendChild(D);mxUtils.write(C,mxResources.get("borderWidth")+":");var N=document.createElement("input");N.setAttribute("type",
-"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";C.appendChild(N);mxUtils.br(C)}var G=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ha=u?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=u?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
-(ka.style.marginBottom="16px");e=new CustomDialog(this,C,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ha?ha.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,e,f);this.showDialog(e.container,300,(y?25:0)+(u?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,g,u,y,C,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ha=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
+"text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.value=this.lastExportBorder||"0";C.appendChild(N);mxUtils.br(C)}var G=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(C,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
+(ka.style.marginBottom="16px");e=new CustomDialog(this,C,mxUtils.bind(this,function(){var ja=parseInt(D.value)/100||1,ca=parseInt(N.value)||0;g(!G.checked,null!=ia?ia.checked:!1,null!=ka?ka.checked:!1,ja,ca)}),null,e,f);this.showDialog(e.container,300,(y?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(e,f,g,v,y,C,I,D,N){I=null!=I?I:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var ia=this.editor.graph,ka="jpeg"==D?220:300,ja=document.createElement("h3");
mxUtils.write(ja,e);ja.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ja);mxUtils.write(G,mxResources.get("zoom")+":");var ca=document.createElement("input");ca.setAttribute("type","text");ca.style.marginRight="16px";ca.style.width="60px";ca.style.marginLeft="4px";ca.style.marginRight="12px";ca.value=this.lastExportZoom||"100%";G.appendChild(ca);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type",
-"text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var qa=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,ha.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
-"8px";e=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<e.length;ja++)if(!ha.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);R[e[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(qa.checked=!0)})):C&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
-mxUtils.br(G),ka+=30,mxEvent.addListener(qa,"change",function(){qa.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ha.isSelectionEmpty()?N&&(qa.style.display="none",qa.nextSibling.style.display="none",qa.nextSibling.nextSibling.style.display="none",ka-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(qa,"change",function(){V.value=qa.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),
-!1,null,null,"jpeg"!=D),la=null;Editor.isDarkMode()&&(la=this.addCheckbox(G,mxResources.get("dark"),!0),ka+=26);var q=this.addCheckbox(G,mxResources.get("shadow"),ha.shadowVisible),F=null;if("png"==D||"jpeg"==D)F=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ka+=30;var T=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=D);T.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight=
-"8px";ba.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";C=document.createElement("option");C.setAttribute("value","none");mxUtils.write(C,mxResources.get("noChange"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","embedFonts");mxUtils.write(C,
-mxResources.get("embedFonts"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","lblToSvg");mxUtils.write(C,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(C);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
-da.style.display="none"):"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),q.removeAttribute("disabled"),R.page.style.display="",fa.style.display="none",da.style.display="")}));f&&(G.appendChild(ba),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(U),mxUtils.br(G),ka+=60);var da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginRight=
+"text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var ra=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,ia.isSelectionEmpty()),L=document.createElement("input");L.style.marginTop="16px";L.style.marginRight="8px";L.style.marginLeft="24px";L.setAttribute("disabled","disabled");L.setAttribute("type","checkbox");var V=document.createElement("select");V.style.marginTop="16px";V.style.marginLeft=
+"8px";e=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<e.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=e[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(e[ja]));Y.setAttribute("value",e[ja]);V.appendChild(Y);R[e[ja]]=Y}N?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(V),mxUtils.br(G),ka+=26,mxEvent.addListener(V,"change",function(){"selectionOnly"==V.value&&(ra.checked=!0)})):C&&(G.appendChild(L),mxUtils.write(G,mxResources.get("crop")),
+mxUtils.br(G),ka+=30,mxEvent.addListener(ra,"change",function(){ra.checked?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}));ia.isSelectionEmpty()?N&&(ra.style.display="none",ra.nextSibling.style.display="none",ra.nextSibling.nextSibling.style.display="none",ka-=30):(V.value="diagram",L.setAttribute("checked","checked"),L.defaultChecked=!0,mxEvent.addListener(ra,"change",function(){V.value=ra.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(G,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=D),la=null;Editor.isDarkMode()&&(la=this.addCheckbox(G,mxResources.get("dark"),!0),ka+=26);var q=this.addCheckbox(G,mxResources.get("shadow"),ia.shadowVisible),F=null;if("png"==D||"jpeg"==D)F=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ka+=30;var T=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),I,null,null,"jpeg"!=D);T.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight=
+"8px";aa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";C=document.createElement("option");C.setAttribute("value","none");mxUtils.write(C,mxResources.get("noChange"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","embedFonts");mxUtils.write(C,
+mxResources.get("embedFonts"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","lblToSvg");mxUtils.write(C,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(C);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),R.page.style.display="none","page"==V.value&&(V.value="diagram"),q.checked=!1,q.setAttribute("disabled","disabled"),fa.style.display="inline-block",
+da.style.display="none"):"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),q.removeAttribute("disabled"),R.page.style.display="",fa.style.display="none",da.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(U),mxUtils.br(G),ka+=60);var da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginRight=
"10px";da.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));da.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));da.appendChild(f);var fa=document.createElement("div");mxUtils.write(fa,mxResources.get("LinksLost"));
-fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;y(ca.value,Z.checked,!qa.checked,q.checked,T.checked,ba.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,u);this.showDialog(g.container,
-340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,g,u,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(D)}var N=this.addCheckbox(C,mxResources.get("fit"),
-!0),G=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&u,!u),ha=this.addCheckbox(C,g),ka=this.addCheckbox(C,mxResources.get("lightbox"),!0),ja=this.addEditButton(C,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),qa=this.addCheckbox(C,mxResources.get("layers"),pa,!pa);qa.style.marginLeft=ca.style.marginLeft;qa.style.marginBottom="12px";qa.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&qa.removeAttribute("disabled"),ca.removeAttribute("disabled")):
-(qa.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){e(N.checked,G.checked,ha.checked,ka.checked,ja.getLink(),qa.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,g,u,y,C,I,D){function N(ca){var pa=" ",qa=
-"";u&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ha?"&page="+ha:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",qa+="cursor:pointer;");e&&(qa+="max-width:100%;");var L=
-"";g&&(L=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');I('<img src="'+ca+'"'+L+(""!=qa?' style="'+qa+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),ha=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var pa=u?this.getFileData(!0):null;ca=this.createImageDataUri(ca,pa,"png");N(ca)}),null,null,null,mxUtils.bind(this,function(ca){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,
-null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ka="";g&&(ka="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(u?"1":"0")+ka+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?N("data:image/png;base64,"+ja.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(e,f,g,u,y,C,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ha=N[G].getAttribute("href");null!=ha&&"#"==ha.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}u&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";u&&(ka="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",u&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+fa.style.margin="7px";fa.style.display="none";"svg"==D&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(da),G.appendChild(fa),mxUtils.br(G),mxUtils.br(G),ka+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=ca.value;y(ca.value,Z.checked,!ra.checked,q.checked,T.checked,aa.checked,pa.value,L.checked,!1,da.value,null!=F?F.checked:null,null!=la?la.checked:null,V.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,v);this.showDialog(g.container,
+340,ka,!0,!0,null,null,null,null,!0);ca.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ca.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(e,f,g,v,y){var C=document.createElement("div");C.style.whiteSpace="nowrap";var I=this.editor.graph;if(null!=f){var D=document.createElement("h3");mxUtils.write(D,f);D.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(D)}var N=this.addCheckbox(C,mxResources.get("fit"),
+!0),G=this.addCheckbox(C,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(C,g),ka=this.addCheckbox(C,mxResources.get("lightbox"),!0),ja=this.addEditButton(C,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(C,mxResources.get("layers"),pa,!pa);ra.style.marginLeft=ca.style.marginLeft;ra.style.marginBottom="12px";ra.style.marginTop="8px";mxEvent.addListener(ka,"change",function(){ka.checked?(pa&&ra.removeAttribute("disabled"),ca.removeAttribute("disabled")):
+(ra.setAttribute("disabled","disabled"),ca.setAttribute("disabled","disabled"));ca.checked&&ka.checked?ja.getEditSelect().removeAttribute("disabled"):ja.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){e(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),y);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(e,f,g,v,y,C,I,D){function N(ca){var pa=" ",ra=
+"";v&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=ia?"&page="+ia:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");e&&(ra+="max-width:100%;");var L=
+"";g&&(L=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');I('<img src="'+ca+'"'+L+(""!=ra?' style="'+ra+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),ia=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(ca){var pa=v?this.getFileData(!0):null;ca=this.createImageDataUri(ca,pa,"png");N(ca)}),null,null,null,mxUtils.bind(this,function(ca){D({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,
+null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ka="";g&&(ka="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ja=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+ka+"&xml="+encodeURIComponent(f));ja.send(mxUtils.bind(this,function(){200<=ja.getStatus()&&299>=ja.getStatus()?N("data:image/png;base64,"+ja.getText()):D({message:mxResources.get("unknownError")})}))}else D({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(e,f,g,v,y,C,I){var D=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),N=D.getElementsByTagName("a");if(null!=N)for(var G=0;G<N.length;G++){var ia=N[G].getAttribute("href");null!=ia&&"#"==ia.charAt(0)&&"_blank"==N[G].getAttribute("target")&&N[G].removeAttribute("target")}v&&D.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(D);if(g){var ka=" ",ja="";v&&(ka="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");e&&(ja+="max-width:100%;");this.editor.convertImages(D,mxUtils.bind(this,function(ca){I('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(ca))+'"'+(""!=ja?' style="'+ja+'"':"")+ka+"/>")}))}else ja="",v&&(f=this.getSelectedPageIndex(),D.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(y?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),e&&(e=parseInt(D.getAttribute("width")),y=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+e+" "+y),ja+="max-width:100%;max-height:"+y+"px;",D.removeAttribute("height")),""!=ja&&D.setAttribute("style",ja),this.editor.addFontCss(D),this.editor.graph.mathEnabled&&this.editor.addMathCss(D),I(mxUtils.getXml(D))};EditorUi.prototype.timeSince=
function(e){e=Math.floor((new Date-e)/1E3);var f=Math.floor(e/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(e/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(e/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(e/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(e/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(e,f){if(null!=e){var g=null;if("diagram"==
-e.nodeName)g=e;else if("mxfile"==e.nodeName){var u=e.getElementsByTagName("diagram");if(0<u.length){g=u[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:y.apply(this,arguments)}}}null!=g&&(e=Editor.parseDiagramNode(g))}u=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(C){}finally{this.editor.graph=u}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
-1,g=0;if(null!=e){if(e.hasAttribute("scale")){var u=parseFloat(e.getAttribute("scale"));!isNaN(u)&&0<u&&(f=u)}e.hasAttribute("border")&&(u=parseInt(e.getAttribute("border")),!isNaN(u)&&0<u&&(g=u))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(e,f,g,u,y){try{var C=this.editor.graph,I=null!=C.themes&&"darkTheme"==C.defaultThemeName,D=null;if(null!=g&&0<g.length)C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),C),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&C.setBackgroundImage(G.viewState.backgroundImage);C.getGlobalVariable=function(ha){return"page"==ha?G.getName():"pagenumber"==ha?1:N.apply(this,
-arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ha){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ha.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));e(ka.substring(ka.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ha){null!=
-f&&f(ha)}),null,null,u,null,C.shadowVisible,null,C,y,null,null,null,"diagram",null)}catch(ha){null!=f&&f(ha)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,g,u,y,C,I,D,N,G,ha,ka,ja){D=null!=D?D:!0;ha=null!=ha?ha:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);C=f.getSvg(I,G,ha,null,null,C,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(C,null,null,0==ha);null!=e&&C.setAttribute("content",e);null!=g&&C.setAttribute("resource",g);var ca=mxUtils.bind(this,
-function(pa){pa=(u?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=y&&y(pa);return pa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=y)this.embedFonts(C,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(qa){ca(qa)})):ca(pa)}));else return ca(C)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(e,g),f(e)}catch(u){f(e)}}))}catch(g){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,g,u,y,C,I,D,N,G,ha,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
-try{this.saveCanvas(pa,y?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ha)}catch(qa){this.handleError(qa)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,e||1,f,u,null,null,C,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,g,u,y,C,I){f=null!=
-f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=e&&0<e.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(e);e={};var ha=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ha&&"mxfile"==ha.nodeName&&null!=this.pages){var ka=ha.getElementsByTagName("diagram");if(1==ka.length&&!C){if(ha=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(e[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
-ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){C=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[ka[0].getAttribute("id")]=this.pages[0].getId(),ha=Editor.parseDiagramNode(ka[0]),u=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var qa=this.updatePageRoot(new DiagramPage(ka[ca]));e[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==qa.getName()&&qa.setName(mxResources.get("pageWithNumber",
-[L+1]));N.model.execute(new ChangePage(this,qa,qa,L,!0));C.push(qa)}this.updatePageLinks(e,C)}}if(null!=ha&&"mxGraphModel"===ha.nodeName){D=N.importGraphModel(ha,f,g,u);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(e,D[ca]);var V=N.parseBackgroundImage(ha.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
+e.nodeName)g=e;else if("mxfile"==e.nodeName){var v=e.getElementsByTagName("diagram");if(0<v.length){g=v[0];var y=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:y.apply(this,arguments)}}}null!=g&&(e=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(e)}catch(C){}finally{this.editor.graph=v}return e};EditorUi.prototype.getPngFileProperties=function(e){var f=
+1,g=0;if(null!=e){if(e.hasAttribute("scale")){var v=parseFloat(e.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}e.hasAttribute("border")&&(v=parseInt(e.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(e,f,g,v,y){try{var C=this.editor.graph,I=null!=C.themes&&"darkTheme"==C.defaultThemeName,D=null;if(null!=g&&0<g.length)C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),C),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(I?C.getDefaultStylesheet():C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&C.setBackgroundImage(G.viewState.backgroundImage);C.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
+arguments)};document.body.appendChild(C.container);C.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(ia){try{null==D&&(D=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ka=ia.toDataURL("image/png");ka=Editor.writeGraphModelToPng(ka,"tEXt","mxfile",encodeURIComponent(D));e(ka.substring(ka.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,v,null,C.shadowVisible,null,C,y,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){D=null!=D?D:!0;ia=null!=ia?ia:0;I=null!=N?N:f.background;I==mxConstants.NONE&&(I=null);C=f.getSvg(I,G,ia,null,null,C,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(C,null,null,0==ia);null!=e&&C.setAttribute("content",e);null!=g&&C.setAttribute("resource",g);var ca=mxUtils.bind(this,
+function(pa){pa=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=y&&y(pa);return pa});f.mathEnabled&&this.editor.addMathCss(C);if(null!=y)this.embedFonts(C,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(C)};EditorUi.prototype.embedFonts=function(e,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(e,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(e,g),f(e)}catch(v){f(e)}}))}catch(g){f(e)}}))};EditorUi.prototype.exportImage=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){N=null!=N?N:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var ca=this.editor.graph.isSelectionEmpty();g=null!=g?g:ca;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();
+try{this.saveCanvas(pa,y?this.getFileData(!0,null,null,null,g,D):null,N,null==this.pages||0==this.pages.length,ia)}catch(ra){this.handleError(ra)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,e||1,f,v,null,null,C,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(e){return this.editor.isCorsEnabledForUrl(e)};EditorUi.prototype.importXml=function(e,f,g,v,y,C,I){f=null!=
+f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=e&&0<e.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(e);e={};var ia=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=ia&&"mxfile"==ia.nodeName&&null!=this.pages){var ka=ia.getElementsByTagName("diagram");if(1==ka.length&&!C){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(e[ka[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ja=ka[0].getAttribute("name");null!=
+ja&&""!=ja&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,ja))}}else if(0<ka.length){C=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(e[ka[0].getAttribute("id")]=this.pages[0].getId(),ia=Editor.parseDiagramNode(ka[0]),v=!1,ca=1);for(;ca<ka.length;ca++){var pa=ka[ca].getAttribute("id");ka[ca].removeAttribute("id");var ra=this.updatePageRoot(new DiagramPage(ka[ca]));e[pa]=ka[ca].getAttribute("id");var L=this.pages.length;null==ra.getName()&&ra.setName(mxResources.get("pageWithNumber",
+[L+1]));N.model.execute(new ChangePage(this,ra,ra,L,!0));C.push(ra)}this.updatePageLinks(e,C)}}if(null!=ia&&"mxGraphModel"===ia.nodeName){D=N.importGraphModel(ia,f,g,v);if(null!=D)for(ca=0;ca<D.length;ca++)this.updatePageLinksForCell(e,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(e,V);var R=new ChangePageSetup(this,null,V);R.ignoreColor=!0;N.model.execute(R)}}I&&this.insertHandler(D,null,null,N.defaultVertexStyle,
N.defaultEdgeStyle,!1,!0)}finally{N.model.endUpdate()}}}catch(Y){if(y)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(e,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(e,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(e,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(e,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=e[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
-"data:page/id,"+g)}}catch(u){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var g=document.createElement("div"),u=this.editor.graph,y=u.getLinkForCell(f);null!=y&&u.setLinkForCell(f,this.updatePageLink(e,y));if(u.isHtmlLabel(f)){g.innerHTML=u.sanitizeHtml(u.getLabel(f));for(var C=g.getElementsByTagName("a"),I=!1,D=0;D<C.length;D++)y=C[D].getAttribute("href"),null!=y&&(C[D].setAttribute("href",this.updatePageLink(e,y)),I=!0);I&&u.labelChanged(f,g.innerHTML)}for(D=0;D<u.model.getChildCount(f);D++)this.updatePageLinksForCell(e,
-u.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var g=e[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var u=JSON.parse(f.substring(17));if(null!=u.actions){for(var y=0;y<u.actions.length;y++){var C=u.actions[y];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+1);g=e[I];null!=g?C.open="data:page/id,"+g:null==this.getPageById(I)&&delete C.open}}f=
-"data:action/json,"+JSON.stringify(u)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,g,u,y){u=null!=u?u:e.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(u);try{var D="UNKNOWN-VISIO",N=u.lastIndexOf(".");if(0<=N&&N<u.length)D=u.substring(N+
-1).toUpperCase();else{var G=u.lastIndexOf("/");0<=G&&G<u.length&&(u=u.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+u,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,u);var ha=new XMLHttpRequest;ha.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(u)?"?stencil=1":
-""));ha.responseType="blob";this.addRemoteServiceSecurityCheck(ha);null!=y&&ha.setRequestHeader("x-convert-custom",y);ha.onreadystatechange=mxUtils.bind(this,function(){if(4==ha.readyState)if(200<=ha.status&&299>=ha.status)try{var ka=ha.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,u)}catch(ca){g(ca)}else try{""==ha.responseType||
-"text"==ha.responseType?g({message:ha.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ha.response))}catch(ca){g({})}});ha.send(I)}else try{this.doImportVisio(e,f,g,u)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",C))};EditorUi.prototype.importGraphML=
-function(e,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?u():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",u))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
+"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(e,f){var g=document.createElement("div"),v=this.editor.graph,y=v.getLinkForCell(f);null!=y&&v.setLinkForCell(f,this.updatePageLink(e,y));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var C=g.getElementsByTagName("a"),I=!1,D=0;D<C.length;D++)y=C[D].getAttribute("href"),null!=y&&(C[D].setAttribute("href",this.updatePageLink(e,y)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(e,
+v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(e,f){if(Graph.isPageLink(f)){var g=e[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var v=JSON.parse(f.substring(17));if(null!=v.actions){for(var y=0;y<v.actions.length;y++){var C=v.actions[y];if(null!=C.open&&Graph.isPageLink(C.open)){var I=C.open.substring(C.open.indexOf(",")+1);g=e[I];null!=g?C.open="data:page/id,"+g:null==this.getPageById(I)&&delete C.open}}f=
+"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(e){return/(\.v(sd|dx))($|\?)/i.test(e)||/(\.vs(s|x))($|\?)/i.test(e)};EditorUi.prototype.importVisio=function(e,f,g,v,y){v=null!=v?v:e.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(v);try{var D="UNKNOWN-VISIO",N=v.lastIndexOf(".");if(0<=N&&N<v.length)D=v.substring(N+
+1).toUpperCase();else{var G=v.lastIndexOf("/");0<=G&&G<v.length&&(v=v.substring(G+1))}EditorUi.logEvent({category:D+"-MS-IMPORT-FILE",action:"filename_"+v,label:I?"remote":"local"})}catch(ka){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;I.append("file1",e,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=y&&ia.setRequestHeader("x-convert-custom",y);ia.onreadystatechange=mxUtils.bind(this,function(){if(4==ia.readyState)if(200<=ia.status&&299>=ia.status)try{var ka=ia.response;if("text/xml"==ka.type){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(ca){try{f(ca.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ja.readAsText(ka)}else this.doImportVisio(ka,f,g,v)}catch(ca){g(ca)}else try{""==ia.responseType||
+"text"==ia.responseType?g({message:ia.responseText}):(ja=new FileReader,ja.onload=function(){g({message:JSON.parse(ja.result).Message})},ja.readAsText(ia.response))}catch(ca){g({})}});ia.send(I)}else try{this.doImportVisio(e,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",C))};EditorUi.prototype.importGraphML=
+function(e,f,g){g=null!=g?g:mxUtils.bind(this,function(y){this.handleError(y)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(e,f,g)}catch(y){g(y)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?v():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",v))};EditorUi.prototype.exportVisio=function(e){var f=mxUtils.bind(this,
function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(e)||this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(e,
-f,g){var u=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=JSON.parse(e);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&C.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var I=0;I<y.svgThumbs.length;I++)C.push(Editor.createSvgDataUri(y.svgThumbs[I]));null!=
-y.thumb&&C.push(y.thumb);console.log.apply(console,C)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(u,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",u)})})})}):mxscript("js/extensions.min.js",u))};EditorUi.prototype.generateMermaidImage=function(e,f,g,u){var y=this,C=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
-I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ha=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ha[2]);G=parseFloat(ha[3])}catch(ka){N=N||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else u({message:mxResources.get("invalidInput")})}catch(ka){u(ka)}})}catch(I){u(I)}};
-"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?C():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",C):mxscript("js/extensions.min.js",C))};EditorUi.prototype.generatePlantUmlImage=function(e,f,g,u){function y(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
+f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var y=JSON.parse(e);f(LucidImporter.importState(y));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+e.length}),null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",y];null!=y.state&&C.push(JSON.parse(y.state));if(null!=y.svgThumbs)for(var I=0;I<y.svgThumbs.length;I++)C.push(Editor.createSvgDataUri(y.svgThumbs[I]));null!=
+y.thumb&&C.push(y.thumb);console.log.apply(console,C)}}catch(D){}}catch(D){null!=window.console&&console.error(D),g(D)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(v,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",v)})})})}):mxscript("js/extensions.min.js",v))};EditorUi.prototype.generateMermaidImage=function(e,f,g,v){var y=this,C=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),e,function(I){try{if(mxClient.IS_IE||mxClient.IS_IE11)I=
+I.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var D=mxUtils.parseXml(I).getElementsByTagName("svg");if(0<D.length){var N=parseFloat(D[0].getAttribute("width")),G=parseFloat(D[0].getAttribute("height"));if(isNaN(N)||isNaN(G))try{var ia=D[0].getAttribute("viewBox").split(/\s+/);N=parseFloat(ia[2]);G=parseFloat(ia[3])}catch(ka){N=N||100,G=G||100}g(y.convertDataUri(Editor.createSvgDataUri(I)),N,G)}else v({message:mxResources.get("invalidInput")})}catch(ka){v(ka)}})}catch(I){v(I)}};
+"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?C():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",C):mxscript("js/extensions.min.js",C))};EditorUi.prototype.generatePlantUmlImage=function(e,f,g,v){function y(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(D){if(10>D)return String.fromCharCode(48+D);D-=10;if(26>D)return String.fromCharCode(65+D);D-=26;if(26>D)return String.fromCharCode(97+
D);D-=26;return 0==D?"-":1==D?"_":"?"}var I=new XMLHttpRequest;I.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(D){r="";for(i=0;i<D.length;i+=3)r=i+2==D.length?r+y(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+y(D.charCodeAt(i),0,0):r+y(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(e))),!0);"txt"!=f&&(I.responseType="blob");I.onload=function(D){if(200<=this.status&&300>this.status)if("txt"==
-f)g(this.response);else{var N=new FileReader;N.readAsDataURL(this.response);N.onloadend=function(G){var ha=new Image;ha.onload=function(){try{var ka=ha.width,ja=ha.height;if(0==ka&&0==ja){var ca=N.result,pa=ca.indexOf(","),qa=decodeURIComponent(escape(atob(ca.substring(pa+1)))),L=mxUtils.parseXml(qa).getElementsByTagName("svg");0<L.length&&(ka=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}g(N.result,ka,ja)}catch(V){u(V)}};ha.src=N.result};N.onerror=function(G){u(G)}}else u(D)};
-I.onerror=function(D){u(D)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,g){var u=this.editor.graph,y=null;u.getModel().beginUpdate();try{y=u.insertVertex(null,null,"<pre>"+e+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),u.updateCellSize(y,!0)}finally{u.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(e,f,g,u,y,C,I,D){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
+f)g(this.response);else{var N=new FileReader;N.readAsDataURL(this.response);N.onloadend=function(G){var ia=new Image;ia.onload=function(){try{var ka=ia.width,ja=ia.height;if(0==ka&&0==ja){var ca=N.result,pa=ca.indexOf(","),ra=decodeURIComponent(escape(atob(ca.substring(pa+1)))),L=mxUtils.parseXml(ra).getElementsByTagName("svg");0<L.length&&(ka=parseFloat(L[0].getAttribute("width")),ja=parseFloat(L[0].getAttribute("height")))}g(N.result,ka,ja)}catch(V){v(V)}};ia.src=N.result};N.onerror=function(G){v(G)}}else v(D)};
+I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(e,f,g){var v=this.editor.graph,y=null;v.getModel().beginUpdate();try{y=v.insertVertex(null,null,"<pre>"+e+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(y,!0)}finally{v.getModel().endUpdate()}return y};EditorUi.prototype.insertTextAt=function(e,f,g,v,y,C,I,D){C=null!=C?C:!0;I=null!=I?I:!0;if(null!=e)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e))this.isOffline()?
this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(e.replace(/\s+/g," "),mxUtils.bind(this,function(ja){4==ja.readyState&&200<=ja.status&&299>=ja.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ja.responseText,f,g,!0))}));else if("data:"==e.substring(0,5)||!this.isOffline()&&(y||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e))){var N=this.editor.graph;if("data:application/pdf;base64,"==e.substring(0,28)){var G=Editor.extractGraphModelFromPdf(e);if(null!=
-G&&0<G.length)return this.importXml(G,f,g,C,!0,D)}if(Editor.isPngDataUrl(e)&&(G=Editor.extractGraphModelFromPng(e),null!=G&&0<G.length))return this.importXml(G,f,g,C,!0,D);if("data:image/svg+xml;"==e.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(G=e.substring(e.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(e.substring(e.indexOf(",")+1));var ha=this.importXml(G,f,g,C,!0,D);if(0<ha.length)return ha}catch(ja){}this.loadImage(e,
-mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(qa,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(qa)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
-ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,e,N.snap(f),N.snap(g),1,1,"text;"+(u?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{e=
-Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,g,C,null,D);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,C,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;y=null;N.getModel().beginUpdate();try{y=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(u?"html=1;":""));
+G&&0<G.length)return this.importXml(G,f,g,C,!0,D)}if(Editor.isPngDataUrl(e)&&(G=Editor.extractGraphModelFromPng(e),null!=G&&0<G.length))return this.importXml(G,f,g,C,!0,D);if("data:image/svg+xml;"==e.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==e.substring(0,26)?(G=e.substring(e.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(e.substring(e.indexOf(",")+1));var ia=this.importXml(G,f,g,C,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(e,
+mxUtils.bind(this,function(ja){if("data:"==e.substring(0,5))this.resizeImage(ja,e,mxUtils.bind(this,function(ra,L,V){N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),L,V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ra)+";"))}),I,this.maxImageSize);else{var ca=Math.min(1,Math.min(this.maxImageSize/ja.width,this.maxImageSize/ja.height)),pa=Math.round(ja.width*ca);ja=Math.round(ja.height*
+ca);N.setSelectionCell(N.insertVertex(null,null,"",N.snap(f),N.snap(g),pa,ja,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+e+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,e,N.snap(f),N.snap(g),1,1,"text;"+(v?"html=1;":"")),N.updateCellSize(ja),N.fireEvent(new mxEventObject("textInserted","cells",[ja]))}finally{N.getModel().endUpdate()}N.setSelectionCell(ja)}))}else{e=
+Graph.zapGremlins(mxUtils.trim(e));if(this.isCompatibleString(e))return this.importXml(e,f,g,C,null,D);if(0<e.length)if(this.isLucidChartData(e))this.convertLucidChart(e,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,C,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;y=null;N.getModel().beginUpdate();try{y=N.insertVertex(N.getDefaultParent(),null,"",N.snap(f),N.snap(g),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));
N.fireEvent(new mxEventObject("textInserted","cells",[y]));"<"==e.charAt(0)&&e.indexOf(">")==e.length-1&&(e=mxUtils.htmlEntities(e));e.length>this.maxTextBytes&&(e=e.substring(0,this.maxTextBytes)+"...");y.value=e;N.updateCellSize(y);if(0<this.maxTextWidth&&y.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(y,this.maxTextWidth);y.geometry.width=ka.width;y.geometry.height=ka.height}Graph.isLink(y.value)&&N.setLinkForCell(y,y.value);y.geometry.width+=N.gridSize;y.geometry.height+=
N.gridSize}finally{N.getModel().endUpdate()}return[y]}}return[]};EditorUi.prototype.formatFileSize=function(e){var f=-1;do e/=1024,f++;while(1024<e);return Math.max(e,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(e){if("data:"==e.substring(0,5)){var f=e.indexOf(";");0<f&&(e=e.substring(0,f)+e.substring(e.indexOf(",",f+1)))}return e};EditorUi.prototype.isRemoteFileFormat=function(e,f){return/("contentType":\s*"application\/gliffy\+json")/.test(e)};
EditorUi.prototype.isLucidChartData=function(e){return null!=e&&('{"state":"{\\"Properties\\":'==e.substring(0,26)||'{"Properties":'==e.substring(0,14))};EditorUi.prototype.importLocalFile=function(e,f){if(e&&Graph.fileSupport){if(null==this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display=
-"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var u=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+"none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(I,D){StorageFile.listFiles(this,"F",I,D)});window.openBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.getFileContent(this,I,D,N)});window.deleteBrowserFile=mxUtils.bind(this,function(I,D,N){StorageFile.deleteFile(this,I,D,N)});if(!f){var v=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
new OpenFile(mxUtils.bind(this,function(I){this.hideDialog(I)}));window.openFile.setConsumer(mxUtils.bind(this,function(I,D){null!=D&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(D)?(I=new Blob([I],{type:"application/octet-stream"}),this.importVisio(I,mxUtils.bind(this,function(N){this.importXml(N,0,0,!0)}),null,D)):this.editor.graph.setSelectionCells(this.importXml(I,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,
-function(){window.openFile=null});if(!f){var y=this.dialog,C=y.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=u;C.apply(y,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,g){var u=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(C){if(mxUtils.isEmptyObject(C.files))g();else{var I=0,D,N=!1;C.forEach(function(G,ha){G=
-ha.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ha.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ha))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&u.isRemoteFileFormat(G,e.name)?u.isOffline()?u.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):u.parseFileData(G,mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?f(ha.responseText):
-g())}),e.name):g()}):N||g()}},function(C){g(C)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(e,f,g,u,y,C,I,D,N,G,ha,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(qa){var L=null;null!=qa&&"<mxlibrary"==qa.substring(0,10)?this.loadLibrary(new LocalLibrary(this,qa,I)):L=this.importXml(qa,g,u,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
-D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ha?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(ca=this.importXml(f,g,u,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=e.indexOf(";"),0<N&&(e=e.substring(0,N)+e.substring(e.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),u=f.snap(u)),ca=[f.insertVertex(null,null,"",g,u,y,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,y=mxUtils.bind(this,function(qa){4==qa.readyState&&(200<=qa.status&&299>=qa.status?pa(qa.responseText):null!=D&&D(null))}),null!=e?this.parseFileData(e,y,I):this.parseFile(N,
-y,I)):0==e.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(e),g,u,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(e),g,u,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=function(e,f,g,u,y,C,I,D,N,G,ha,ka,ja){u=null!=u?u:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=
-null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var qa=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ha||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){qa=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;y=null!=y?y:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-U,ua)),null):this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});C=null!=C?C:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var la=e.length,q=la,F=[],T=mxUtils.bind(this,function(U,da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=
-D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}C(fa)}}),ba=0;ba<la;ba++)mxUtils.bind(this,function(U){var da=e[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");za=decodeURIComponent(escape(atob(sa.substring(za+
-1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),
-Ma=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Ma=null!=Ma&&"%"!=Ma.charAt(Ma.length-1)?parseFloat(Ma):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Ma);else if(isNaN(Oa)||isNaN(Ma)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Ma=parseFloat(wa[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(u/Math.max(1,Oa)),u/Math.max(1,Ma)),Ya=y(sa,da.type,f+U*Z,g+U*Z,Math.max(1,
-Math.round(Oa*ab)),Math.max(1,Math.round(Ma*ab)),da.name);if(isNaN(Oa)||isNaN(Ma)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Ma=Math.max(1,x.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Ma;La.setAttribute("viewBox","0 0 "+Oa+" "+Ma);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):
-T(U,mxUtils.bind(this,function(){return y(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,function(){return y(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(mxClient.IS_CHROMEAPP?(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,Ma){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ha)?Math.min(1,Math.min(u/Oa,u/Ma)):1;return y(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Ma*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),pa,u,ha,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,y(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?y(null,da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(ba)});
-if(qa){qa=[];for(V=0;V<e.length;V++)qa.push(e[V]);e=qa;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(e,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},u=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
-null,y=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();g();e(I)};null==u||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){y(C,!0)},function(C){y(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
-!0,!0):y(!1,u)};EditorUi.prototype.parseFile=function(e,f,g){g=null!=g?g:e.name;var u=new FileReader;u.onload=mxUtils.bind(this,function(){this.parseFileData(u.result,f,g)});u.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,g){var u=new XMLHttpRequest;u.open("POST",OPEN_URL);u.setRequestHeader("Content-Type","application/x-www-form-urlencoded");u.onreadystatechange=function(){f(u)};u.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,g,u,y,C,I){y=null!=y?y:this.maxImageSize;var D=Math.max(1,e.width),N=Math.max(1,e.height);if(u&&this.isResampleImageSize(null!=I?I:f.length,C))try{var G=Math.max(D/y,N/y);if(1<G){var ha=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ha;ja.height=ka;ja.getContext("2d").drawImage(e,0,0,
-ha,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ha;pa.height=ka;var qa=pa.toDataURL();ca!==qa&&(f=ca,D=ha,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,g){try{var u=new Image;u.onload=function(){u.width=0<u.width?u.width:120;u.height=0<u.height?u.height:120;f(u)};null!=g&&(u.onerror=g);u.src=e}catch(y){if(null!=g)g(y);else throw y;
-}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var B=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("plantUml")+
-":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(Z,Y.format,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(la),[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},
-function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generateMermaidImage(Z,Y.config,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,
-q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),
-null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):g.apply(this,arguments)}}catch(Z){e.handleError(Z)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(R){e.handleError(R)}return V};var u=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=u.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});
-return V};var y=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:
-null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var C=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var R=C.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&
-"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";R=e.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||
-(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;
-V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);null!=Y&&Y(Z,la)};N.call(this,L,V,R)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,
-V,R){e.editor.graph.isSelectionEmpty()?G.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ha=f.getExportVariables;f.getExportVariables=function(){var L=ha.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=
-null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:
-1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=
-this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,
-!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
-null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,
-function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,ba,U){f.insertImage(la,ba,U)},function(){},function(la){return"image/"==la.type.substring(0,6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),
-mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",
-!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=
-document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?
-!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var qa=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=qa&&(qa.parentNode.removeChild(qa),qa=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(L){null==qa&&(!mxClient.IS_IE||10<document.documentMode)&&(qa=this.highlightElement(f.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=qa&&(qa.parentNode.removeChild(qa),qa=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,
-"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var ba=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(ba=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,
-function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,ba,null,U,mxEvent.isControlDown(L)))});ba&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,
-null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();
-ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||
-!this.isSettingsEnabled()||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(("auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode)||"dark"==uiTheme||"1"==urlParams.dark)&&this.setDarkMode(!0);this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",
-mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,u=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){u=!0;break}if(!u){var C=g.items;for(index in C){var I=C[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(N,G,ha,ka,ja,ca){e.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});
-else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
-"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var u=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||u||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
-C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),u=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!u||224!=I&&17!=I&&91!=I&&93!=I||(u=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),
-0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=C.clipboardData&&this.pasteCells(C,
-g,!0,!0),!mxEvent.isConsumed(C))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(C,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};
-EditorUi.prototype.doSetCurrentTheme=function(e,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var u=Editor.currentTheme;e=g(e)?"default":e;u=g(u)?"default":u;var y="simple"==u&&"default"==e||"default"==u&&"simple"==e;if(y&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;var C=this.editor.graph.view.translate,I=C.x,D=C.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ha=this.editor.graph.container.scrollTop-N.y;
-f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==u&&"default"==e?(this.sidebarFooterContainer.style.display="block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=
-EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==u&&"simple"==e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display="none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));
-this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(C.x-I)*ka;this.editor.graph.container.scrollTop=ha+N.y+(C.y-D)*ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);this.editor.fireEvent(new mxEventObject("statusChanged"));delete this.themeSwitching}),f)}),f)}),f)}),0)}return y};EditorUi.prototype.installStatusMinimizer=
-function(e){e=null!=e?e:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(){f||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var u=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?
-this.statusContainer.firstChild:null;f=null!=u&&null!=u.getAttribute("class");if(!f&&null!=u){u=u.getAttribute("title");var y=this.getCurrentFile();y=null!=y?y.savingStatusKey:DrawioFile.prototype.savingStatusKey;u==mxResources.get(y)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(y))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";u=26>e.clientWidth;e.style.visibility=u&&""==this.editor.getStatus()?"hidden":"";
-if(u||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(e){"default"==e&&null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex="1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&
-this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"simple"==e&&(this.createFormatWindow(),
-this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=e&&(this.format.showCloseButton=e,this.format.refresh()))};
-EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=
-this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;
-f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;"simple"==e?(mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,
-Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(e){"simple"==e?null==this.sketchStyleElt&&
-(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"simple"==e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),
-this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=
-function(e){if("simple"==e&&null==this.sketchMainMenuElt){this.sketchMainMenuElt=document.createElement("div");this.sketchMainMenuElt.className="geToolbarContainer";this.sketchMainMenuElt.style.cssText="position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage));
-this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage));var f=this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),g=this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",Editor.redoImage));e=mxUtils.bind(this,function(){f.style.display=0<this.editor.undoManager.history.length||this.editor.graph.isEditing()?"inline-block":"none";g.style.display=f.style.display});this.actions.get("undo").addListener("stateChanged",e);this.actions.get("redo").addListener("stateChanged",
-e);e();this.sketchWrapperElt.appendChild(this.sketchMainMenuElt)}};EditorUi.prototype.createFooterMenuForTheme=function(e){if("simple"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
-e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var u=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var C=this.currentPage.getId();
-f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+u+")"+(null!=C?" ["+C+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
-g);this.editor.addListener("pagesPatched",g);g();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(g);mxUtils.bind(this,function(u){mxEvent.addListener(u,"click",
-mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var y=mxUtils.bind(this,function(){u.innerText="";mxUtils.write(u,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
+function(){window.openFile=null});if(!f){var y=this.dialog,C=y.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;C.apply(y,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(e,f,g){var v=this,y=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(e).then(function(C){if(mxUtils.isEmptyObject(C.files))g();else{var I=0,D,N=!1;C.forEach(function(G,ia){G=
+ia.name.toLowerCase();"diagram/diagram.xml"==G?(N=!0,ia.async("string").then(function(ka){0==ka.indexOf("<mxfile ")?f(ka):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>I&&(I=G,D=ia))});0<I?D.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,e.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):v.parseFileData(G,mxUtils.bind(this,function(ia){4==ia.readyState&&(200<=ia.status&&299>=ia.status?f(ia.responseText):
+g())}),e.name):g()}):N||g()}},function(C){g(C)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importFile=function(e,f,g,v,y,C,I,D,N,G,ia,ka){G=null!=G?G:!0;var ja=!1,ca=null,pa=mxUtils.bind(this,function(ra){var L=null;null!=ra&&"<mxlibrary"==ra.substring(0,10)?this.loadLibrary(new LocalLibrary(this,ra,I)):L=this.importXml(ra,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null);null!=
+D&&D(L)});"image"==f.substring(0,5)?(N=!1,"image/png"==f.substring(0,9)&&(f=ia?null:this.extractGraphModelFromPng(e),null!=f&&0<f.length&&(ca=this.importXml(f,g,v,G,null,null!=ka?mxEvent.isControlDown(ka):null),N=!0)),N||(f=this.editor.graph,N=e.indexOf(";"),0<N&&(e=e.substring(0,N)+e.substring(e.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,y,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e+";")])):/(\.*<graphml )/.test(e)?(ja=!0,this.importGraphML(e,pa)):null!=N&&null!=I&&(/(\.v(dx|sdx?))($|\?)/i.test(I)||/(\.vs(x|sx?))($|\?)/i.test(I))?(ja=!0,this.importVisio(N,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,y=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&D(null))}),null!=e?this.parseFileData(e,y,I):this.parseFile(N,
+y,I)):0==e.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(e),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=function(e,f,g,v,y,C,I,D,N,G,ia,ka,ja){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var ca=
+null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var ra=!1;if(!mxClient.IS_CHROMEAPP&&null!=e)for(var L=ia||this.resampleThreshold,V=0;V<e.length;V++)if("image/svg"!==e[V].type.substring(0,9)&&"image/"===e[V].type.substring(0,6)&&e[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;y=null!=y?y:mxUtils.bind(this,function(U,da,fa,na,sa,za,ua,Ba,oa){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+U,ua)),null):"atlassian"!=this.getServiceName()&&"1"!=urlParams.embed&&this.isCompatibleString(U)&&1==e.length&&this.isBlankFile()&&!this.canUndo()?(this.spinner.stop(),this.fileLoaded(new LocalFile(this,U,ua,!0)),null):this.importFile(U,da,fa,na,sa,za,ua,Ba,oa,ca,ka,ja)}catch(Aa){return this.handleError(Aa),null}});C=null!=C?C:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var la=e.length,q=la,F=[],T=mxUtils.bind(this,function(U,
+da){F[U]=da;if(0==--q){this.spinner.stop();if(null!=D)D(F);else{var fa=[];Y.getModel().beginUpdate();try{for(U=0;U<F.length;U++){var na=F[U]();null!=na&&(fa=fa.concat(na))}}finally{Y.getModel().endUpdate()}}C(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=e[U];if(null!=da){var fa=new FileReader;fa.onload=mxUtils.bind(this,function(na){if(null==I||I(da))if("image/"==da.type.substring(0,6))if("image/svg"==da.type.substring(0,9)){var sa=Graph.clipSvgDataUri(na.target.result),za=sa.indexOf(",");
+za=decodeURIComponent(escape(atob(sa.substring(za+1))));var ua=mxUtils.parseXml(za);za=ua.getElementsByTagName("svg");if(0<za.length){za=za[0];var Ba=ka?null:za.getAttribute("content");null!=Ba&&"<"!=Ba.charAt(0)&&"%"!=Ba.charAt(0)&&(Ba=unescape(window.atob?atob(Ba):Base64.decode(Ba,!0)));null!=Ba&&"%"==Ba.charAt(0)&&(Ba=decodeURIComponent(Ba));null==Ba||"<mxfile "!==Ba.substring(0,8)&&"<mxGraphModel "!==Ba.substring(0,14)?T(U,mxUtils.bind(this,function(){try{if(null!=ua){var ya=ua.getElementsByTagName("svg");
+if(0<ya.length){var La=ya[0],Oa=La.getAttribute("width"),Na=La.getAttribute("height");Oa=null!=Oa&&"%"!=Oa.charAt(Oa.length-1)?parseFloat(Oa):NaN;Na=null!=Na&&"%"!=Na.charAt(Na.length-1)?parseFloat(Na):NaN;var Ia=La.getAttribute("viewBox");if(null==Ia||0==Ia.length)La.setAttribute("viewBox","0 0 "+Oa+" "+Na);else if(isNaN(Oa)||isNaN(Na)){var wa=Ia.split(" ");3<wa.length&&(Oa=parseFloat(wa[2]),Na=parseFloat(wa[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(La));var ab=Math.min(1,Math.min(v/Math.max(1,
+Oa)),v/Math.max(1,Na)),Ya=y(sa,da.type,f+U*Z,g+U*Z,Math.max(1,Math.round(Oa*ab)),Math.max(1,Math.round(Na*ab)),da.name);if(isNaN(Oa)||isNaN(Na)){var x=new Image;x.onload=mxUtils.bind(this,function(){Oa=Math.max(1,x.width);Na=Math.max(1,x.height);Ya[0].geometry.width=Oa;Ya[0].geometry.height=Na;La.setAttribute("viewBox","0 0 "+Oa+" "+Na);sa=Editor.createSvgDataUri(mxUtils.getXml(La));var O=sa.indexOf(";");0<O&&(sa=sa.substring(0,O)+sa.substring(sa.indexOf(",",O+1)));Y.setCellStyles("image",sa,[Ya[0]])});
+x.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return y(Ba,"text/xml",f+U*Z,g+U*Z,0,0,da.name)}))}else T(U,mxUtils.bind(this,function(){return null}))}else{za=!1;if("image/png"==da.type){var oa=ka?null:this.extractGraphModelFromPng(na.target.result);if(null!=oa&&0<oa.length){var Aa=new Image;Aa.src=na.target.result;T(U,mxUtils.bind(this,function(){return y(oa,"text/xml",f+U*Z,g+U*Z,Aa.width,Aa.height,da.name)}));za=!0}}za||(mxClient.IS_CHROMEAPP?
+(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(na.target.result,mxUtils.bind(this,function(ya){this.resizeImage(ya,na.target.result,mxUtils.bind(this,function(La,Oa,Na){T(U,mxUtils.bind(this,function(){if(null!=La&&La.length<G){var Ia=pa&&this.isResampleImageSize(da.size,ia)?
+Math.min(1,Math.min(v/Oa,v/Na)):1;return y(La,da.type,f+U*Z,g+U*Z,Math.round(Oa*Ia),Math.round(Na*Ia),da.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,v,ia,da.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=na.target.result,y(sa,da.type,f+U*Z,g+U*Z,240,160,da.name,function(ya){T(U,function(){return ya})},da)});/(\.v(dx|sdx?))($|\?)/i.test(da.name)||/(\.vs(x|sx?))($|\?)/i.test(da.name)?y(null,
+da.type,f+U*Z,g+U*Z,240,160,da.name,function(na){T(U,function(){return na})},da):"image"==da.type.substring(0,5)||"application/pdf"==da.type?fa.readAsDataURL(da):fa.readAsText(da)}})(aa)});if(ra){ra=[];for(V=0;V<e.length;V++)ra.push(e[V]);e=ra;this.confirmImageResize(function(Y){pa=Y;R()},N)}else R()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
+function(e,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,y=function(C,I){if(C||f)mxSettings.setResizeImages(C?I:null),mxSettings.save();g();e(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){y(C,!0)},function(C){y(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):y(!1,v)};EditorUi.prototype.parseFile=function(e,f,g){g=null!=g?g:e.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(e)};EditorUi.prototype.parseFileData=function(e,f,g){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
+v.onreadystatechange=function(){f(v)};v.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(e));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(y){}};EditorUi.prototype.isResampleImageSize=function(e,f){f=null!=f?f:this.resampleThreshold;return e>f};EditorUi.prototype.resizeImage=function(e,f,g,v,y,C,I){y=null!=y?y:this.maxImageSize;var D=Math.max(1,e.width),N=Math.max(1,e.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,C))try{var G=
+Math.max(D/y,N/y);if(1<G){var ia=Math.round(D/G),ka=Math.round(N/G),ja=document.createElement("canvas");ja.width=ia;ja.height=ka;ja.getContext("2d").drawImage(e,0,0,ia,ka);var ca=ja.toDataURL();if(ca.length<f.length){var pa=document.createElement("canvas");pa.width=ia;pa.height=ka;var ra=pa.toDataURL();ca!==ra&&(f=ca,D=ia,N=ka)}}}catch(L){}g(f,D,N)};EditorUi.prototype.extractGraphModelFromPng=function(e){return Editor.extractGraphModelFromPng(e)};EditorUi.prototype.loadImage=function(e,f,g){try{var v=
+new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;f(v)};null!=g&&(v.onerror=g);v.src=e}catch(y){if(null!=g)g(y);else throw y;}};EditorUi.prototype.getDefaultSketchMode=function(){var e="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:e)};var B=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&
+this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var e=this,f=this.editor.graph;Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(L){var V=L.getEvent();return null==L.getState()&&!mxEvent.isMouseEvent(V)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(V)&&
+(null==L.getState()||mxEvent.isControlDown(V)||mxEvent.isShiftDown(V))});f.cellEditor.editPlantUmlData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&e.generatePlantUmlImage(Z,Y.format,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",e.convertDataUri(la),
+[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=q,T.height=F,f.cellsResized([L],[T],!1))}f.setAttributeForCell(L,"plantUmlData",JSON.stringify({data:Z,format:Y.format}))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(e,mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&e.spinner.spin(document.body,mxResources.get("inserting"))&&
+e.generateMermaidImage(Z,Y.config,function(la,q,F){e.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",la,[L]);var T=f.model.getGeometry(L);null!=T&&(T=T.clone(),T.width=Math.max(T.width,q),T.height=Math.max(T.height,F),f.cellsResized([L],[T],!1));f.setAttributeForCell(L,"mermaidData",JSON.stringify({data:Z,config:Y.config},null,2))}finally{f.getModel().endUpdate()}},function(la){e.handleError(la)})},null,null,400,220);e.showDialog(V.container,420,300,!0,!0);V.init()};var g=f.cellEditor.startEditing;
+f.cellEditor.startEditing=function(L,V){try{var R=this.graph.getAttributeForCell(L,"plantUmlData");if(null!=R)this.editPlantUmlData(L,V,R);else if(R=this.graph.getAttributeForCell(L,"mermaidData"),null!=R)this.editMermaidData(L,V,R);else{var Y=f.getCellStyle(L);"1"==mxUtils.getValue(Y,"metaEdit","0")?e.showDataDialog(L):g.apply(this,arguments)}}catch(Z){e.handleError(Z)}};f.getLinkTitle=function(L){return e.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{e.handleCustomLink(L),V=!0}catch(R){e.handleError(R)}return V};
+var v=f.parseBackgroundImage;f.parseBackgroundImage=function(L){var V=v.apply(this,arguments);null!=V&&null!=V.src&&Graph.isPageLink(V.src)&&(V={originalSrc:V.src});return V};var y=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=e.createImageForPageLink(L.originalSrc,e.currentPage,this));y.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,
+function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(L,V){L=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=L){var R=L.indexOf(",");if(0<R)for(L=L.substring(R+1),V=V.getProperty("patches"),R=0;R<V.length;R++)if(null!=V[R][EditorUi.DIFF_UPDATE]&&null!=V[R][EditorUi.DIFF_UPDATE][L]||null!=V[R][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(V[R][EditorUi.DIFF_REMOVE],L)){f.refreshBackgroundImage();break}}}));var C=f.getBackgroundImageObject;
+f.getBackgroundImageObject=function(L,V){var R=C.apply(this,arguments);if(null!=R&&null!=R.originalSrc)if(!V)R={src:R.originalSrc};else if(V&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var Y=this.stylesheet,Z=this.shapeForegroundColor,la=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";R=e.createImageForPageLink(R.originalSrc);this.shapeBackgroundColor=la;this.shapeForegroundColor=Z;this.stylesheet=
+Y}return R};var I=this.clearDefaultStyle;this.clearDefaultStyle=function(){I.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var D=e.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(L){L=null!=
+L?L:"";"1"==urlParams.dev&&(L+=(0<L.length?"&":"?")+"dev=1");return D.apply(this,arguments)};var N=f.addClickHandler;f.addClickHandler=function(L,V,R){var Y=V;V=function(Z,la){if(null==la){var q=mxEvent.getSource(Z);"a"==q.nodeName.toLowerCase()&&(la=q.getAttribute("href"))}null!=la&&f.isCustomLink(la)&&(mxEvent.isTouchEvent(Z)||!mxEvent.isPopupTrigger(Z))&&f.customLinkClicked(la)&&mxEvent.consume(Z);null!=Y&&Y(Z,la)};N.call(this,L,V,R)};B.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,
+null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(L,V,R){e.editor.graph.isSelectionEmpty()?G.apply(this,arguments):e.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}e.actions.get("print").funct=function(){e.showDialog((new PrintDialog(e)).container,360,null!=e.pages&&1<e.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var ia=f.getExportVariables;f.getExportVariables=
+function(){var L=ia.apply(this,arguments),V=e.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=e.pages?e.pages.length:1;L.page=null!=e.currentPage?e.currentPage.getName():"";L.pagenumber=null!=e.pages&&null!=e.currentPage?mxUtils.indexOf(e.pages,e.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=e.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=e.currentPage?e.currentPage.getName():"pagenumber"==L?null!=e.currentPage&&
+null!=e.pages?mxUtils.indexOf(e.pages,e.currentPage)+1:1:"pagecount"==L?null!=e.pages?e.pages.length:1:ka.apply(this,arguments)};var ja=f.labelLinkClicked;f.labelLinkClicked=function(L,V,R){var Y=V.getAttribute("href");if(null==Y||!f.isCustomLink(Y)||!mxEvent.isTouchEvent(R)&&mxEvent.isPopupTrigger(R))ja.apply(this,arguments);else{if(!f.isEnabled()||null!=L&&f.isCellLocked(L.cell))f.customLinkClicked(Y),f.getRubberband().reset();mxEvent.consume(R)}};this.editor.getOrCreateFilename=function(){var L=
+e.defaultFilename,V=e.getCurrentFile();null!=V&&(L=null!=V.getTitle()?V.getTitle():L);return L};var ca=this.actions.get("print");ca.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ca.visible=ca.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),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,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",
+mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(L){var V=f.cellEditor.text2,R=null;null!=V&&(mxEvent.addListener(V,"dragleave",function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);Y.stopPropagation();Y.preventDefault()}),mxEvent.addListener(V,"dragover",mxUtils.bind(this,function(Y){null==R&&(!mxClient.IS_IE||10<document.documentMode)&&(R=this.highlightElement(V));
+Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(V,"drop",mxUtils.bind(this,function(Y){null!=R&&(R.parentNode.removeChild(R),R=null);if(0<Y.dataTransfer.files.length)this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,function(la,q,F,T,aa,U){f.insertImage(la,aa,U)},function(){},function(la){return"image/"==la.type.substring(0,6)},function(la){for(var q=0;q<la.length;q++)la[q]()},mxEvent.isControlDown(Y));else if(0<=mxUtils.indexOf(Y.dataTransfer.types,"text/uri-list")){var Z=
+Y.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(Z)?this.loadImage(decodeURIComponent(Z),mxUtils.bind(this,function(la){var q=Math.max(1,la.width);la=Math.max(1,la.height);var F=this.maxImageSize;F=Math.min(1,Math.min(F/Math.max(1,q)),F/Math.max(1,la));f.insertImage(decodeURIComponent(Z),q*F,la*F)})):document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(Y.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,
+Y.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(Y.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,Y.dataTransfer.getData("text/plain"));Y.stopPropagation();Y.preventDefault()})))}));this.isSettingsEnabled()&&(ca=this.editor.graph.view,ca.setUnit(mxSettings.getUnit()),ca.addListener("unitChanged",function(L,V){mxSettings.setUnit(V.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||
+this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ca.unit),this.refresh());if("1"==urlParams.styledev){ca=document.getElementById("geFooter");null!=ca&&(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)})),ca.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(L,V){0<this.editor.graph.getSelectionCount()?(L=this.editor.graph.getSelectionCell(),L=this.editor.graph.getModel().getStyle(L),this.styleInput.value=L||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));
+var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(L){return mxEvent.getSource(L)==this.styleInput?!0:pa.apply(this,arguments)}}ca=document.getElementById("geInfo");null!=ca&&ca.parentNode.removeChild(ca);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var ra=null;mxEvent.addListener(f.container,"dragleave",function(L){f.isEnabled()&&(null!=ra&&(ra.parentNode.removeChild(ra),ra=null),L.stopPropagation(),L.preventDefault())});mxEvent.addListener(f.container,"dragover",
+mxUtils.bind(this,function(L){null==ra&&(!mxClient.IS_IE||10<document.documentMode)&&(ra=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();L.stopPropagation();L.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(L){null!=ra&&(ra.parentNode.removeChild(ra),ra=null);if(f.isEnabled()){var V=mxUtils.convertPoint(f.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),R=L.dataTransfer.files,Y=f.view.translate,Z=f.view.scale,la=V.x/Z-
+Y.x,q=V.y/Z-Y.y;if(0<R.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(L)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(R,!0)):(mxEvent.isAltDown(L)&&(q=la=null),this.importFiles(R,la,q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(L),null,null,mxEvent.isShiftDown(L),L));else{mxEvent.isAltDown(L)&&(q=la=0);var F=0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")?L.dataTransfer.getData("text/uri-list"):null;V=this.extractGraphModelFromEvent(L,
+null!=this.pages);if(null!=V)f.setSelectionCells(this.importXml(V,la,q,!0));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")){var T=L.dataTransfer.getData("text/html");V=document.createElement("div");V.innerHTML=f.sanitizeHtml(T);var aa=null;R=V.getElementsByTagName("img");null!=R&&1==R.length?(T=R[0].getAttribute("src"),null==T&&(T=R[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)||(aa=!0)):(R=V.getElementsByTagName("a"),null!=R&&1==R.length?T=R[0].getAttribute("href"):
+(V=V.getElementsByTagName("pre"),null!=V&&1==V.length&&(T=mxUtils.getTextContent(V[0]))));var U=!0,da=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(T,la,q,!0,aa,null,U,mxEvent.isControlDown(L)))});aa&&null!=T&&T.length>this.resampleThreshold?this.confirmImageResize(function(fa){U=fa;da()},mxEvent.isControlDown(L)):da()}else null!=F&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(fa){var na=Math.max(1,fa.width);fa=Math.max(1,
+fa.height);var sa=this.maxImageSize;sa=Math.min(1,Math.min(sa/Math.max(1,na)),sa/Math.max(1,fa));f.setSelectionCell(f.insertVertex(null,null,"",la,q,na*sa,fa*sa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+F+";"))}),mxUtils.bind(this,function(fa){f.setSelectionCells(this.insertTextAt(F,la,q,!0))})):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(L.dataTransfer.getData("text/plain"),
+la,q,!0))}}L.stopPropagation();L.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();ca=mxUtils.bind(this,function(){f.refresh();f.view.validateBackground();this.updateTabContainer();this.hideShapePicker()});this.addListener("darkModeChanged",ca);this.addListener("sketchModeChanged",ca);this.addListener("currentThemeChanged",mxUtils.bind(this,function(){this.updateButtonContainer();this.refresh()}));f.addListener("enabledChanged",mxUtils.bind(this,
+function(){f.isEnabled()||this.hideShapePicker()}));"simple"==Editor.currentTheme&&(Editor.currentTheme="",this.doSetCurrentTheme("simple",0));mxClient.IS_IE||mxClient.IS_IE11||"0"==urlParams.dark||"atlas"==Editor.currentTheme||"1"==urlParams.embed&&"1"!=urlParams.dark||(ca=!1,this.isSettingsEnabled()&&(ca="auto"==mxSettings.settings.darkMode||"auto"==urlParams.dark?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches:!0===mxSettings.settings.darkMode),(ca||"dark"==uiTheme||
+"1"==urlParams.dark)&&this.setDarkMode(!0));this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var e=this.editor.graph;e.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,y=0;y<g.types.length;y++)if("text/"===g.types[y].substring(0,5)){v=!0;break}if(!v){var C=g.items;for(index in C){var I=C[index];if("file"===I.kind){if(e.isEditing())this.importFiles([I.getAsFile()],
+0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){e.insertImage(N,ja,ca)},function(){},function(N){return"image/"==N.type.substring(0,6)},function(N){for(var G=0;G<N.length;G++)N[G]()});else{var D=this.editor.graph.getInsertPoint();this.importFiles([I.getAsFile()],D.x,D.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(N){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function e(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",
+!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize=
+"1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var I=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||
+"TEXTAREA"==I.nodeName||224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var I=C.keyCode;window.setTimeout(mxUtils.bind(this,
+function(){!v||224!=I&&17!=I&&91!=I&&93!=I||(v=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),e()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(C){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),e()}catch(I){this.handleError(I)}}));
+mxEvent.addListener(g,"paste",mxUtils.bind(this,function(C){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=C.clipboardData&&this.pasteCells(C,g,!0,!0),!mxEvent.isConsumed(C))){var I=f.container.scrollLeft,D=f.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){f.container.scrollLeft=I;f.container.scrollTop=D;this.pasteCells(C,g,!1,!0)}),0)}}),!0);var y=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==
+g?!0:y.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(e,f){mxSettings.setUi(e);(f=this.doSetCurrentTheme(e)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(e,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;e=g(e)?"default":e;v=g(v)?"default":v;var y="simple"==v&&"default"==e||"default"==v&&"simple"==e;if(y&&!this.themeSwitching){Editor.currentTheme=e;this.themeSwitching=!0;
+var C=this.editor.graph.view.translate,I=C.x,D=C.y,N=mxUtils.getOffset(this.editor.graph.container),G=this.editor.graph.container.scrollLeft-N.x,ia=this.editor.graph.container.scrollTop-N.y;f=null!=f?f:100;mxUtils.setPrefixedStyle(this.container.style,"transition","all "+f+"ms");0==f&&(this.container.style.opacity="0");window.setTimeout(mxUtils.bind(this,function(){this.container.style.opacity="0";window.setTimeout(mxUtils.bind(this,function(){"simple"==v&&"default"==e?(this.sidebarFooterContainer.style.display=
+"block",this.menubarContainer.style.display="block",this.toolbarContainer.style.display="block",this.tabContainer.style.display="block",this.hsplit.style.display="block",this.hsplitPosition=EditorUi.prototype.hsplitPosition,this.menubarHeight=App.prototype.menubarHeight,this.formatWidth=EditorUi.prototype.formatWidth):"default"==v&&"simple"==e&&(this.sidebarFooterContainer.style.display="none",this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.tabContainer.style.display=
+"none",this.hsplit.style.display="none",this.formatWidth=this.menubarHeight=this.hsplitPosition=0);this.switchTheme(e);window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));this.editor.graph.refresh();var ka=this.editor.graph.view.scale;N=mxUtils.getOffset(this.editor.graph.container);this.editor.graph.container.scrollLeft=G+N.x+(C.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(C.y-D)*
+ka;this.container.style.opacity="";window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.container.style,"transition",null);delete this.themeSwitching}),f)}),f)}),f)}),0)}return y};EditorUi.prototype.installStatusMinimizer=function(e){e=null!=e?e:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,
+function(){f||(this.statusContainer.style.display="none")}));var g=mxUtils.bind(this,function(){if("simple"==Editor.currentTheme||"1"==urlParams.sketch){var v=null!=this.statusContainer.firstChild&&"function"===typeof this.statusContainer.firstChild.getAttribute?this.statusContainer.firstChild:null;f=null!=v&&null!=v.getAttribute("class");if(!f&&null!=v){v=v.getAttribute("title");var y=this.getCurrentFile();y=null!=y?y.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(y)+"..."&&
+(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(y))+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>e.clientWidth;e.style.visibility=v&&""==this.editor.getStatus()?"hidden":"";if(v||f)this.statusContainer.style.display="inline-block",f=!0}});this.editor.addListener("statusChanged",g);g()};EditorUi.prototype.switchTheme=function(e){"default"==e&&(null!=this.formatContainer&&(this.formatContainer.style.left="",this.formatContainer.style.zIndex=
+"1",this.formatContainer.style.border="",null!=this.footerContainer&&this.footerContainer.parentNode!=this.formatContainer.parentNode&&this.footerContainer.parentNode.insertBefore(this.formatContainer,this.footerContainer),null!=this.sidebarContainer&&this.formatContainer.parentNode!=this.sidebarContainer.parentNode&&this.formatContainer.parentNode.insertBefore(this.sidebarContainer,this.formatContainer)),this.toggleCompactMode(!0));this.destroyWindows();this.updateUserElement();this.updateDefaultStyles();
+this.switchThemeConstants(e);this.switchCssForTheme(e);this.createWrapperForTheme(e);this.createPickerMenuForTheme(e);this.createMainMenuForTheme(e);this.createMenubarForTheme(e);this.createFooterMenuForTheme(e);this.sidebarContainer.style.display="";"simple"==e&&(this.createFormatWindow(),this.formatContainer.style.left="0px",this.formatContainer.style.top="0px",this.formatContainer.style.width="",this.formatContainer.style.zIndex="",this.formatContainer.style.border="none",this.createShapesWindow(),
+this.sidebarContainer.style.left="0px",this.sidebarContainer.style.top="0px",this.sidebarContainer.style.bottom="0px",this.sidebarContainer.style.width="100%");null!=this.format&&(e="default"==e||"atlas"==e,this.format.showCloseButton!=e&&(this.format.showCloseButton=e,this.format.refresh()))};EditorUi.prototype.destroyWindows=function(){null!=this.sidebarWindow&&(this.sidebarWindow.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.destroy(),this.formatWindow=null);null!=
+this.freehandWindow&&(this.freehandWindow.destroy(),this.freehandWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
+(this.menus.findReplaceWindow.destroy(),this.menus.findReplaceWindow=null);null!=this.menus.commentsWindow&&(this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null)};EditorUi.prototype.switchThemeConstants=function(e){var f=this.editor.graph;f.defaultEdgeLength=Graph.prototype.defaultEdgeLength;f.defaultGridEnabled=Graph.prototype.defaultGridEnabled;f.defaultPageVisible=Graph.prototype.defaultPageVisible;null!=this.menus&&(this.menus.autoPopup="simple"!=e);"simple"==e?(mxWindow.prototype.closeImage=
+Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src,mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src,Editor.fitWindowBorders=new mxRectangle(60,30,30,30),f.defaultEdgeLength=120,null==urlParams.grid&&(f.defaultGridEnabled=
+!1),null==urlParams.pv&&(f.defaultPageVisible=!1)):(mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif",mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif",mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif",Editor.fitWindowBorders=null)};EditorUi.prototype.switchCssForTheme=function(e){"simple"==e?null==this.sketchStyleElt&&(this.sketchStyleElt=document.createElement("style"),this.sketchStyleElt.setAttribute("type","text/css"),this.sketchStyleElt.innerHTML=
+Editor.createMinimalCss(),document.getElementsByTagName("head")[0].appendChild(this.sketchStyleElt)):null!=this.sketchStyleElt&&(this.sketchStyleElt.parentNode.removeChild(this.sketchStyleElt),this.sketchStyleElt=null)};EditorUi.prototype.createWrapperForTheme=function(e){"simple"==e?(null==this.sketchWrapperElt&&(this.sketchWrapperElt=document.createElement("div"),this.sketchWrapperElt.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;"),this.diagramContainer.parentNode.appendChild(this.sketchWrapperElt),
+this.sketchWrapperElt.appendChild(this.diagramContainer)):null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode&&(this.tabContainer.parentNode.insertBefore(this.diagramContainer,this.tabContainer),this.sketchWrapperElt.parentNode.removeChild(this.sketchWrapperElt))};EditorUi.prototype.createMainMenuForTheme=function(e){"simple"==e&&null==this.sketchMainMenuElt&&(this.sketchMainMenuElt=document.createElement("div"),this.sketchMainMenuElt.className="geToolbarContainer",this.sketchMainMenuElt.style.cssText=
+"position:absolute;left:10px;top:10px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",this.sketchMainMenuElt.appendChild(this.createMenu("diagram",Editor.menuImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("delete",Editor.trashImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("undo",Editor.undoImage)),this.sketchMainMenuElt.appendChild(this.createMenuItem("redo",
+Editor.redoImage)),this.sketchWrapperElt.appendChild(this.sketchMainMenuElt))};EditorUi.prototype.createFooterMenuForTheme=function(e){if("simple"==e&&null==this.sketchFooterMenuElt){this.sketchFooterMenuElt=document.createElement("div");this.sketchFooterMenuElt.className="geToolbarContainer";this.sketchFooterMenuElt.style.cssText="position:absolute;right:12px;bottom:12px;height:44px;border-radius:4px;padding:9px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;";
+e=this.sketchFooterMenuElt;var f=this.createPageMenuTab(!1,!0);f.className="geToolbarButton";f.style.cssText="display:inline-block;cursor:pointer;overflow:hidden;padding:4px;white-space:nowrap;max-width:160px;text-overflow:ellipsis;filter:none;opacity:1;";e.appendChild(f);var g=mxUtils.bind(this,function(){f.innerText="";if(null!=this.currentPage){mxUtils.write(f,this.currentPage.getName());var v=null!=this.pages?this.pages.length:1,y=this.getPageIndex(this.currentPage);y=null!=y?y+1:1;var C=this.currentPage.getId();
+f.setAttribute("title",this.currentPage.getName()+" ("+y+"/"+v+")"+(null!=C?" ["+C+"]":""))}});this.editor.addListener("pagesPatched",g);this.editor.addListener("pageSelected",g);this.editor.addListener("pageRenamed",g);this.editor.addListener("fileLoaded",g);g();g=mxUtils.bind(this,function(){f.style.display=null!=this.pages&&("0"!=urlParams.pages||1<this.pages.length||Editor.pagesVisible)?"inline-block":"none"});this.addListener("fileDescriptorChanged",g);this.addListener("pagesVisibleChanged",
+g);this.editor.addListener("pagesPatched",g);g();e.appendChild(this.createMenuItem("zoomOut",Editor.minusImage));g=this.createMenu("viewZoom");g.setAttribute("title",mxResources.get("zoom"));g.innerHTML="100%";g.className="geToolbarButton";g.style.cssText="display:inline-block;position:relative;vertical-align:top;opacity:1;color:inherit;padding:4px;box-shadow:none;width:40px;text-align:center;margin-right:-6px;filter:none;";e.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",
+mxUtils.bind(this,function(C){mxEvent.isAltDown(C)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(C)):mxEvent.isShiftDown(C)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(C))}));var y=mxUtils.bind(this,function(){v.innerText="";mxUtils.write(v,Math.round(100*this.editor.graph.view.scale)+"%")});this.editor.graph.view.addListener(mxEvent.EVENT_SCALE,y);this.editor.addListener("resetGraphView",y);this.editor.addListener("pageSelected",
y)})(g);e.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(e){if("simple"==e&&null==this.sketchPickerMenuElt){this.sketchPickerMenuElt=document.createElement("div");this.sketchPickerMenuElt.className="geToolbarContainer";this.sketchPickerMenuElt.style.cssText="position:absolute;left:10px;border-radius:4px;padding:0px 4px 4px;white-space:nowrap;z-index:1;transform:translate(0, -50%);top:50%;user-select:none;width:40px;";
-var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var u=this.createMenuItem("insertFreehand",Editor.freehandImage,
-!0);u.style.paddingLeft="12px";u.style.backgroundSize="";u.style.width="26px";u.style.height="30px";u.style.opacity="0.7";var y=this.createMenu("insert",Editor.shapesImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var C=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!C){var D=function(G,ha,ka,ja){null!=ha&&G.setAttribute("title",ha);G.style.cursor="pointer";G.style.margin=
-"8px 0px";G.style.display="block";f.appendChild(G);null!=ja&&(G.style.position="relative",G.style.overflow="visible",ha=document.createElement("div"),ha.style.position="absolute",ha.style.fontSize="8px",ha.style.left="32px",ha.style.top="28px",mxUtils.write(ha,ja),G.appendChild(ha));return G};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
+var f=this.sketchPickerMenuElt;mxUtils.setPrefixedStyle(f.style,"transition","transform .3s ease-out");var g=document.createElement("a");g.style.padding="0px";g.style.boxShadow="none";g.className="geMenuItem";g.style.display="block";g.style.width="100%";g.style.height="14px";g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";g.style.backgroundPosition="top center";g.style.backgroundRepeat="no-repeat";g.setAttribute("title","Minimize");var v=this.createMenuItem("insertFreehand",Editor.freehandImage,
+!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var y=this.createMenu("insert",Editor.shapesImage);y.style.backgroundSize="";y.style.marginBottom="4px";y.style.display="block";y.style.width="30px";y.style.height="30px";y.style.padding="4px";y.style.opacity="0.7";var C=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!C){var D=function(G,ia,ka,ja){null!=ia&&G.setAttribute("title",ia);G.style.cursor="pointer";G.style.margin=
+"8px 0px";G.style.display="block";f.appendChild(G);null!=ja&&(G.style.position="relative",G.style.overflow="visible",ia=document.createElement("div"),ia.style.position="absolute",ia.style.fontSize="8px",ia.style.left="32px",ia.style.top="28px",mxUtils.write(ia,ja),G.appendChild(ia));return G};D(this.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+
" (A)",null,"A");D(this.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");D(this.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",
!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");D(this.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");var N=new mxCell("",new mxGeometry(0,0,this.editor.graph.defaultEdgeLength+20,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");N.geometry.setTerminalPoint(new mxPoint(0,0),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,0),!1);N.geometry.points=
[];N.geometry.relative=!0;N.edge=!0;D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,N.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");N=N.clone();N.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";N.geometry.width=this.editor.graph.defaultEdgeLength+20;N.geometry.setTerminalPoint(new mxPoint(0,20),!0);N.geometry.setTerminalPoint(new mxPoint(N.geometry.width,20),!1);
-D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(u,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
+D(this.sidebar.createEdgeTemplateFromCells([N],N.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));D(v,mxResources.get("freehand")+" (X)",null,"X");this.sketchPickerMenuElt.appendChild(y)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){C?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="40px",f.style.top="50%",f.style.bottom="",f.style.height="",
g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.height="14px",C=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.bottom="12px",f.style.padding="0px",f.style.height="24px",f.style.width="24px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.height="24px",C=!0)}));this.addListener("darkModeChanged",
-I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"simple"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;white-space:nowrap;text-align:right;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;",
-this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.sketchMenubarElt.appendChild(this.statusContainer),this.statusContainer.style.marginTop="3px",this.statusContainer.style.maxWidth="360px"),null!=this.userElement&&this.sketchMenubarElt.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="relative",e.style.height="21px",e.style.width=
-"21px",e.style.right="0px",e.style.top="3px",this.sketchMenubarElt.appendChild(e))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.marginTop="",this.statusContainer.style.maxWidth=""),null!=this.userElement&&this.menubarContainer.appendChild(this.userElement),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.right="10px",e.style.top="5px",this.menubarContainer.parentNode.insertBefore(e,
-this.menubarContainer)))};EditorUi.prototype.createMenu=function(e,f){var g=this.menus.get(e),u=this.menubar.addMenu(mxResources.get(e),g.funct);u.className="geToolbarButton";u.style.display="inline-block";u.style.cursor="pointer";u.style.height="24px";u.setAttribute("title",mxResources.get(e));this.menus.menuCreated(g,u,"geToolbarButton");null!=f&&(u.style.backgroundImage="url("+f+")",u.style.backgroundPosition="center center",u.style.backgroundRepeat="no-repeat",u.style.backgroundSize="100% 100%",
-u.style.width="24px",u.innerText="");return u};EditorUi.prototype.createMenuItem=function(e,f,g){var u=document.createElement("a");u.className="geToolbarButton";u.setAttribute("title",mxResources.get(e));u.style.backgroundImage="url("+f+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="100% 100%";u.style.display="inline-block";u.style.cursor="pointer";u.style.marginLeft="6px";u.style.width="24px";u.style.height="24px";var y=this.actions.get(e);
-null!=y&&(mxEvent.addListener(u,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(u,"click",function(C){"disabled"!=u.getAttribute("disabled")&&y.funct(C);mxEvent.consume(C)}),g||(e=function(){y.isEnabled()?(u.removeAttribute("disabled"),u.style.cursor="pointer"):(u.setAttribute("disabled","disabled"),u.style.cursor="default");u.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),y.addListener("stateChanged",
-e),e()));return u};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,g,mxUtils.bind(this,function(u){u.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=
-e?e.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode?(this.diagramContainer.style.left="0",this.diagramContainer.style.top="0",this.diagramContainer.style.right="0",this.diagramContainer.style.bottom="0",(null!=e?e:1)&&this.editor.graph.sizeDidChange()):M.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-
-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,
-function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=
-function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(e){"simple"==e?(null==this.sketchMenubarElt&&(this.sketchMenubarElt=document.createElement("div"),this.sketchMenubarElt.className="geToolbarContainer",this.sketchMenubarElt.style.cssText="display:flex;position:absolute;right:12px;top:10px;height:44px;border-radius:4px;padding:7px 12px;overflow:hidden;z-index:1;flex-wrap:nowrap;user-select:none;box-sizing:border-box;border-bottom:1px solid lightgray;max-width:calc(100% - 170px);min-width:40px;justify-content:flex-end;align-items:center;",
+this.sketchWrapperElt.appendChild(this.sketchMenubarElt),"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&this.installStatusMinimizer(this.sketchMenubarElt)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.statusContainer.style.overflow="hidden",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),e=this.menubar.langIcon,
+null!=e&&(e.style.position="",e.style.height="21px",e.style.width="21px",e.style.flexShrink="0",this.sketchMenubarElt.appendChild(e)),null!=this.buttonContainer&&(this.buttonContainer.style.flexShrink="0",this.buttonContainer.style.padding="0px",this.buttonContainer.style.position="",this.sketchMenubarElt.appendChild(this.buttonContainer))):(null!=this.statusContainer&&(this.menubar.container.appendChild(this.statusContainer),this.statusContainer.style.flexShrink="",this.statusContainer.style.overflow=
+""),null!=this.userElement&&(this.userElement.style.flexShrink="",this.userElement.style.top="3px",this.menubarContainer.appendChild(this.userElement)),e=this.menubar.langIcon,null!=e&&(e.style.position="absolute",e.style.height="18px",e.style.width="18px",e.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(e,this.menubarContainer)))};EditorUi.prototype.createMenu=function(e,f){var g=this.menus.get(e),v=this.menubar.addMenu(mxResources.get(e),g.funct);v.className="geToolbarButton";
+v.style.display="inline-block";v.style.cursor="pointer";v.style.height="24px";v.setAttribute("title",mxResources.get(e));this.menus.menuCreated(g,v,"geToolbarButton");null!=f&&(v.style.backgroundImage="url("+f+")",v.style.backgroundPosition="center center",v.style.backgroundRepeat="no-repeat",v.style.backgroundSize="100% 100%",v.style.width="24px",v.innerText="");return v};EditorUi.prototype.createMenuItem=function(e,f,g){var v=document.createElement("a");v.className="geToolbarButton";v.setAttribute("title",
+mxResources.get(e));v.style.backgroundImage="url("+f+")";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";v.style.backgroundSize="100% 100%";v.style.display="inline-block";v.style.cursor="pointer";v.style.marginLeft="6px";v.style.width="24px";v.style.height="24px";var y=this.actions.get(e);null!=y&&(mxEvent.addListener(v,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()})),mxEvent.addListener(v,"click",function(C){"disabled"!=
+v.getAttribute("disabled")&&y.funct(C);mxEvent.consume(C)}),g||(e=function(){y.isEnabled()?(v.removeAttribute("disabled"),v.style.cursor="pointer"):(v.setAttribute("disabled","disabled"),v.style.cursor="default");v.style.opacity=y.isEnabled()?"":"0.2"},this.editor.graph.addListener("enabledChanged",e),y.addListener("stateChanged",e),e()));return v};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var e=Math.max(10,this.diagramContainer.parentNode.clientWidth-256),f="1"==
+urlParams.winCtrls&&"1"==urlParams.sketch?80:60,g="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,this.editor.graph.container.clientHeight-10);this.formatWindow=new WrapperWindow(this,mxResources.get("format"),e,f,240,g,mxUtils.bind(this,function(v){v.appendChild(this.formatContainer)}));this.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.formatWindow.window.fit()}));this.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80);this.formatWindow.window.setVisible(!1)}};
+var p=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(e){var f=this.formatWindow;null!=f?f.window.setVisible(null!=e?e:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var e=this.formatWindow;return null!=e?e.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){if(null!=this.sketchWrapperElt&&null!=
+this.sketchWrapperElt.parentNode){e=null!=e?e:!0;var f=this.getDiagramContainerOffset();this.diagramContainer.style.left=f.x+"px";this.diagramContainer.style.top=f.y+"px";this.diagramContainer.style.right="0";this.diagramContainer.style.bottom="0";e&&this.editor.graph.sizeDidChange()}else M.apply(this,arguments)};EditorUi.prototype.createShapesWindow=function(){if(null==this.sidebarWindow){var e=Math.min(this.diagramContainer.parentNode.clientWidth-10,218),f="1"==urlParams.embedInline?650:Math.min(this.diagramContainer.parentNode.clientHeight,
+650);this.sidebarWindow=new WrapperWindow(this,mxResources.get("shapes"),"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?66:10,"simple"==Editor.currentTheme&&"1"!=urlParams.embedInline?Math.max(30,(this.diagramContainer.parentNode.clientHeight-f)/2):56,e-6,f-6,mxUtils.bind(this,function(g){g.appendChild(this.sidebarContainer)}));this.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.sidebarWindow.window.fit()}));this.sidebarWindow.window.minimumSize=new mxRectangle(0,
+0,90,90);this.sidebarWindow.window.setVisible(!1)}};EditorUi.prototype.setSketchMode=function(e){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(e);null==urlParams.rough&&(mxSettings.settings.sketchMode=e,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html > body > div > .geToolbarContainer { box-shadow:0px 2px 10px #e0e0e0; }html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }html body .geToolbarContainer a div { color: "+(Editor.isDarkMode()?"#707070":Editor.darkColor)+" }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?
"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }.mxWindowPane > .geSidebarContainer { border: none !important; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
@@ -3733,155 +3735,155 @@ f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts)
null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(e,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",
mxUtils.bind(this,function(e,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(e,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(u,y){try{this.spinner.stop();var C=this.createImageDataUri(u,f,"png"),I=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(C,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
-null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(u){this.handleError(u)}};EditorUi.prototype.writeImageToClipboard=function(e,f,g,u){var y=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](u)};EditorUi.prototype.copyCells=function(e,f){var g=this.editor.graph;if(g.isSelectionEmpty())e.innerText="";else{var u=
-mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(u));mxUtils.setTextContent(e,encodeURIComponent(y));f?(g.removeCells(u,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
-f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,g,u){var y=this.editor.graph,C=null;y.lastPasteXml==e?y.pasteCounter++:(y.lastPasteXml=e,y.pasteCounter=0);var I=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(e))C=this.importXml(e,I,I),y.setSelectionCells(C);else if(f&&1==y.getSelectionCount()){I=y.getStartEditingCell(y.getSelectionCell(),u);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==y.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(v,y){try{this.spinner.stop();var C=this.createImageDataUri(v,f,"png"),I=parseInt(y.getAttribute("width")),D=parseInt(y.getAttribute("height"));this.writeImageToClipboard(C,I,D,mxUtils.bind(this,function(N){this.handleError(N)}))}catch(N){this.handleError(N)}}),null,null,null,mxUtils.bind(this,function(v){this.spinner.stop();this.handleError(v)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<e.length?e:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(e,f,g,v){var y=this.base64ToBlob(e.substring(e.indexOf(",")+1),"image/png");e=new ClipboardItem({"image/png":y,"text/html":new Blob(['<img src="'+e+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([e])["catch"](v)};EditorUi.prototype.copyCells=function(e,f){var g=this.editor.graph;if(g.isSelectionEmpty())e.innerText="";else{var v=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),y=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(e,encodeURIComponent(y));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=y,g.pasteCounter=0);e.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var e=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(e=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(e)),navigator.clipboard.writeText(f))}return e};EditorUi.prototype.pasteXml=function(e,f,g,v){var y=this.editor.graph,C=null;y.lastPasteXml==e?y.pasteCounter++:(y.lastPasteXml=e,y.pasteCounter=0);var I=y.pasteCounter*y.gridSize;if(g||this.isCompatibleString(e))C=this.importXml(e,I,I),y.setSelectionCells(C);else if(f&&1==y.getSelectionCount()){I=y.getStartEditingCell(y.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(e)&&"image"==y.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])y.setCellStyles(mxConstants.STYLE_IMAGE,
e,[I]);else{y.model.beginUpdate();try{y.labelChanged(I,e),Graph.isLink(e)&&y.setLinkForCell(I,e)}finally{y.model.endUpdate()}}y.setSelectionCell(I)}else C=y.getInsertPoint(),y.isMouseInsertPoint()&&(I=0,y.lastPasteXml==e&&0<y.pasteCounter&&y.pasteCounter--),C=this.insertTextAt(e,C.x+I,C.y+I,!0),y.setSelectionCells(C);y.isSelectionEmpty()||(y.scrollCellToVisible(y.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(y.view.getState(y.getSelectionCell())));return C};EditorUi.prototype.pasteCells=
-function(e,f,g,u){if(!mxEvent.isConsumed(e)){var y=f,C=!1;if(g&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:e.clipboardData.getData("text/html");null!=D&&0<D.length?(y=this.parseHtmlData(D),C="text/plain"!=y.getAttribute("data-type")):null!=I&&0<I.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,
-D))}I=y.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var qa=this.editor.graph;qa.lastPasteXml==pa?qa.pasteCounter++:(qa.lastPasteXml=pa,qa.pasteCounter=0);var L=qa.pasteCounter*qa.gridSize;qa.setSelectionCells(this.importXml(pa,L,L));qa.scrollCellToVisible(qa.getSelectionCell())}),mxUtils.bind(this,
-function(pa){this.handleError(pa)})),mxEvent.consume(e));else{var G=C?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),ha=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=y.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ha=!0,G=N)}catch(pa){}try{if(null!=
-G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,u,ha,e)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,u,ha,e);try{mxEvent.consume(e)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
-"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,g=0;g<e.length;g++)mxEvent.addListener(e[g],"dragleave",function(u){null!=f&&(f.parentNode.removeChild(f),f=null);u.stopPropagation();u.preventDefault()}),mxEvent.addListener(e[g],"dragover",mxUtils.bind(this,function(u){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());u.stopPropagation();u.preventDefault()})),
-mxEvent.addListener(e[g],"drop",mxUtils.bind(this,function(u){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<u.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(u.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(u)&&!mxEvent.isShiftDown(u)):this.openFiles(u.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(u);if(null==y){var C=null!=u.dataTransfer?u.dataTransfer:
-u.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?y=C.getData("Text"):(y=null,y=0<=mxUtils.indexOf(C.types,"text/uri-list")?u.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=y&&0<y.length?(C=document.createElement("div"),C.innerHTML=this.editor.graph.sanitizeHtml(y),C=C.getElementsByTagName("img"),0<C.length&&(y=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(y=C.getData("text/plain"))),
+function(e,f,g,v){if(!mxEvent.isConsumed(e)){var y=f,C=!1;if(g&&null!=e.clipboardData&&e.clipboardData.getData){var I=e.clipboardData.getData("text/plain"),D=!1;if(null!=I&&0<I.length&&"%3CmxGraphModel%3E"==I.substring(0,18))try{var N=decodeURIComponent(I);this.isCompatibleString(N)&&(D=!0,I=N)}catch(pa){}D=D?null:e.clipboardData.getData("text/html");null!=D&&0<D.length?(y=this.parseHtmlData(D),C="text/plain"!=y.getAttribute("data-type")):null!=I&&0<I.length&&(y=document.createElement("div"),mxUtils.setTextContent(y,
+D))}I=y.getElementsByTagName("span");if(null!=I&&0<I.length&&"application/vnd.lucid.chart.objects"===I[0].getAttribute("data-lucid-type"))g=I[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(pa){var ra=this.editor.graph;ra.lastPasteXml==pa?ra.pasteCounter++:(ra.lastPasteXml=pa,ra.pasteCounter=0);var L=ra.pasteCounter*ra.gridSize;ra.setSelectionCells(this.importXml(pa,L,L));ra.scrollCellToVisible(ra.getSelectionCell())}),mxUtils.bind(this,
+function(pa){this.handleError(pa)})),mxEvent.consume(e));else{var G=C?y.innerHTML:mxUtils.trim(null==y.innerText?mxUtils.getTextContent(y):y.innerText),ia=!1;try{var ka=G.lastIndexOf("%3E");0<=ka&&ka<G.length-3&&(G=G.substring(0,ka+3))}catch(pa){}try{I=y.getElementsByTagName("span"),(N=null!=I&&0<I.length?mxUtils.trim(decodeURIComponent(I[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(N)||0==N.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(ia=!0,G=N)}catch(pa){}try{if(null!=
+G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ja=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,v,ia,e)}catch(pa){console.log("Miro import error:",pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ja):ja()}else this.pasteXml(G,v,ia,e);try{mxEvent.consume(e)}catch(pa){}}else if(!g){var ca=this.editor.graph;ca.lastPasteXml=null;ca.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(e){if(Graph.fileSupport)for(var f=null,g=0;g<e.length;g++)mxEvent.addListener(e[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(e[g],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());v.stopPropagation();v.preventDefault()})),
+mxEvent.addListener(e[g],"drop",mxUtils.bind(this,function(v){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<v.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(v.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(v)&&!mxEvent.isShiftDown(v)):this.openFiles(v.dataTransfer.files,!0);else{var y=this.extractGraphModelFromEvent(v);if(null==y){var C=null!=v.dataTransfer?v.dataTransfer:
+v.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?y=C.getData("Text"):(y=null,y=0<=mxUtils.indexOf(C.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=y&&0<y.length?(C=document.createElement("div"),C.innerHTML=this.editor.graph.sanitizeHtml(y),C=C.getElementsByTagName("img"),0<C.length&&(y=C[0].getAttribute("src"))):0<=mxUtils.indexOf(C.types,"text/plain")&&(y=C.getData("text/plain"))),
null!=y&&(Editor.isPngDataUrl(y)?(y=Editor.extractGraphModelFromPng(y),null!=y&&0<y.length&&this.openLocalFile(y,null,!0)):this.isRemoteFileFormat(y)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(y))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()&&this.openLocalFile(I.getText(),null,!0)})):/^https?:\/\//.test(y)&&(null==this.getCurrentFile()?window.location.hash=
-"#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}u.stopPropagation();u.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,g=0;if(null==e){var u=document.body;var y=document.documentElement;var C=(u.clientWidth||y.clientWidth)-3;u=Math.max(u.clientHeight||0,y.clientHeight)-3}else f=e.offsetTop,g=e.offsetLeft,C=e.clientWidth,
-u=e.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,C-3)+"px";y.style.height=Math.max(0,u-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
-var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var g=new mxCodec(f.ownerDocument),u=new mxGraphModel;g.decode(f,u);f=u.getChildAt(u.getRoot(),0);for(g=0;g<u.getChildCount(f);g++)e.push(u.getChildAt(f,g))}return e};EditorUi.prototype.openFileHandle=function(e,f,g,u,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var C=mxUtils.bind(this,function(D){f=0<=
-f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,u)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();
+"#U"+encodeURIComponent(y):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(y)))))}else this.openLocalFile(y,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(e){var f=0,g=0;if(null==e){var v=document.body;var y=document.documentElement;var C=(v.clientWidth||y.clientWidth)-3;v=Math.max(v.clientHeight||0,y.clientHeight)-3}else f=e.offsetTop,g=e.offsetLeft,C=e.clientWidth,
+v=e.clientHeight;y=document.createElement("div");y.style.zIndex=mxPopupMenu.prototype.zIndex+2;y.style.border="3px dotted rgb(254, 137, 12)";y.style.pointerEvents="none";y.style.position="absolute";y.style.top=f+"px";y.style.left=g+"px";y.style.width=Math.max(0,C-3)+"px";y.style.height=Math.max(0,v-3)+"px";null!=e&&e.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(y):document.body.appendChild(y);return y};EditorUi.prototype.stringToCells=function(e){e=mxUtils.parseXml(e);
+var f=this.editor.extractGraphModel(e.documentElement);e=[];if(null!=f){var g=new mxCodec(f.ownerDocument),v=new mxGraphModel;g.decode(f,v);f=v.getChildAt(v.getRoot(),0);for(g=0;g<v.getChildCount(f);g++)e.push(v.getChildAt(f,g))}return e};EditorUi.prototype.openFileHandle=function(e,f,g,v,y){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var C=mxUtils.bind(this,function(D){f=0<=
+f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==D.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,f))}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,f,v)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(D){this.spinner.stop();
C(D)}));else if(/(\.*<graphml )/.test(e))this.importGraphML(e,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?C(D.responseText):this.handleError({message:mxResources.get(413==D.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,u)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
-this.defaultFilename,u);try{this.loadLibrary(new LocalLibrary(this,e,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,u)}));else{if("image/png"==g.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==g.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(y=null,u=!0,
-e=I)}this.spinner.stop();this.openLocalFile(e,f,u,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<e.length;g++)mxUtils.bind(this,function(u){var y=new FileReader;y.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,u.name,u,f)}catch(I){this.handleError(I)}});y.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==u.type.substring(0,
-5)&&"application/pdf"!==u.type||"image/svg"===u.type.substring(0,9)?y.readAsText(u):y.readAsDataURL(u)})(e[g])};EditorUi.prototype.openLocalFile=function(e,f,g,u,y){var C=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(e);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,g,u,y))});if(null!=
-e&&0<e.length)null==C||!C.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=u)&&null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(e))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(e,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,f,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==e.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,e,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==e.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();C(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(e,f,v)}));else{if("image/png"==g.type.substring(0,9))e=this.extractGraphModelFromPng(e);else if("application/pdf"==g.type){var I=Editor.extractGraphModelFromPdf(e);null!=I&&(y=null,v=!0,
+e=I)}this.spinner.stop();this.openLocalFile(e,f,v,y,null!=y?g:null)}}};EditorUi.prototype.openFiles=function(e,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<e.length;g++)mxUtils.bind(this,function(v){var y=new FileReader;y.onload=mxUtils.bind(this,function(C){try{this.openFileHandle(C.target.result,v.name,v,f)}catch(I){this.handleError(I)}});y.onerror=mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C);window.openFile=null});"image"!==v.type.substring(0,
+5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?y.readAsText(v):y.readAsDataURL(v)})(e[g])};EditorUi.prototype.openLocalFile=function(e,f,g,v,y){var C=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(e);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,e,f||this.defaultFilename,g,v,y))});if(null!=
+e&&0<e.length)null==C||!C.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(e,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=C&&C.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var e={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,e);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),e);f=[];for(var g in e)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(e,f){function g(I){if(null!=
-I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var u=this.editor.graph,y=u.getCellStyle(e);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));u.model.isEdge(e)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=u.model.getChildCount(e);for(var C=0;C<y;C++)this.addBasenamesForCell(u.model.getChildAt(e,C),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
+I){var D=I.lastIndexOf(".");0<D&&(I=I.substring(D+1,I.length));null==f[I]&&(f[I]=!0)}}var v=this.editor.graph,y=v.getCellStyle(e);g(mxStencilRegistry.getBasenameForStencil(y[mxConstants.STYLE_SHAPE]));v.model.isEdge(e)&&(g(mxMarker.getPackageForType(y[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(y[mxConstants.STYLE_ENDARROW])));y=v.model.getChildCount(e);for(var C=0;C<y;C++)this.addBasenamesForCell(v.model.getChildAt(e,C),f)};EditorUi.prototype.setGraphEnabled=function(e){this.diagramContainer.style.visibility=
e?"":"hidden";this.formatContainer.style.visibility=e?"":"hidden";this.sidebarFooterContainer.style.display=e?"":"none";this.sidebarContainer.style.display=e?"":"none";this.hsplit.style.display=e?"":"none";this.editor.graph.setEnabled(e);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=e?"":"hidden",this.ruler.vRuler.container.style.visibility=e?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=e?"":"hidden");e||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var e=
-!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,u,y){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,D;for(D in I){var N=I[D];null!=N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=u?u:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,y){e||(e=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(y)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var I=C.model.cells,D;for(D in I){var N=I[D];null!=N&&null!=N.style&&(N.style+=";sketch=1;"+(-1==N.style.indexOf("fontFamily=")||-1<N.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!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(e,f){null!=e?e.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(e){var f=this.editor.graph;return{event:e,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
-scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var u=f.background;if(null==u||u==mxConstants.NONE)u=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",
-point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,u,1,this.embedExportBorder)}else e||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
-function(e){var f=null,g=!1,u=!1,y=null,C=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==(window.opener||window.parent)){var G=N.data,ha=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===
+scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(e){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var v=f.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(y){g.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=e?!e:!0,data:Editor.createSvgDataUri(y)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else e||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");e||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(e){var f=null,g=!1,v=!1,y=null,C=mxUtils.bind(this,function(N,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(N){if(N.source==(window.opener||window.parent)){var G=N.data,ia=null,ka=mxUtils.bind(this,function(oa){if(null!=oa&&"function"===
typeof oa.charAt&&"<"!=oa.charAt(0))try{Editor.isPngDataUrl(oa)?oa=Editor.extractGraphModelFromPng(oa):"data:image/svg+xml;base64,"==oa.substring(0,26)?oa=atob(oa.substring(26)):"data:image/svg+xml;utf8,"==oa.substring(0,24)&&(oa=oa.substring(24)),null!=oa&&("%"==oa.charAt(0)?oa=decodeURIComponent(oa):"<"!=oa.charAt(0)&&(oa=Graph.decompress(oa)))}catch(Aa){}return oa});if("json"==urlParams.proto){var ja=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[N],"data",
[G])}catch(oa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var ca=new FilenameDialog(this,G.defaultValue||"",null!=
G.okKey?mxResources.get(G.okKey):G.ok,function(oa){null!=oa?I.postMessage(JSON.stringify({event:"prompt",value:oa,message:G}),"*"):I.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(ca.container,300,80,!0,!1);ca.init();return}if("draft"==G.action){var pa=ka(G.xml);this.spinner.stop();ca=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();
I.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();I.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(ca.container,640,480,!0,!1,mxUtils.bind(this,function(oa){oa&&
-this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var qa=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,
-name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,qa?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,
+this.actions.get("exit").funct()}));try{ca.init()}catch(oa){I.postMessage(JSON.stringify({event:"draft",error:oa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var ra=1==G.enableRecent,L=1==G.enableSearch,V=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var R=this.getCurrentUser(),Y=new TemplatesDialog(this,function(oa,Aa,ya){oa=oa||this.emptyDiagramXml;I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,
+name:Aa,tempUrl:ya.url,libs:ya.libs,builtIn:null!=ya.info&&null!=ya.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=R?R.id:null,ra?mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getRecentDiagrams",[ya],null,oa,Aa)}):null,L?mxUtils.bind(this,function(oa,Aa,ya,La){this.remoteInvoke("searchDiagrams",[oa,La],null,Aa,ya)}):null,mxUtils.bind(this,function(oa,Aa,ya){this.remoteInvoke("getFileContent",[oa.url],null,Aa,ya)}),null,
V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,!1,!1,!0,!0);this.showDialog(Y.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}ca=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(oa,Aa,ya,La){oa=oa||this.emptyDiagramXml;null!=G.callback?I.postMessage(JSON.stringify({event:"template",xml:oa,blank:oa==this.emptyDiagramXml,name:Aa,tempUrl:ya,libs:La,builtIn:!0,message:G}),"*"):
-(e(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,qa?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,
+(e(oa,N,oa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ra?mxUtils.bind(this,function(oa){this.remoteInvoke("getRecentDiagrams",[null],null,oa,function(){oa(null,"Network Error!")})}):null,L?mxUtils.bind(this,function(oa,Aa){this.remoteInvoke("searchDiagrams",[oa,null],null,Aa,function(){Aa(null,"Network Error!")})}):null,mxUtils.bind(this,function(oa,Aa,ya){I.postMessage(JSON.stringify({event:"template",docUrl:oa,info:Aa,
name:ya}),"*")}),null,null,V?mxUtils.bind(this,function(oa){this.remoteInvoke("getCustomTemplates",null,null,oa,function(){oa({},0)})}):null,1==G.withoutType);this.showDialog(ca.container,620,460,!0,!1,mxUtils.bind(this,function(oa){this.sidebar.hideTooltip();oa&&this.actions.get("exit").funct()}));ca.init();return}if("textContent"==G.action){var Z=this.getDiagramTextContent();I.postMessage(JSON.stringify({event:"textContent",data:Z,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?
this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var la=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,la):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=
G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var q=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var F=this.editor.graph,T=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();var Aa=this.createLoadMessage("export");Aa.format=
-G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),ba=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=mxUtils.bind(this,function(){if(null!=this.pages&&
-this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=F.model,Oa=La.getChildCells(La.getRoot()),Ma={};for(ya=
-0;ya<G.layerIds.length;ya++)Ma[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Ma[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){ba(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ba(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":
-"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");oa.message=G;if("html2"==G.format||
+G.format;Aa.message=G;Aa.data=oa;Aa.xml=q;I.postMessage(JSON.stringify(Aa),"*")}),aa=mxUtils.bind(this,function(oa){null==oa&&(oa=Editor.blankImage);"xmlpng"==G.format&&(oa=Editor.writeGraphModelToPng(oa,"tEXt","mxfile",encodeURIComponent(q)));F!=this.editor.graph&&F.container.parentNode.removeChild(F.container);T(oa)}),U=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var da=mxUtils.bind(this,function(){if(null!=this.pages&&
+this.currentPage.getId()!=U){var oa=F.getGlobalVariable;F=this.createTemporaryGraph(F.getStylesheet());for(var Aa,ya=0;ya<this.pages.length;ya++)if(this.pages[ya].getId()==U){Aa=this.updatePageRoot(this.pages[ya]);break}null==Aa&&(Aa=this.currentPage);F.getGlobalVariable=function(Ia){return"page"==Ia?Aa.getName():"pagenumber"==Ia?1:oa.apply(this,arguments)};document.body.appendChild(F.container);F.model.setRoot(Aa.root)}if(null!=G.layerIds){var La=F.model,Oa=La.getChildCells(La.getRoot()),Na={};for(ya=
+0;ya<G.layerIds.length;ya++)Na[G.layerIds[ya]]=!0;for(ya=0;ya<Oa.length;ya++)La.setVisible(Oa[ya],Na[Oa[ya].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ia){aa(Ia.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,F,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(q),g=!1);da()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":
+"0")+(null!=U?"&pageId="+U:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(q))).send(mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?T("data:image/png;base64,"+oa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(da=mxUtils.bind(this,function(){var oa=this.createLoadMessage("export");oa.message=G;if("html2"==G.format||
"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Aa=this.getXmlFileData();oa.xml=mxUtils.getXml(Aa);oa.data=this.getFileData(null,null,!0,null,null,null,Aa);oa.format=G.format}else if("html"==G.format)Aa=this.editor.getGraphXml(),oa.data=this.getHtml(Aa,this.editor.graph),oa.xml=mxUtils.getXml(Aa),oa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Aa=null!=G.background?G.background:this.editor.graph.background;Aa==mxConstants.NONE&&(Aa=null);oa.xml=
this.getFileData(!0,null,null,null,null,null,null,null,null,!1);oa.format="svg";var ya=mxUtils.bind(this,function(La){this.editor.graph.setEnabled(!0);this.spinner.stop();oa.data=Editor.createSvgDataUri(La);I.postMessage(JSON.stringify(oa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(oa.xml,this.editor.graph,null,!0,ya,null,null,G.embedImages,Aa,G.scale,G.border,G.shadow,G.keepTheme);
else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Aa=this.editor.graph.getSvg(Aa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Aa),this.embedFonts(Aa,mxUtils.bind(this,function(La){G.embedImages||null==G.embedImages?this.editor.convertImages(La,mxUtils.bind(this,
-function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;u=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=
+function(Oa){ya(mxUtils.getXml(Oa))})):ya(mxUtils.getXml(La))}));return}I.postMessage(JSON.stringify(oa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var fa=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){fa.apply(this,arguments);da()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||da()}else da();return}if("load"==G.action){ja=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=
G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var na=Editor.sketchMode;this.doSetSketchMode(G.rough);na!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=
-G.viewport);this.embedExitPoint=null;if(null!=G.rect){var sa=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";ha=mxUtils.bind(this,function(){var oa=this.editor.graph,Aa=oa.maxFitScale;oa.maxFitScale=
+G.viewport);this.embedExitPoint=null;if(null!=G.rect){var sa=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";ia=mxUtils.bind(this,function(){var oa=this.editor.graph,Aa=oa.maxFitScale;oa.maxFitScale=
G.maxFitScale;oa.fit(2*sa);oa.maxFitScale=Aa;oa.container.scrollTop-=2*sa;oa.container.scrollLeft-=2*sa;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(pa),this.embedFilenameSpan=
pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(oa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var za=this.getCurrentFile();null!=za&&(pa=ka(G.xml),null!=pa&&""!=pa&&za.mergeFile(new LocalFile(this,pa),function(){I.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(oa){I.postMessage(JSON.stringify({event:"merge",message:G,error:oa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(I):
"remoteInvoke"==G.action?this.handleRemoteInvoke(G,N.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):I.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(oa){this.handleError(oa)}}var ua=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ba=mxUtils.bind(this,function(oa,Aa){g=!0;try{e(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
-!1;null!=urlParams.modified&&this.editor.setStatus("");y=ua();u&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==y||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
-f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=oa,I.postMessage(JSON.stringify(Aa),"*");null!=ha&&ha()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,
+!1;null!=urlParams.modified&&this.editor.setStatus("");y=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==y||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));y=ya}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
+f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Aa=this.createLoadMessage("load"),Aa.xml=oa,I.postMessage(JSON.stringify(Aa),"*");null!=ia&&ia()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,
34)?(ka="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(oa){Ba(oa,N)},mxUtils.bind(this,function(oa){this.handleError(oa)}),ka)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(oa){4==oa.readyState&&200<=oa.status&&299>=oa.status&&
"<mxGraphModel"==oa.responseText.substring(0,13)&&Ba(oa.responseText,N)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(oa){Ba(oa)}),mxUtils.bind(this,function(oa){this.handleError(oa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ka(G),Ba(G,N)):this.loadDescriptor(G,mxUtils.bind(this,function(oa){Ba(ua(),N)}),mxUtils.bind(this,function(oa){this.handleError(oa,mxResources.get("errorLoadingFile"))}))}}));
-var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ha){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ha}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display=
-"inline-block";e.style.position="absolute";e.style.paddingTop="2px";e.style.paddingLeft="8px";e.style.paddingBottom="2px";e.style.right="64px";var f=document.createElement("button");f.className="geBigButton";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var g="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,g);f.setAttribute("title",g);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
-e.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),e.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
-"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),e.appendChild(f));"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),e.appendChild(f));this.toolbar.container.appendChild(e);
-this.toolbar.staticElements.push(e)}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};
-EditorUi.prototype.loadOrgChartLayouts=function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",
-f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var g=e.split("\n"),u=[],y=[],C=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ha=null,ka=null,ja=null,ca=null,pa=null,qa=null,L="whiteSpace=wrap;html=1;",V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,ba=40,U=40,da=100,fa=0,na=mxUtils.bind(this,
-function(){null!=f?f(Na):(N.setSelectionCells(Na),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){e=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&"\\"==e.charAt(e.length-1)&&"#"==g[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(g[Oa].substring(1)),
-Oa++;if("#"!=e.charAt(1)){var Ma=e.indexOf(":");if(0<Ma){var Ia=mxUtils.trim(e.substring(1,Ma)),wa=mxUtils.trim(e.substring(Ma+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?qa=JSON.parse(wa):"style"==Ia?ha=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<
-wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?ba=parseFloat(wa):"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));
-var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Ma=e=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(e=wa),R==ab[wa]&&(Ma=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});V=[];for(wa=Oa+1;wa<g.length;wa++){var x=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==x){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+
-" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){x=V[wa];var P=null,X=null!=e?Y+x[e]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=null==P||0<=mxUtils.indexOf(u,P));var aa=new mxCell(Ba,new mxGeometry(za,sa,0,0),ha||"whiteSpace=wrap;html=1;");aa.collapsed=q;aa.vertex=!0;aa.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<x.length;W++)N.setAttributeForCell(aa,Ia[W],x[W]),null==P||g||N.setAttributeForCell(P,
-Ia[W],x[W]);if(null!=ca&&null!=qa){var ea=qa[aa.getAttribute(ca)];null!=ea&&(N.labelChanged(aa,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[aa.getAttribute(ja)];null!=ta&&(aa.style=ta)}N.setAttributeForCell(aa,"placeholders","1");aa.style=N.replacePlaceholders(aa,aa.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted","cells",[aa])):(N.model.setStyle(P,aa.style),0>mxUtils.indexOf(C,P)&&C.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));
-g=null!=P;P=aa;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var ra=this.editor.graph.getPreferredSizeForCell(P);R=null!=Ma?N.model.getCell(Y+x[Ma]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?
-P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?ra.width+fa:parseFloat(Z);var Ca="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=null!=Ca&&"auto"!=Ca?parseFloat(Ca):"auto"==la||"auto"==Ca?ra.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==I[X]&&(I[X]=[]),I[X].push(P)):(u.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),y.push(R)):C.push(N.addCell(P)))}for(wa=
-0;wa<y.length;wa++)va="@"==Z.charAt(0)?y[wa].getAttribute(Z.substring(1)):null,Ca="@"==la.charAt(0)?y[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ca||N.updateGroupBounds([y[wa]],fa,!0);var Ea=C.slice(),Na=C.slice();for(Ya=0;Ya<Aa.length;Ya++){var Wa=Aa[Ya];for(wa=0;wa<u.length;wa++){P=u[wa];var Ra=mxUtils.bind(this,function(Xa,Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==
-kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];C.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||
-""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=
-!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Na.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ea)}}}});Ra(P,P,Wa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Ra(P,I[P.id][W],Wa)}}if(null!=La)for(wa=0;wa<u.length;wa++)for(P=u[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<C.length){var Ga=
-new mxParallelEdgeLayout(N);Ga.spacing=ba;Ga.checkOverlap=!0;var Ka=function(){0<Ga.spacing&&Ga.execute(N.getDefaultParent());for(var Xa=0;Xa<C.length;Xa++){var Za=N.getCellGeometry(C[Xa]);Za.x=Math.round(N.snap(Za.x));Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==
-oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Na.length==2*C.length-1&&1==Ea.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;
-this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ea.length?Ea[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ea.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=ba;db.interRankCellSpacing=da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Na);N.moveCells(Na,za,ua)},!0,na);
-na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("organic"==oa||"auto"==oa&&Na.length>C.length){N.view.validate();var vb=new mxFastOrganicLayout(N);vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,
-arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(e){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var g="?",u;for(u in urlParams)0>mxUtils.indexOf(e,u)&&null!=urlParams[u]&&(f+=g+u+"="+urlParams[u],g="&")}else f=window.location.search;return f};
-EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),u;for(u in urlParams)0>mxUtils.indexOf(g,u)&&(e=0==f?e+"?":e+"&",null!=urlParams[u]&&(e+=u+"="+urlParams[u],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,g,u,y){e=new LinkDialog(this,e,f,g,!0,u,y);this.showDialog(e.container,
-560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),
-f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&
-(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&
-e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=
-function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(e){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};
-var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),u=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(u);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(u);this.actions.get("editData").setEnabled(e.isEnabled());this.actions.get("shadowVisible").setEnabled(u);this.actions.get("connectionArrows").setEnabled(u);
-this.actions.get("connectionPoints").setEnabled(u);this.actions.get("copyStyle").setEnabled(u&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(u&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(u);this.actions.get("createRevision").setEnabled(u);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(u&&
-(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=
-f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(u&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,f,g,u,y,C,I,D){var N=e.editor.graph;if("xml"==g)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==g)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(N.getSvg(u,y,C)),"image/svg+xml");else{var G=e.getFileData(!0,null,null,null,null,!0),ha=N.getGraphBounds(),ka=Math.floor(ha.width*y/N.view.scale),ja=
-Math.floor(ha.height*y/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(e.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!e.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});e.saveRequest(f,g,function(pa,qa){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(qa||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+
-(null!=u?u:"none")+"&w="+ka+"&h="+ja+"&border="+C+"&xml="+encodeURIComponent(G))})}else"png"==g?e.exportImage(y,null==u||"none"==u,!0,!1,!1,C,!0,!1,null,D,I):e.exportImage(y,!1,!0,!1,!1,C,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var u=e;this.currentPage!=this.pages[g]&&(u=this.createTemporaryGraph(e.getStylesheet()),
-this.updatePageRoot(this.pages[g]),u.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+u.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var u=document.createElement("h3");mxUtils.write(u,mxUtils.htmlEntities(e));u.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(u);var y=
-document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var D=I[e];if("R"==D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));C[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText="";
-if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ha=0;ha<G.length;ha++){var ka=G[ha];C[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(y,ka.title,C[ka.id]);(function(ca,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){y.innerText="";var ha=document.createElement("div");ha.style.padding="8px";ha.style.textAlign=
-"center";mxUtils.write(ha,mxResources.get("error")+": ");mxUtils.write(ha,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(ha)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ha;for(ha in f)null==C[ha]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
-ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ha]));for(ha in C)f[ha]||this.closeLibrary(new RemoteLibrary(this,null,C[ha]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
+var I=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(C,"*");if("json"==urlParams.proto){var D=this.editor.graph.openLink;this.editor.graph.openLink=function(N,G,ia){D.apply(this,arguments);I.postMessage(JSON.stringify({event:"openLink",href:N,target:G,allowOpener:ia}),"*")}}};EditorUi.prototype.createEmbedButton=function(e,f,g,v){var y="simple"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement(y?
+"a":"button");C.setAttribute("title",e+(null!=g?" ("+g+")":""));C.style.marginLeft="6px";mxUtils.write(C,e);y?(C.className="geMenuItem"+(v?" gePrimaryBtn":""),C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var e=document.createElement("div");e.style.display="inline-block";document.createElement("button").className="geBigButton";
+"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(e.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&e.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&
+e.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"==Editor.currentTheme||"min"==Editor.currentTheme?null!=this.buttonContainer&&(e.style.position="relative","simple"!=Editor.currentTheme&&(e.style.marginRight="4px","1"!=urlParams.sketch?(e.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px"),this.buttonContainer.appendChild(e),this.editor.fireEvent(new mxEventObject("statusChanged"))):
+null!=this.menubar&&(e.style.position="absolute",e.style.padding="2px",e.style.right="62px",this.toolbar.container.appendChild(e),this.toolbar.staticElements.push(e))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(e){this.importCsv(e)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));
+this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();e()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(e,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(e,f)}))};EditorUi.prototype.doImportCsv=function(e,f){try{var g=e.split("\n"),v=[],y=[],C=[],I={};if(0<g.length){var D={},N=this.editor.graph,G=null,ia=null,ka=null,ja=null,ca=null,pa=null,ra=null,L="whiteSpace=wrap;html=1;",
+V=null,R=null,Y="",Z="auto",la="auto",q=!1,F=null,T=null,aa=40,U=40,da=100,fa=0,na=mxUtils.bind(this,function(){null!=f?f(Ma):(N.setSelectionCells(Ma),N.scrollCellToVisible(N.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=N.getFreeInsertPoint(),za=sa.x,ua=sa.y;sa=ua;var Ba=null,oa="auto";R=null;for(var Aa=[],ya=null,La=null,Oa=0;Oa<g.length&&"#"==g[Oa].charAt(0);){e=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&
+"\\"==e.charAt(e.length-1)&&"#"==g[Oa].charAt(0);)e=e.substring(0,e.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=e.charAt(1)){var Na=e.indexOf(":");if(0<Na){var Ia=mxUtils.trim(e.substring(1,Na)),wa=mxUtils.trim(e.substring(Na+1));"label"==Ia?Ba=N.sanitizeHtml(wa):"labelname"==Ia&&0<wa.length&&"-"!=wa?ca=wa:"labels"==Ia&&0<wa.length&&"-"!=wa?ra=JSON.parse(wa):"style"==Ia?ia=wa:"parentstyle"==Ia?L=wa:"unknownStyle"==Ia&&"-"!=wa?pa=wa:"stylename"==Ia&&0<wa.length&&"-"!=wa?ja=wa:"styles"==
+Ia&&0<wa.length&&"-"!=wa?ka=JSON.parse(wa):"vars"==Ia&&0<wa.length&&"-"!=wa?G=JSON.parse(wa):"identity"==Ia&&0<wa.length&&"-"!=wa?V=wa:"parent"==Ia&&0<wa.length&&"-"!=wa?R=wa:"namespace"==Ia&&0<wa.length&&"-"!=wa?Y=wa:"width"==Ia?Z=wa:"height"==Ia?la=wa:"collapsed"==Ia&&"-"!=wa?q="true"==wa:"left"==Ia&&0<wa.length?F=wa:"top"==Ia&&0<wa.length?T=wa:"ignore"==Ia?La=wa.split(","):"connect"==Ia?Aa.push(JSON.parse(wa)):"link"==Ia?ya=wa:"padding"==Ia?fa=parseFloat(wa):"edgespacing"==Ia?aa=parseFloat(wa):
+"nodespacing"==Ia?U=parseFloat(wa):"levelspacing"==Ia?da=parseFloat(wa):"layout"==Ia&&(oa=wa)}}}if(null==g[Oa])throw Error(mxResources.get("invalidOrMissingFile"));var ab=this.editor.csvToArray(g[Oa].replace(/\r$/,""));Na=e=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(e=wa),R==ab[wa]&&(Na=wa),Ia.push(mxUtils.trim(ab[wa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ia[0]+"%");if(null!=Aa)for(var Ya=0;Ya<Aa.length;Ya++)null==D[Aa[Ya].to]&&(D[Aa[Ya].to]={});
+V=[];for(wa=Oa+1;wa<g.length;wa++){var x=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==x){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<x.length&&V.push(x)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){x=V[wa];var P=null,X=null!=e?Y+x[e]:null;g=!1;null!=X&&(P=N.model.getCell(X),g=null==P||0<=mxUtils.indexOf(v,P));var ba=new mxCell(Ba,new mxGeometry(za,sa,0,0),ia||"whiteSpace=wrap;html=1;");ba.collapsed=
+q;ba.vertex=!0;ba.id=X;null==P||g||N.model.setCollapsed(P,q);for(var W=0;W<x.length;W++)N.setAttributeForCell(ba,Ia[W],x[W]),null==P||g||N.setAttributeForCell(P,Ia[W],x[W]);if(null!=ca&&null!=ra){var ea=ra[ba.getAttribute(ca)];null!=ea&&(N.labelChanged(ba,ea),null==P||g||N.cellLabelChanged(P,ea))}if(null!=ja&&null!=ka){var ta=ka[ba.getAttribute(ja)];null!=ta&&(ba.style=ta)}N.setAttributeForCell(ba,"placeholders","1");ba.style=N.replacePlaceholders(ba,ba.style,G);null==P||g?N.fireEvent(new mxEventObject("cellsInserted",
+"cells",[ba])):(N.model.setStyle(P,ba.style),0>mxUtils.indexOf(C,P)&&C.push(P),N.fireEvent(new mxEventObject("cellsInserted","cells",[P])));g=null!=P;P=ba;if(!g)for(Ya=0;Ya<Aa.length;Ya++)D[Aa[Ya].to][P.getAttribute(Aa[Ya].to)]=P;null!=ya&&"link"!=ya&&(N.setLinkForCell(P,P.getAttribute(ya)),N.setAttributeForCell(P,ya,null));var qa=this.editor.graph.getPreferredSizeForCell(P);R=null!=Na?N.model.getCell(Y+x[Na]):null;if(P.vertex){O=null!=R?0:za;Oa=null!=R?0:ua;null!=F&&null!=P.getAttribute(F)&&(P.geometry.x=
+O+parseFloat(P.getAttribute(F)));null!=T&&null!=P.getAttribute(T)&&(P.geometry.y=Oa+parseFloat(P.getAttribute(T)));var va="@"==Z.charAt(0)?P.getAttribute(Z.substring(1)):null;P.geometry.width=null!=va&&"auto"!=va?parseFloat(P.getAttribute(Z.substring(1))):"auto"==Z||"auto"==va?qa.width+fa:parseFloat(Z);var Ea="@"==la.charAt(0)?P.getAttribute(la.substring(1)):null;P.geometry.height=null!=Ea&&"auto"!=Ea?parseFloat(Ea):"auto"==la||"auto"==Ea?qa.height+fa:parseFloat(la);sa+=P.geometry.height+U}g?(null==
+I[X]&&(I[X]=[]),I[X].push(P)):(v.push(P),null!=R?(R.style=N.replacePlaceholders(R,L,G),N.addCell(P,R),y.push(R)):C.push(N.addCell(P)))}for(wa=0;wa<y.length;wa++)va="@"==Z.charAt(0)?y[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?y[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([y[wa]],fa,!0);var Ca=C.slice(),Ma=C.slice();for(Ya=0;Ya<Aa.length;Ya++){var Sa=Aa[Ya];for(wa=0;wa<v.length;wa++){P=v[wa];var Qa=mxUtils.bind(this,function(Xa,
+Za,fb){var hb=Za.getAttribute(fb.from);if(null!=hb&&""!=hb){hb=hb.split(",");for(var qb=0;qb<hb.length;qb++){var kb=D[fb.to][hb[qb]];if(null==kb&&null!=pa){kb=new mxCell(hb[qb],new mxGeometry(za,ua,0,0),pa);kb.style=N.replacePlaceholders(Za,kb.style,G);var ib=this.editor.graph.getPreferredSizeForCell(kb);kb.geometry.width=ib.width+fa;kb.geometry.height=ib.height+fa;D[fb.to][hb[qb]]=kb;kb.vertex=!0;kb.id=hb[qb];C.push(N.addCell(kb))}if(null!=kb){ib=fb.label;null!=fb.fromlabel&&(ib=(Za.getAttribute(fb.fromlabel)||
+"")+(ib||""));null!=fb.sourcelabel&&(ib=N.replacePlaceholders(Za,fb.sourcelabel,G)+(ib||""));null!=fb.tolabel&&(ib=(ib||"")+(kb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(ib=(ib||"")+N.replacePlaceholders(kb,fb.targetlabel,G));var ub="target"==fb.placeholders==!fb.invert?kb:Xa;ub=null!=fb.style?N.replacePlaceholders(ub,fb.style,G):N.createCurrentEdgeStyle();ib=N.insertEdge(null,null,ib||"",fb.invert?kb:Xa,fb.invert?Xa:kb,ub);if(null!=fb.labels)for(ub=0;ub<fb.labels.length;ub++){var ob=
+fb.labels[ub],nb=new mxCell(ob.label||ub,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");nb.vertex=!0;nb.connectable=!1;nb.geometry.relative=!0;null!=ob.placeholders&&(nb.value=N.replacePlaceholders("target"==ob.placeholders==!fb.invert?kb:Xa,nb.value,G));if(null!=ob.dx||null!=ob.dy)nb.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);ib.insert(nb)}Ma.push(ib);mxUtils.remove(fb.invert?Xa:kb,Ca)}}}});Qa(P,P,Sa);if(null!=I[P.id])for(W=0;W<I[P.id].length;W++)Qa(P,
+I[P.id][W],Sa)}}if(null!=La)for(wa=0;wa<v.length;wa++)for(P=v[wa],W=0;W<La.length;W++)N.setAttributeForCell(P,mxUtils.trim(La[W]),null);if(0<C.length){var Fa=new mxParallelEdgeLayout(N);Fa.spacing=aa;Fa.checkOverlap=!0;var Ka=function(){0<Fa.spacing&&Fa.execute(N.getDefaultParent());for(var Xa=0;Xa<C.length;Xa++){var Za=N.getCellGeometry(C[Xa]);Za.x=Math.round(N.snap(Za.x));Za.y=Math.round(N.snap(Za.y));"auto"==Z&&(Za.width=Math.round(N.snap(Za.width)));"auto"==la&&(Za.height=Math.round(N.snap(Za.height)))}};
+if("["==oa.charAt(0)){var Pa=na;N.view.validate();this.executeLayouts(N.createLayouts(JSON.parse(oa)),function(){Ka();Pa()});na=null}else if("circle"==oa){var $a=new mxCircleLayout(N);$a.disableEdgeStyle=!1;$a.resetEdges=!1;var eb=$a.isVertexIgnored;$a.isVertexIgnored=function(Xa){return eb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*C.length-
+1&&1==Ca.length){N.view.validate();var cb=new mxCompactTreeLayout(N,"horizontaltree"==oa);cb.levelDistance=U;cb.edgeRouting=!1;cb.resetEdges=!1;this.executeLayout(function(){cb.execute(N.getDefaultParent(),0<Ca.length?Ca[0]:null)},!0,na);na=null}else if("horizontalflow"==oa||"verticalflow"==oa||"auto"==oa&&1==Ca.length){N.view.validate();var db=new mxHierarchicalLayout(N,"horizontalflow"==oa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);db.intraCellSpacing=U;db.parallelEdgeSpacing=aa;db.interRankCellSpacing=
+da;db.disableEdgeStyle=!1;this.executeLayout(function(){db.execute(N.getDefaultParent(),Ma);N.moveCells(Ma,za,ua)},!0,na);na=null}else if("orgchart"==oa){N.view.validate();var rb=new mxOrgChartLayout(N,2,da,U),mb=rb.isVertexIgnored;rb.isVertexIgnored=function(Xa){return mb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=null}else if("organic"==oa||"auto"==oa&&Ma.length>C.length){N.view.validate();var vb=new mxFastOrganicLayout(N);
+vb.forceConstant=3*U;vb.disableEdgeStyle=!1;vb.resetEdges=!1;var Bb=vb.isVertexIgnored;vb.isVertexIgnored=function(Xa){return Bb.apply(this,arguments)||0>mxUtils.indexOf(C,Xa)};this.executeLayout(function(){vb.execute(N.getDefaultParent());Ka()},!0,na);na=null}}this.hideDialog()}finally{N.model.endUpdate()}null!=na&&na()}}catch(Xa){this.handleError(Xa)}};EditorUi.prototype.getSearch=function(e){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=e&&0<window.location.search.length){var g=
+"?",v;for(v in urlParams)0>mxUtils.indexOf(e,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(e){e=null!=e?e:window.location.pathname;var f=0<e.indexOf("?")?1:0;if("1"==urlParams.offline)e+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(g,v)&&(e=0==f?e+"?":e+"&",null!=urlParams[v]&&(e+=v+"="+
+urlParams[v],f++))}return e};EditorUi.prototype.showLinkDialog=function(e,f,g,v,y){e=new LinkDialog(this,e,f,g,!0,v,y);this.showDialog(e.container,560,130,!0,!0);e.init()};EditorUi.prototype.getServiceCount=function(e){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;e&&isLocalStorage&&"1"==urlParams.browser&&
+f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var e=this.getCurrentFile(),f=null!=e||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==e||e.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
+g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));e="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=e&&e.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("toggleDarkMode").setEnabled("atlas"!=
+uiTheme);this.actions.get("undo").setEnabled(this.canUndo()&&e);this.actions.get("redo").setEnabled(this.canRedo()&&e);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(e);this.menus.get("arrange").setEnabled(e);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(e),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(e));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
+function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var e=this.getCurrentFile();return null!=e&&e.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=function(e){var f=H.apply(this,arguments);this.addListener("darkModeChanged",mxUtils.bind(this,function(){f.refresh()}));
+this.addListener("sketchModeChanged",mxUtils.bind(this,function(){f.refresh()}));return f};var K=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){K.apply(this,arguments);var e=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),v=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(v);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(e.isEnabled());
+this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!e.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(v&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=
+f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==
+urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(e.isEnabled()?"/"+mxResources.get("replace"):"");e=e.view.getState(e.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=e&&null!=e.shape&&null!=e.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=
+this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(e,f,g,v,y,C,I,D){var N=e.editor.graph;if("xml"==g)e.hideDialog(),e.saveData(f,"xml",mxUtils.getXml(e.editor.getGraphXml()),"text/xml");else if("svg"==g)e.hideDialog(),e.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,y,C)),"image/svg+xml");else{var G=e.getFileData(!0,
+null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*y/N.view.scale),ja=Math.floor(ia.height*y/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(e.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!e.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});e.saveRequest(f,g,function(pa,ra){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(ra||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):
+"")+"&extras="+encodeURIComponent(JSON.stringify(ca))+(0<I?"&dpi="+I:"")+"&bg="+(null!=v?v:"none")+"&w="+ka+"&h="+ja+"&border="+C+"&xml="+encodeURIComponent(G))})}else"png"==g?e.exportImage(y,null==v||"none"==v,!0,!1,!1,C,!0,!1,null,D,I):e.exportImage(y,!1,!0,!1,!1,C,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var e=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=
+e;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(e.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=e.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(e){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(e));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+g.appendChild(v);var y=document.createElement("div");y.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";y.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var I=mxSettings.getCustomLibraries();for(e=0;e<I.length;e++){var D=I[e];if("R"==D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));C[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){y.innerText=
+"";if(0==G.length)y.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var ia=0;ia<G.length;ia++){var ka=G[ia];C[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(y,ka.title,C[ka.id]);(function(ca,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[ca.id]=ca:delete f[ca.id]})})(ka,ja)}},mxUtils.bind(this,function(G){y.innerText="";var ia=document.createElement("div");ia.style.padding="8px";ia.style.textAlign=
+"center";mxUtils.write(ia,mxResources.get("error")+": ");mxUtils.write(ia,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));y.appendChild(ia)}));g.appendChild(y);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,ia;for(ia in f)null==C[ia]&&(G++,mxUtils.bind(this,function(ka){this.remoteInvoke("getFileContent",[ka.downloadUrl],null,mxUtils.bind(this,function(ja){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+ja,ka))}catch(ca){this.handleError(ca,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ia]));for(ia in C)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,C[ia]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(e){this.remoteWin=e;for(var f=0;f<this.remoteInvokeQueue.length;f++)e.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
-function(e){var f=e.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?g.error&&g.error(e.error.errResp):g.callback&&g.callback.apply(this,e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,g,u,y){var C=!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);
-C&&u.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);C&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:N});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var g=mxUtils.bind(this,function(G,ha){var ka={event:"remoteInvokeResponse",
-msgMarkers:e.msgMarkers};null!=ha?ka.error={errResp:ha}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var u=e.funtionName,y=this.remoteInvokableFns[u];if(null!=y&&"function"===typeof this[u]){if(y.allowedDomains){for(var C=!1,I=0;I<y.allowedDomains.length;I++)if(f=="https://"+y.allowedDomains[I]){C=!0;break}if(!C){g(null,"Invalid Call: "+u+" is not allowed.");return}}var D=e.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),
-D.push(function(G){g(null,G||"Unkown Error")}),this[u].apply(this,D);else{var N=this[u].apply(this,D);g([N])}}else g(null,"Invalid Call: "+u+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var u=g.open("database",2);u.onupgradeneeded=function(y){try{var C=u.result;1>y.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});
-2>y.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};u.onsuccess=mxUtils.bind(this,function(y){var C=u.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||
-"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ha,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=
-ha.length)ja();else{var L=ha[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),qa=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo",
-"files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ha=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&
-null!=V.resp[0]?qa(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));e(C);C.onversionchange=function(){C.close()}});u.onerror=f;u.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,f,g,u,y){this.openDatabase(mxUtils.bind(this,function(C){try{y=y||"objects";Array.isArray(y)||(y=[y],e=[e],f=[f]);var I=C.transaction(y,"readwrite");I.oncomplete=g;I.onerror=u;for(C=0;C<y.length;C++)I.objectStore(y[C]).put(null!=
-e&&null!=e[C]?{key:e[C],data:f[C]}:f[C])}catch(D){null!=u&&u(D)}}),u)};EditorUi.prototype.removeDatabaseItem=function(e,f,g,u){this.openDatabase(mxUtils.bind(this,function(y){u=u||"objects";Array.isArray(u)||(u=[u],e=[e]);y=y.transaction(u,"readwrite");y.oncomplete=f;y.onerror=g;for(var C=0;C<u.length;C++)y.objectStore(u[C]).delete(e[C])}),g)};EditorUi.prototype.getDatabaseItem=function(e,f,g,u){this.openDatabase(mxUtils.bind(this,function(y){try{u=u||"objects";var C=y.transaction([u],"readonly").objectStore(u).get(e);
-C.onsuccess=function(){f(C.result)};C.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(e,f,g){this.openDatabase(mxUtils.bind(this,function(u){try{g=g||"objects";var y=u.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),C=[];y.onsuccess=function(I){null==I.target.result?e(C):(C.push(I.target.result.value),I.target.result.continue())};y.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,g){this.openDatabase(mxUtils.bind(this,
-function(u){try{g=g||"objects";var y=u.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){e(y.result)};y.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=
-e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var g=this.getCurrentFile();null!=g?g.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,g){var u=this.getCurrentFile();null!=u?u.addComment(e,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=
+function(e){var f=e.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));e.error?g.error&&g.error(e.error.errResp):g.callback&&g.callback.apply(this,e.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(e,f,g,v,y){var C=!0,I=window.setTimeout(mxUtils.bind(this,function(){C=!1;y({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);
+C&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);C&&y.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,error:N});e=JSON.stringify({event:"remoteInvoke",funtionName:e,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(e,"*"):this.remoteInvokeQueue.push(e)};EditorUi.prototype.handleRemoteInvoke=function(e,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",
+msgMarkers:e.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=e.funtionName,y=this.remoteInvokableFns[v];if(null!=y&&"function"===typeof this[v]){if(y.allowedDomains){for(var C=!1,I=0;I<y.allowedDomains.length;I++)if(f=="https://"+y.allowedDomains[I]){C=!0;break}if(!C){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=e.functionArgs;Array.isArray(D)||(D=[]);if(y.isAsync)D.push(function(){g(Array.prototype.slice.apply(arguments))}),
+D.push(function(G){g(null,G||"Unkown Error")}),this[v].apply(this,D);else{var N=this[v].apply(this,D);g([N])}}else g(null,"Invalid Call: "+v+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(e,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var v=g.open("database",2);v.onupgradeneeded=function(y){try{var C=v.result;1>y.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});
+2>y.oldVersion&&(C.createObjectStore("files",{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(y){var C=v.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(I){if(!I||
+"1"==urlParams.forceMigration){var D=document.createElement("iframe");D.style.display="none";D.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(D);var N=!0,G=!1,ia,ka=0,ja=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),ca=mxUtils.bind(this,function(){ka++;pa()}),pa=mxUtils.bind(this,function(){try{if(ka>=
+ia.length)ja();else{var L=ia[ka];StorageFile.getFileContent(this,L,mxUtils.bind(this,function(V){null==V||".scratchpad"==L&&V==this.emptyLibraryXml?D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[L]}),"*"):ca()}),ca)}}catch(V){console.log(V)}}),ra=mxUtils.bind(this,function(L){try{this.setDatabaseItem(null,[{title:L.title,size:L.data.length,lastModified:Date.now(),type:L.isLib?"L":"F"},{title:L.title,data:L.data}],ca,ca,["filesInfo",
+"files"])}catch(V){console.log(V)}});I=mxUtils.bind(this,function(L){try{if(L.source==D.contentWindow){var V={};try{V=JSON.parse(L.data)}catch(R){}"init"==V.event?(D.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),D.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=V.event||G||(N?null!=V.resp&&0<V.resp.length&&null!=V.resp[0]?(ia=V.resp[0],N=!1,pa()):ja():null!=V.resp&&0<V.resp.length&&
+null!=V.resp[0]?ra(V.resp[0]):ca())}}catch(R){console.log(R)}});window.addEventListener("message",I)}})));e(C);C.onversionchange=function(){C.close()}});v.onerror=f;v.onblocked=function(){}}catch(y){null!=f&&f(y)}else null!=f&&f()}else e(this.database)};EditorUi.prototype.setDatabaseItem=function(e,f,g,v,y){this.openDatabase(mxUtils.bind(this,function(C){try{y=y||"objects";Array.isArray(y)||(y=[y],e=[e],f=[f]);var I=C.transaction(y,"readwrite");I.oncomplete=g;I.onerror=v;for(C=0;C<y.length;C++)I.objectStore(y[C]).put(null!=
+e&&null!=e[C]?{key:e[C],data:f[C]}:f[C])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){v=v||"objects";Array.isArray(v)||(v=[v],e=[e]);y=y.transaction(v,"readwrite");y.oncomplete=f;y.onerror=g;for(var C=0;C<v.length;C++)y.objectStore(v[C]).delete(e[C])}),g)};EditorUi.prototype.getDatabaseItem=function(e,f,g,v){this.openDatabase(mxUtils.bind(this,function(y){try{v=v||"objects";var C=y.transaction([v],"readonly").objectStore(v).get(e);
+C.onsuccess=function(){f(C.result)};C.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(e,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),C=[];y.onsuccess=function(I){null==I.target.result?e(C):(C.push(I.target.result.value),I.target.result.continue())};y.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(e,f,g){this.openDatabase(mxUtils.bind(this,
+function(v){try{g=g||"objects";var y=v.transaction([g],"readonly").objectStore(g).getAllKeys();y.onsuccess=function(){e(y.result)};y.onerror=f}catch(C){null!=f&&f(C)}}),f)};EditorUi.prototype.commentsSupported=function(){var e=this.getCurrentFile();return null!=e?e.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var e=this.getCurrentFile();return null!=e?e.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var e=this.getCurrentFile();return null!=
+e?e.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(e,f){var g=this.getCurrentFile();null!=g?g.getComments(e,f):e([])};EditorUi.prototype.addComment=function(e,f,g){var v=this.getCurrentFile();null!=v?v.addComment(e,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var e=this.getCurrentFile();return null!=e?e.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var e=this.getCurrentFile();return null!=e?e.canComment():!0};EditorUi.prototype.newComment=
function(e,f){var g=this.getCurrentFile();return null!=g?g.newComment(e,f):new DrawioComment(this,null,e,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var e=this.getCurrentFile();return null!=e&&e.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(e,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(e,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var e=this.getCurrentFile();
-return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,g,u,y,C,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,g,u,y,C,I,D)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+return null!=e&&(e.constructor==DriveFile&&e.isEditable()||e.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(e){e.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(e,f,g,v,y,C,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(e,f,g,v,y,C,I,D)};EditorUi.prototype.loadFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
return this.editor.loadFonts(e)};EditorUi.prototype.createSvgDataUri=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(e)};EditorUi.prototype.embedCssFonts=function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(e,f)};EditorUi.prototype.embedExtFonts=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(e)};EditorUi.prototype.exportToCanvas=function(e,
-f,g,u,y,C,I,D,N,G,ha,ka,ja,ca,pa,qa){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,g,u,y,C,I,D,N,G,ha,ka,ja,ca,pa,qa)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,g,u){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,g,u)};EditorUi.prototype.convertImageToDataUri=
-function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,f,g,u){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,g,u)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};
-EditorUi.prototype.writeGraphModelToPng=function(e,f,g,u,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,g,u,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),u=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<u.length){var y="<mxfile "===
-u.substring(0,8)||"<?xml"===u.substring(0,5)||"\x3c!--[if IE]>"===u.substring(0,12);u="<mxlibrary>"===u.substring(0,11);(y||u)&&e.push(g)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,d,k,l,B,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,qa=0;qa<ca.length;qa++)"none"!=ca[qa].style.display&&ca[qa].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,qa,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}u={div:pa,comment:ca,saveCallback:qa,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
-Z.className="geCommentEditTxtArea";Z.style.minHeight=R.offsetHeight+"px";Z.value=ca.content;pa.insertBefore(Z,R);var la=document.createElement("div");la.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(pa.parentNode.removeChild(pa),E()):V();u=null});q.className="geCommentEditBtn";la.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){R.innerText="";ca.content=Z.value;mxUtils.write(R,ca.content);V();qa(ca);u=null});mxEvent.addListener(Z,
-"keydown",mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(F.click(),mxEvent.consume(T)):27==T.keyCode&&(q.click(),mxEvent.consume(T)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";la.appendChild(F);pa.insertBefore(la,R);Y.style.display="none";R.style.display="none";Z.focus()}function S(ca,pa){pa.innerText="";ca=new Date(ca.modifiedDate);var qa=b.timeSince(ca);null==qa&&(qa=mxResources.get("lessThanAMinute"));
-mxUtils.write(pa,mxResources.get("timeAgo",[qa],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function e(ca,pa,qa,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
-"geCommentAction";var sa=document.createElement("a");sa.className="geCommentActionLnk";mxUtils.write(sa,U);na.appendChild(sa);mxEvent.addListener(sa,"click",function(za){da(za,ca);za.preventDefault();mxEvent.consume(za)});ba.appendChild(na);fa&&(na.style.display="none")}function Y(){function U(na){da.push(fa);if(null!=na.replies)for(var sa=0;sa<na.replies.length;sa++)fa=fa.nextSibling,U(na.replies[sa])}var da=[],fa=la;U(ca);return{pdiv:fa,replies:da}}function Z(U,da,fa,na,sa){function za(){H(Aa);
+f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(e,f,g,v,y,C,I,D,N,G,ia,ka,ja,ca,pa,ra)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(e,f,g,v)};EditorUi.prototype.convertImageToDataUri=
+function(e,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(e,f)};EditorUi.prototype.base64Encode=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(e)};EditorUi.prototype.updateCRC=function(e,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(e,f,g,v)};EditorUi.prototype.crc32=function(e){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(e)};
+EditorUi.prototype.writeGraphModelToPng=function(e,f,g,v,y){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(e,f,g,v,y)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var e=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),v=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<v.length){var y="<mxfile "===
+v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(y||v)&&e.push(g)}}return e};EditorUi.prototype.getLocalStorageFile=function(e){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(e);return{title:e,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,d,k,l,B,p){function E(){for(var ca=I.getElementsByTagName("div"),pa=0,ra=0;ra<ca.length;ra++)"none"!=ca[ra].style.display&&ca[ra].parentNode==I&&pa++;D.style.display=0==pa?"block":"none"}function M(ca,pa,ra,L){function V(){pa.removeChild(Z);pa.removeChild(la);Y.style.display="block";R.style.display="block"}v={div:pa,comment:ca,saveCallback:ra,deleteOnCancel:L};var R=pa.querySelector(".geCommentTxt"),Y=pa.querySelector(".geCommentActionsList"),Z=document.createElement("textarea");
+Z.className="geCommentEditTxtArea";Z.style.minHeight=R.offsetHeight+"px";Z.value=ca.content;pa.insertBefore(Z,R);var la=document.createElement("div");la.className="geCommentEditBtns";var q=mxUtils.button(mxResources.get("cancel"),function(){L?(pa.parentNode.removeChild(pa),E()):V();v=null});q.className="geCommentEditBtn";la.appendChild(q);var F=mxUtils.button(mxResources.get("save"),function(){R.innerText="";ca.content=Z.value;mxUtils.write(R,ca.content);V();ra(ca);v=null});mxEvent.addListener(Z,
+"keydown",mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(F.click(),mxEvent.consume(T)):27==T.keyCode&&(q.click(),mxEvent.consume(T)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";la.appendChild(F);pa.insertBefore(la,R);Y.style.display="none";R.style.display="none";Z.focus()}function S(ca,pa){pa.innerText="";ca=new Date(ca.modifiedDate);var ra=b.timeSince(ca);null==ra&&(ra=mxResources.get("lessThanAMinute"));
+mxUtils.write(pa,mxResources.get("timeAgo",[ra],"{1} ago"));pa.setAttribute("title",ca.toLocaleDateString()+" "+ca.toLocaleTimeString())}function H(ca){var pa=document.createElement("img");pa.className="geCommentBusyImg";pa.src=IMAGE_PATH+"/spin.gif";ca.appendChild(pa);ca.busyImg=pa}function K(ca){ca.style.border="1px solid red";ca.removeChild(ca.busyImg)}function Q(ca){ca.style.border="";ca.removeChild(ca.busyImg)}function e(ca,pa,ra,L,V){function R(U,da,fa){var na=document.createElement("li");na.className=
+"geCommentAction";var sa=document.createElement("a");sa.className="geCommentActionLnk";mxUtils.write(sa,U);na.appendChild(sa);mxEvent.addListener(sa,"click",function(za){da(za,ca);za.preventDefault();mxEvent.consume(za)});aa.appendChild(na);fa&&(na.style.display="none")}function Y(){function U(na){da.push(fa);if(null!=na.replies)for(var sa=0;sa<na.replies.length;sa++)fa=fa.nextSibling,U(na.replies[sa])}var da=[],fa=la;U(ca);return{pdiv:fa,replies:da}}function Z(U,da,fa,na,sa){function za(){H(Aa);
ca.addReply(oa,function(ya){oa.id=ya;ca.replies.push(oa);Q(Aa);fa&&fa()},function(ya){ua();K(Aa);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,sa)}function ua(){M(oa,Aa,function(ya){za()},!0)}var Ba=Y().pdiv,oa=b.newComment(U,b.getCurrentUser());oa.pCommentId=ca.id;null==ca.replies&&(ca.replies=[]);var Aa=e(oa,ca.replies,Ba,L+1);da?ua():za()}if(V||!ca.isResolved){D.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";
la.setAttribute("data-commentId",ca.id);la.style.marginLeft=20*L+5+"px";ca.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var q=document.createElement("div");q.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=ca.user.pictureUrl||Editor.userImage;q.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";q.appendChild(F);var T=document.createElement("div");T.className="geCommentUsername";mxUtils.write(T,
-ca.user.displayName||"");F.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ca.id);S(ca,T);F.appendChild(T);la.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ca.content||"");la.appendChild(q);ca.isLocked&&(la.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var ba=document.createElement("ul");ba.className="geCommentActionsList";q.appendChild(ba);f||ca.isLocked||0!=
+ca.user.displayName||"");F.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ca.id);S(ca,T);F.appendChild(T);la.appendChild(q);q=document.createElement("div");q.className="geCommentTxt";mxUtils.write(q,ca.content||"");la.appendChild(q);ca.isLocked&&(la.style.opacity="0.5");q=document.createElement("div");q.className="geCommentActions";var aa=document.createElement("ul");aa.className="geCommentActionsList";q.appendChild(aa);f||ca.isLocked||0!=
L&&!g||R(mxResources.get("reply"),function(){Z("",!0)},ca.isResolved);F=b.getCurrentUser();null==F||F.id!=ca.user.id||f||ca.isLocked||(R(mxResources.get("edit"),function(){function U(){M(ca,la,function(){H(la);ca.editComment(ca.content,function(){Q(la)},function(da){K(la);U();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},ca.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(la);ca.deleteComment(function(U){if(!0===
U){U=la.querySelector(".geCommentTxt");U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var da=la.querySelectorAll(".geCommentAction");for(U=0;U<da.length;U++)da[U].parentNode.removeChild(da[U]);Q(la);la.style.opacity="0.5"}else{da=Y(ca).replies;for(U=0;U<da.length;U++)I.removeChild(da[U]);for(U=0;U<pa.length;U++)if(pa[U]==ca){pa.splice(U,1);break}D.style.display=0==I.getElementsByTagName("div").length?"block":"none"}},function(U){K(la);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
ca.isResolved));f||ca.isLocked||0!=L||R(ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function da(){var fa=U.target;fa.innerText="";ca.isResolved=!ca.isResolved;mxUtils.write(fa,ca.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ca.isResolved?"none":"",sa=Y(ca).replies,za=Editor.isDarkMode()?"transparent":ca.isResolved?"ghostWhite":"white",ua=0;ua<sa.length;ua++){sa[ua].style.backgroundColor=za;for(var Ba=sa[ua].querySelectorAll(".geCommentAction"),
-oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ha||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=qa?I.insertBefore(la,qa.nextSibling):I.appendChild(la);for(qa=0;null!=ca.replies&&qa<ca.replies.length;qa++)q=ca.replies[qa],q.isResolved=ca.isResolved,e(q,ca.replies,null,L+1,V);null!=u&&(u.comment.id==ca.id?(V=ca.content,ca.content=u.comment.content,M(ca,
-la,u.saveCallback,u.deleteOnCancel),ca.content=V):null==u.comment.id&&u.comment.pCommentId==ca.id&&(I.appendChild(u.div),M(u.comment,u.div,u.saveCallback,u.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),u=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+oa=0;oa<Ba.length;oa++)Ba[oa]!=fa.parentNode&&(Ba[oa].style.display=na);ia||(sa[ua].style.display="none")}E()}ca.isResolved?Z(mxResources.get("reOpened")+": ",!0,da,!1,!0):Z(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(q);null!=ra?I.insertBefore(la,ra.nextSibling):I.appendChild(la);for(ra=0;null!=ca.replies&&ra<ca.replies.length;ra++)q=ca.replies[ra],q.isResolved=ca.isResolved,e(q,ca.replies,null,L+1,V);null!=v&&(v.comment.id==ca.id?(V=ca.content,ca.content=v.comment.content,M(ca,
+la,v.saveCallback,v.deleteOnCancel),ca.content=V):null==v.comment.id&&v.comment.pCommentId==ca.id&&(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return la}}var f=!b.canComment(),g=b.canReplyToReplies(),v=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var C=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(C)+7+"px";y.appendChild(I);var D=document.createElement("span");D.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(D,mxResources.get("noCommentsFound"));var N=document.createElement("div");N.className="geToolbarContainer geCommentsToolbar";N.style.height=C;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";C=document.createElement("a");
-C.className="geButton";if(!f){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(qa,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var qa=b.newComment("",b.getCurrentUser()),L=e(qa,ka,null,0);
-pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ha=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ha=!ha)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
+C.className="geButton";if(!f){var G=C.cloneNode();G.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(ca){function pa(){M(ra,L,function(V){H(L);b.addComment(V,function(R){V.id=R;ka.push(V);Q(L)},function(R){K(L);pa();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ra=b.newComment("",b.getCurrentUser()),L=e(ra,ka,null,0);
+pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=C.cloneNode();G.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';G.setAttribute("title",mxResources.get("showResolved"));G.className="geAdaptiveAsset";var ia=!1;mxEvent.addListener(G,"click",function(ca){this.className=(ia=!ia)?"geButton geCheckedBtn":"geButton";ja();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G);b.commentsRefreshNeeded()&&(G=C.cloneNode(),G.innerHTML='<img src="'+IMAGE_PATH+
'/update16.png" style="width: 16px; padding: 2px;">',G.setAttribute("title",mxResources.get("refresh")),G.className="geAdaptiveAsset",mxEvent.addListener(G,"click",function(ca){ja();ca.preventDefault();mxEvent.consume(ca)}),N.appendChild(G));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geAdaptiveAsset",mxEvent.addListener(C,"click",function(ca){p();ca.preventDefault();
-mxEvent.consume(ca)}),N.appendChild(C));y.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=u)try{u.div=u.div.cloneNode(!0);var ca=u.div.querySelector(".geCommentEditTxtArea"),pa=u.div.querySelector(".geCommentEditBtns");u.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(qa){b.handleError(qa)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(qa){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}qa.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=qa;for(qa=0;qa<ka.length;qa++)L(ka[qa].replies),e(ka[qa],ka,null,0,ha);null!=u&&null==u.comment.id&&null==u.comment.pCommentId&&
-(I.appendChild(u.div),M(u.comment,u.div,u.saveCallback,u.deleteOnCancel))},mxUtils.bind(this,function(qa){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(qa&&qa.message?": "+qa.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;N=mxUtils.bind(this,function(){function ca(R){var Y=qa[R.id];if(null!=Y)for(S(R,Y),Y=0;null!=R.replies&&Y<R.replies.length;Y++)ca(R.replies[Y])}if(this.window.isVisible()){for(var pa=I.querySelectorAll(".geCommentDate"),
-qa={},L=0;L<pa.length;L++){var V=pa[L];qa[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),y,d,k,l,B,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
+mxEvent.consume(ca)}),N.appendChild(C));y.appendChild(N);var ka=[],ja=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var ca=v.div.querySelector(".geCommentEditTxtArea"),pa=v.div.querySelector(".geCommentEditBtns");v.comment.content=ca.value;ca.parentNode.removeChild(ca);pa.parentNode.removeChild(pa)}catch(ra){b.handleError(ra)}I.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";g=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ra){function L(V){if(null!=V){V.sort(function(Y,Z){return new Date(Y.modifiedDate)-new Date(Z.modifiedDate)});for(var R=0;R<V.length;R++)L(V[R].replies)}}ra.sort(function(V,R){return new Date(V.modifiedDate)-new Date(R.modifiedDate)});I.innerText="";I.appendChild(D);D.style.display="block";ka=ra;for(ra=0;ra<ka.length;ra++)L(ka[ra].replies),e(ka[ra],ka,null,0,ia);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&
+(I.appendChild(v.div),M(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(ra){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ra&&ra.message?": "+ra.message:""));this.hasError=!0})):I.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ja();this.refreshComments=ja;N=mxUtils.bind(this,function(){function ca(R){var Y=ra[R.id];if(null!=Y)for(S(R,Y),Y=0;null!=R.replies&&Y<R.replies.length;Y++)ca(R.replies[Y])}if(this.window.isVisible()){for(var pa=I.querySelectorAll(".geCommentDate"),
+ra={},L=0;L<pa.length;L++){var V=pa[L];ra[V.getAttribute("data-commentId")]=V}for(L=0;L<ka.length;L++)ca(ka[L])}});setInterval(N,6E4);this.refreshCommentsTime=N;this.window=new mxWindow(mxResources.get("comments"),y,d,k,l,B,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
b.installResizeHandler(this,!0)},ConfirmDialog=function(b,d,k,l,B,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var e=document.createElement("div");e.style.padding="6px";e.style.overflow="auto";e.style.maxHeight=K+"px";e.style.lineHeight="1.2em";mxUtils.write(e,d);Q.appendChild(e);null!=H&&(e=document.createElement("div"),e.style.padding="6px 0 6px 0",d=document.createElement("img"),d.setAttribute("src",H),e.appendChild(d),Q.appendChild(e));H=document.createElement("div");
H.style.textAlign="center";H.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l(f.checked)});p.className="geBtn";null!=M&&(p.innerHTML=M+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&H.appendChild(p);var g=mxUtils.button(B||mxResources.get("ok"),function(){b.hideDialog();null!=k&&
k(f.checked)});H.appendChild(g);null!=E?(g.innerHTML=E+"<br>"+g.innerHTML+"<br>",g.style.paddingBottom="8px",g.style.paddingTop="8px",g.style.height="auto",g.className="geBtn",g.style.width="40%"):g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(p);Q.appendChild(H);S?(H.style.marginTop="10px",e=document.createElement("p"),e.style.marginTop="20px",e.style.marginBottom="0px",e.appendChild(f),B=document.createElement("span"),mxUtils.write(B," "+mxResources.get("rememberThisSetting")),
-e.appendChild(B),Q.appendChild(e),mxEvent.addListener(B,"click",function(u){f.checked=!f.checked;mxEvent.consume(u)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+e.appendChild(B),Q.appendChild(e),mxEvent.addListener(B,"click",function(v){f.checked=!f.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){g.focus()};this.container=Q};function DiagramPage(b,d){this.node=b;null!=d?this.node.setAttribute("id",d):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,d,k){this.ui=b;this.page=d;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,d,k){this.ui=b;this.oldIndex=d;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,d,k){this.ui=b;this.previousPage=this.page=d;this.neverShown=!0;null!=d&&(this.neverShown=null==d.viewState,this.ui.updatePageRoot(d),null!=k&&(d.viewState=k,this.neverShown=!1))}
@@ -3935,7 +3937,7 @@ EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.s
this.tabContainer.style.backgroundColor;d.style.cursor="move";d.style.color="gray";b&&(mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(d.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(k){d.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return d};
EditorUi.prototype.createControlTab=function(b,d,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=d;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,d){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();
-var B=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var u=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),y=this.pages[g].getId();u.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(u,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
+var B=new mxPopupMenu(mxUtils.bind(this,function(M,S){var H=mxUtils.bind(this,function(){for(var f=0;f<this.pages.length;f++)mxUtils.bind(this,function(g){var v=M.addItem(this.getShortPageName(this.pages[g]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[g])}),S),y=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[g]==this.currentPage&&M.addCheckmark(v,Editor.checkmarkImage)})(f)}),K=mxUtils.bind(this,
function(){M.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),S)});d||H();if(this.editor.graph.isEnabled()){d||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var e=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[e]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[e]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);d||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
[e]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}d&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));B.div.className+=" geMenubarMenu";B.smartSeparators=!0;B.showDisabled=!0;B.autoExpand=!0;B.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(B,arguments);B.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);B.popup(p,E,null,l);this.setCurrentMenu(B);mxEvent.consume(l)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var d=b.getElementsByTagName("div")[0];d.style.display="inline-block";d.style.width="21px";d.style.height="21px";return b};
@@ -3953,35 +3955,35 @@ S=new EmbedDialog(this,this.getLinkForPage(b,p,S));this.showDialog(S.container,4
l));return l};b.beforeDecode=function(d,k,l){l.ui=d.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var B=k.ownerDocument.createElement("diagram");B.setAttribute("id",k.getAttribute("relatedPage"));B.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(B);B=k.getAttribute("viewState");null!=B&&(l.relatedPage.viewState=JSON.parse(B),k.removeAttribute("viewState"));k=k.cloneNode(!0);B=k.firstChild;if(null!=B)for(l.relatedPage.root=d.decodeCell(B,
!1),l=B.nextSibling,B.parentNode.removeChild(B),B=l;null!=B;){l=B.nextSibling;if(B.nodeType==mxConstants.NODETYPE_ELEMENT){var p=B.getAttribute("id");null==d.lookup(p)&&d.decodeCell(B)}B.parentNode.removeChild(B);B=l}}return k};b.afterDecode=function(d,k,l){l.index=l.previousIndex;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(l,B,p,E,M){B=null!=B?B:!1;null==p&&(p=this.getFoldableCells(this.getSelectionCells(),l));this.stopEditing();this.model.beginUpdate();try{for(var S=p.slice(),H=0;H<p.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(p[H]),"treeFolding","0")&&this.foldTreeCell(l,p[H]);p=S;p=b.apply(this,arguments)}finally{this.model.endUpdate()}return p};Graph.prototype.foldTreeCell=
function(l,B){this.model.beginUpdate();try{var p=[];this.traverse(B,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==B||null!=S&&!H||p.push(M);return(null==S||H)&&(M==B||!this.model.isCollapsed(M))}));this.model.setCollapsed(B,l);for(var E=0;E<p.length;E++)this.model.setVisible(p[E],!l)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(l){return!this.isEdgeIgnored(l)};Graph.prototype.getTreeEdges=function(l,B,p,E,M,S){return this.model.filterCells(this.getEdges(l,
-B,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(L){return u.isVertex(L)&&p(L)}function B(L){var V=
-!1;null!=L&&(V="1"==g.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=u.getParent(L),V=g.view.getState(L),V="tree"==(null!=V?V.style:g.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=u.getParent(L),V=g.view.getState(L),g.view.getState(L),V=null!=(null!=V?V.style:g.getCellStyle(L)).childLayout);return V}function M(L){L=g.view.getState(L);if(null!=L){var V=g.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=g.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+B,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,B){return this.getTreeEdges(l,B,!1,!0,!1)};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function l(L){return v.isVertex(L)&&p(L)}function B(L){var V=
+!1;null!=L&&(V="1"==g.getCurrentCellStyle(L).treeMoving);return V}function p(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),V="tree"==(null!=V?V.style:g.getCellStyle(L)).containerType);return V}function E(L){var V=!1;null!=L&&(L=v.getParent(L),V=g.view.getState(L),g.view.getState(L),V=null!=(null!=V?V.style:g.getCellStyle(L)).childLayout);return V}function M(L){L=g.view.getState(L);if(null!=L){var V=g.getIncomingTreeEdges(L.cell);if(0<V.length&&(V=g.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==L.y&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==L.y+L.height&&Math.abs(V.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(L,V){V=null!=V?V:!0;g.model.beginUpdate();try{var R=g.model.getParent(L),Y=g.getIncomingTreeEdges(L),Z=g.cloneCells([Y[0],L]);g.model.setTerminal(Z[0],g.model.getTerminal(Y[0],
-!0),!0);var la=M(L),q=R.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?Z[1].geometry.x+=V?L.geometry.width+10:-Z[1].geometry.width-10:Z[1].geometry.y+=V?L.geometry.height+10:-Z[1].geometry.height-10;g.view.currentRoot!=R&&(Z[1].geometry.x-=q.x,Z[1].geometry.y-=q.y);var F=g.view.getState(L),T=g.view.scale;if(null!=F){var ba=mxRectangle.fromRectangle(F);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ba.x+=(V?L.geometry.width+10:-Z[1].geometry.width-10)*T:
-ba.y+=(V?L.geometry.height+10:-Z[1].geometry.height-10)*T;var U=g.getOutgoingTreeEdges(g.model.getTerminal(Y[0],!0));if(null!=U){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,fa=q=Y=0;fa<U.length;fa++){var na=g.model.getTerminal(U[fa],!1);if(la==M(na)){var sa=g.view.getState(na);na!=L&&null!=sa&&(da&&V!=sa.getCenterX()<F.getCenterX()||!da&&V!=sa.getCenterY()<F.getCenterY())&&mxUtils.intersects(ba,sa)&&(Y=10+Math.max(Y,(Math.min(ba.x+ba.width,sa.x+sa.width)-Math.max(ba.x,
-sa.x))/T),q=10+Math.max(q,(Math.min(ba.y+ba.height,sa.y+sa.height)-Math.max(ba.y,sa.y))/T))}}da?q=0:Y=0;for(fa=0;fa<U.length;fa++)if(na=g.model.getTerminal(U[fa],!1),la==M(na)&&(sa=g.view.getState(na),na!=L&&null!=sa&&(da&&V!=sa.getCenterX()<F.getCenterX()||!da&&V!=sa.getCenterY()<F.getCenterY()))){var za=[];g.traverse(sa.cell,!0,function(ua,Ba){var oa=null!=Ba&&g.isTreeEdge(Ba);oa&&za.push(Ba);(null==Ba||oa)&&za.push(ua);return null==Ba||oa});g.moveCells(za,(V?1:-1)*Y,(V?1:-1)*q)}}}return g.addCells(Z,
-R)}finally{g.model.endUpdate()}}function H(L){g.model.beginUpdate();try{var V=M(L),R=g.getIncomingTreeEdges(L),Y=g.cloneCells([R[0],L]);g.model.setTerminal(R[0],Y[1],!1);g.model.setTerminal(Y[0],Y[1],!0);g.model.setTerminal(Y[0],L,!1);var Z=g.model.getParent(L),la=Z.geometry,q=[];g.view.currentRoot!=Z&&(Y[1].geometry.x-=la.x,Y[1].geometry.y-=la.y);g.traverse(L,!0,function(ba,U){var da=null!=U&&g.isTreeEdge(U);da&&q.push(U);(null==U||da)&&q.push(ba);return null==U||da});var F=L.geometry.width+40,T=
+!0),!0);var la=M(L),q=R.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?Z[1].geometry.x+=V?L.geometry.width+10:-Z[1].geometry.width-10:Z[1].geometry.y+=V?L.geometry.height+10:-Z[1].geometry.height-10;g.view.currentRoot!=R&&(Z[1].geometry.x-=q.x,Z[1].geometry.y-=q.y);var F=g.view.getState(L),T=g.view.scale;if(null!=F){var aa=mxRectangle.fromRectangle(F);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?aa.x+=(V?L.geometry.width+10:-Z[1].geometry.width-10)*T:
+aa.y+=(V?L.geometry.height+10:-Z[1].geometry.height-10)*T;var U=g.getOutgoingTreeEdges(g.model.getTerminal(Y[0],!0));if(null!=U){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,fa=q=Y=0;fa<U.length;fa++){var na=g.model.getTerminal(U[fa],!1);if(la==M(na)){var sa=g.view.getState(na);na!=L&&null!=sa&&(da&&V!=sa.getCenterX()<F.getCenterX()||!da&&V!=sa.getCenterY()<F.getCenterY())&&mxUtils.intersects(aa,sa)&&(Y=10+Math.max(Y,(Math.min(aa.x+aa.width,sa.x+sa.width)-Math.max(aa.x,
+sa.x))/T),q=10+Math.max(q,(Math.min(aa.y+aa.height,sa.y+sa.height)-Math.max(aa.y,sa.y))/T))}}da?q=0:Y=0;for(fa=0;fa<U.length;fa++)if(na=g.model.getTerminal(U[fa],!1),la==M(na)&&(sa=g.view.getState(na),na!=L&&null!=sa&&(da&&V!=sa.getCenterX()<F.getCenterX()||!da&&V!=sa.getCenterY()<F.getCenterY()))){var za=[];g.traverse(sa.cell,!0,function(ua,Ba){var oa=null!=Ba&&g.isTreeEdge(Ba);oa&&za.push(Ba);(null==Ba||oa)&&za.push(ua);return null==Ba||oa});g.moveCells(za,(V?1:-1)*Y,(V?1:-1)*q)}}}return g.addCells(Z,
+R)}finally{g.model.endUpdate()}}function H(L){g.model.beginUpdate();try{var V=M(L),R=g.getIncomingTreeEdges(L),Y=g.cloneCells([R[0],L]);g.model.setTerminal(R[0],Y[1],!1);g.model.setTerminal(Y[0],Y[1],!0);g.model.setTerminal(Y[0],L,!1);var Z=g.model.getParent(L),la=Z.geometry,q=[];g.view.currentRoot!=Z&&(Y[1].geometry.x-=la.x,Y[1].geometry.y-=la.y);g.traverse(L,!0,function(aa,U){var da=null!=U&&g.isTreeEdge(U);da&&q.push(U);(null==U||da)&&q.push(aa);return null==U||da});var F=L.geometry.width+40,T=
L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION_NORTH?(F=0,T=-T):V==mxConstants.DIRECTION_WEST?(F=-F,T=0):V==mxConstants.DIRECTION_EAST&&(T=0);g.moveCells(q,F,T);return g.addCells(Y,Z)}finally{g.model.endUpdate()}}function K(L,V){g.model.beginUpdate();try{var R=g.model.getParent(L),Y=g.getIncomingTreeEdges(L),Z=M(L);0==Y.length&&(Y=[g.createEdge(R,null,"",null,null,g.createCurrentEdgeStyle())],Z=V);var la=g.cloneCells([Y[0],L]);g.model.setTerminal(la[0],L,!0);if(null==
-g.model.getTerminal(la[0],!1)){g.model.setTerminal(la[0],la[1],!1);var q=g.getCellStyle(la[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),T;for(T in F)g.setCellStyles(T,F[T],[la[0]]),"edgeStyle"==T&&"elbowEdgeStyle"==F[T]&&g.setCellStyles("elbow",Z==mxConstants.DIRECTION_SOUTH||Z==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(sa){}}Y=g.getOutgoingTreeEdges(L);var ba=R.geometry;V=[];g.view.currentRoot==R&&(ba=new mxRectangle);for(q=0;q<Y.length;q++){var U=g.model.getTerminal(Y[q],
-!1);null!=U&&V.push(U)}var da=g.view.getBounds(V),fa=g.view.translate,na=g.view.scale;Z==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x-ba.x+10,la[1].geometry.y+=la[1].geometry.height-ba.y+40):Z==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x+-ba.x+10,la[1].geometry.y-=la[1].geometry.height+ba.y+40):(la[1].geometry.x=Z==mxConstants.DIRECTION_WEST?
-la[1].geometry.x-(la[1].geometry.width+ba.x+40):la[1].geometry.x+(la[1].geometry.width-ba.x+40),la[1].geometry.y=null==da?L.geometry.y+(L.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/na-fa.y+-ba.y+10);return g.addCells(la,R)}finally{g.model.endUpdate()}}function Q(L,V,R){L=g.getOutgoingTreeEdges(L);R=g.view.getState(R);var Y=[];if(null!=R&&null!=L){for(var Z=0;Z<L.length;Z++){var la=g.view.getState(g.model.getTerminal(L[Z],!1));null!=la&&(!V&&Math.min(la.x+la.width,R.x+R.width)>=Math.max(la.x,
+g.model.getTerminal(la[0],!1)){g.model.setTerminal(la[0],la[1],!1);var q=g.getCellStyle(la[1]).newEdgeStyle;if(null!=q)try{var F=JSON.parse(q),T;for(T in F)g.setCellStyles(T,F[T],[la[0]]),"edgeStyle"==T&&"elbowEdgeStyle"==F[T]&&g.setCellStyles("elbow",Z==mxConstants.DIRECTION_SOUTH||Z==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(sa){}}Y=g.getOutgoingTreeEdges(L);var aa=R.geometry;V=[];g.view.currentRoot==R&&(aa=new mxRectangle);for(q=0;q<Y.length;q++){var U=g.model.getTerminal(Y[q],
+!1);null!=U&&V.push(U)}var da=g.view.getBounds(V),fa=g.view.translate,na=g.view.scale;Z==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x-aa.x+10,la[1].geometry.y+=la[1].geometry.height-aa.y+40):Z==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?L.geometry.x+(L.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/na-fa.x+-aa.x+10,la[1].geometry.y-=la[1].geometry.height+aa.y+40):(la[1].geometry.x=Z==mxConstants.DIRECTION_WEST?
+la[1].geometry.x-(la[1].geometry.width+aa.x+40):la[1].geometry.x+(la[1].geometry.width-aa.x+40),la[1].geometry.y=null==da?L.geometry.y+(L.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/na-fa.y+-aa.y+10);return g.addCells(la,R)}finally{g.model.endUpdate()}}function Q(L,V,R){L=g.getOutgoingTreeEdges(L);R=g.view.getState(R);var Y=[];if(null!=R&&null!=L){for(var Z=0;Z<L.length;Z++){var la=g.view.getState(g.model.getTerminal(L[Z],!1));null!=la&&(!V&&Math.min(la.x+la.width,R.x+R.width)>=Math.max(la.x,
R.x)||V&&Math.min(la.y+la.height,R.y+R.height)>=Math.max(la.y,R.y))&&Y.push(la)}Y.sort(function(q,F){return V?q.x+q.width-F.x-F.width:q.y+q.height-F.y-F.height})}return Y}function e(L,V){var R=M(L),Y=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST)==Y&&R!=V?f.actions.get("selectParent").funct():R==V?(V=g.getOutgoingTreeEdges(L),null!=V&&0<V.length&&g.setSelectionCell(g.model.getTerminal(V[0],!1))):(R=g.getIncomingTreeEdges(L),
-null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,u=g.getModel(),y=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){y.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
+null!=R&&0<R.length&&(Y=Q(g.model.getTerminal(R[0],!0),Y,L),L=g.view.getState(L),null!=L&&(L=mxUtils.indexOf(Y,L),0<=L&&(L+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=Y.length-1&&g.setSelectionCell(Y[L].cell)))))}var f=this,g=f.editor.graph,v=g.getModel(),y=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){y.apply(this,arguments);if(1==g.getSelectionCount()){V=g.getSelectionCell();var Y=g.getOutgoingTreeEdges(V);L.addSeparator();0<Y.length&&(l(g.getSelectionCell())&&
this.addMenuItems(L,["selectChildren"],null,R),this.addMenuItems(L,["selectDescendants"],null,R));l(g.getSelectionCell())?(L.addSeparator(),0<g.getIncomingTreeEdges(V).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,R)):0<g.model.getEdgeCount(V)&&this.addMenuItems(L,["selectConnections"],null,R)}};f.actions.addAction("selectChildren",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getOutgoingTreeEdges(L);if(null!=L){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],
!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+X");f.actions.addAction("selectSiblings",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=g.getSelectionCell();L=g.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=g.getOutgoingTreeEdges(g.model.getTerminal(L[0],!0)),null!=L)){for(var V=[],R=0;R<L.length;R++)V.push(g.model.getTerminal(L[R],!1));g.setSelectionCells(V)}}},null,null,"Alt+Shift+S");f.actions.addAction("selectParent",function(){if(g.isEnabled()&&1==g.getSelectionCount()){var L=
g.getSelectionCell();L=g.getIncomingTreeEdges(L);null!=L&&0<L.length&&g.setSelectionCell(g.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");f.actions.addAction("selectDescendants",function(L,V){L=g.getSelectionCell();if(g.isEnabled()&&g.model.isVertex(L)){if(null!=V&&mxEvent.isAltDown(V))g.setSelectionCells(g.model.getTreeEdges(L,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var R=[];g.traverse(L,!0,function(Y,Z){var la=null!=Z&&g.isTreeEdge(Z);la&&R.push(Z);null!=
-Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var C=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];u.isEdge(Z)&&p(Z)&&(R.push(Z),Z=u.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
+Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var C=g.removeCells;g.removeCells=function(L,V){V=null!=V?V:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));V&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var R=[],Y=0;Y<L.length;Y++){var Z=L[Y];v.isEdge(Z)&&p(Z)&&(R.push(Z),Z=v.getTerminal(Z,!1));if(l(Z)){var la=[];g.traverse(Z,!0,function(q,F){var T=null!=F&&g.isTreeEdge(F);T&&la.push(F);(null==F||T)&&
la.push(q);return null==F||T});0<la.length&&(R=R.concat(la),Z=g.getIncomingTreeEdges(L[Y]),L=L.concat(Z))}else null!=Z&&R.push(L[Y])}L=R;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(L,V,R){return l(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,R))};var I=g.duplicateCells;g.duplicateCells=function(L,V){L=null!=L?L:this.getSelectionCells();for(var R=L.slice(0),Y=0;Y<R.length;Y++){var Z=g.view.getState(R[Y]);if(null!=Z&&l(Z.cell)){var la=g.getIncomingTreeEdges(Z.cell);
for(Z=0;Z<la.length;Z++)mxUtils.remove(la[Z],L)}}this.model.beginUpdate();try{var q=I.call(this,L,V);if(q.length==L.length)for(Y=0;Y<L.length;Y++)if(l(L[Y])){var F=g.getIncomingTreeEdges(q[Y]);la=g.getIncomingTreeEdges(L[Y]);if(0==F.length&&0<la.length){var T=this.cloneCell(la[0]);this.addEdge(T,g.getDefaultParent(),this.model.getTerminal(la[0],!0),q[Y])}}}finally{this.model.endUpdate()}return q};var D=g.moveCells;g.moveCells=function(L,V,R,Y,Z,la,q){var F=null;this.model.beginUpdate();try{var T=
-Z,ba=this.getCurrentCellStyle(Z);if(null!=L&&l(Z)&&"1"==mxUtils.getValue(ba,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||g.model.isEdge(L[U])&&null==g.model.getTerminal(L[U],!0)){Z=g.model.getParent(L[U]);break}if(null!=T&&Z!=T&&null!=this.view.getState(L[0])){var da=g.getIncomingTreeEdges(L[0]);if(0<da.length){var fa=g.view.getState(g.model.getTerminal(da[0],!0));if(null!=fa){var na=g.view.getState(T);null!=na&&(V=(na.getCenterX()-fa.getCenterX())/g.view.scale,R=(na.getCenterY()-fa.getCenterY())/
-g.view.scale)}}}}F=D.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(T)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],T,!0);else if(l(L[U])&&(da=g.getIncomingTreeEdges(L[U]),0<da.length))if(!Y)l(T)&&0>mxUtils.indexOf(L,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],T,!0);else if(0==g.getIncomingTreeEdges(F[U]).length){ba=T;if(null==ba||ba==g.model.getParent(L[U]))ba=g.model.getTerminal(da[0],
-!0);Y=this.cloneCell(da[0]);this.addEdge(Y,g.getDefaultParent(),ba,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var N=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,R,Y){var Z=g.model,la=null;Z.beginUpdate();try{if(la=N.apply(this,arguments),l(L))for(var q=0;q<la.length;q++)if(Z.isEdge(la[q])&&null==Z.getTerminal(la[q],!0)){Z.setTerminal(la[q],L,!0);var F=g.getCellGeometry(la[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{Z.endUpdate()}return la}}var G=
-{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ha=f.onKeyDown;f.onKeyDown=function(L){try{if(g.isEnabled()&&!g.isEditing()&&l(g.getSelectionCell())&&1==g.getSelectionCount()){var V=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?H(g.getSelectionCell()):K(g.getSelectionCell()):13==L.which&&(V=S(g.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
+Z,aa=this.getCurrentCellStyle(Z);if(null!=L&&l(Z)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(var U=0;U<L.length;U++)if(l(L[U])||g.model.isEdge(L[U])&&null==g.model.getTerminal(L[U],!0)){Z=g.model.getParent(L[U]);break}if(null!=T&&Z!=T&&null!=this.view.getState(L[0])){var da=g.getIncomingTreeEdges(L[0]);if(0<da.length){var fa=g.view.getState(g.model.getTerminal(da[0],!0));if(null!=fa){var na=g.view.getState(T);null!=na&&(V=(na.getCenterX()-fa.getCenterX())/g.view.scale,R=(na.getCenterY()-fa.getCenterY())/
+g.view.scale)}}}}F=D.apply(this,arguments);if(null!=F&&null!=L&&F.length==L.length)for(U=0;U<F.length;U++)if(this.model.isEdge(F[U]))l(T)&&0>mxUtils.indexOf(F,this.model.getTerminal(F[U],!0))&&this.model.setTerminal(F[U],T,!0);else if(l(L[U])&&(da=g.getIncomingTreeEdges(L[U]),0<da.length))if(!Y)l(T)&&0>mxUtils.indexOf(L,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],T,!0);else if(0==g.getIncomingTreeEdges(F[U]).length){aa=T;if(null==aa||aa==g.model.getParent(L[U]))aa=g.model.getTerminal(da[0],
+!0);Y=this.cloneCell(da[0]);this.addEdge(Y,g.getDefaultParent(),aa,F[U])}}finally{this.model.endUpdate()}return F};if(null!=f.sidebar){var N=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(L,V,R,Y){var Z=g.model,la=null;Z.beginUpdate();try{if(la=N.apply(this,arguments),l(L))for(var q=0;q<la.length;q++)if(Z.isEdge(la[q])&&null==Z.getTerminal(la[q],!0)){Z.setTerminal(la[q],L,!0);var F=g.getCellGeometry(la[q]);F.points=null;null!=F.getTerminalPoint(!0)&&F.setTerminalPoint(null,!0)}}finally{Z.endUpdate()}return la}}var G=
+{88:f.actions.get("selectChildren"),84:f.actions.get("selectSubtree"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ia=f.onKeyDown;f.onKeyDown=function(L){try{if(g.isEnabled()&&!g.isEditing()&&l(g.getSelectionCell())&&1==g.getSelectionCount()){var V=null;0<g.getIncomingTreeEdges(g.getSelectionCell()).length&&(9==L.which?V=mxEvent.isShiftDown(L)?H(g.getSelectionCell()):K(g.getSelectionCell()):13==L.which&&(V=S(g.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=V&&0<V.length)1==
V.length&&g.model.isEdge(V[0])?g.setSelectionCell(g.model.getTerminal(V[0],!1)):g.setSelectionCell(V[V.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(g.view.getState(g.getSelectionCell())),g.startEditingAtCell(g.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var R=G[L.keyCode];null!=R&&(R.funct(L),mxEvent.consume(L))}else 37==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(L)):39==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ha.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),ba=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return T==V||0==F.length?K(L,V):ba==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!B(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(B(this.state.cell)||l(this.state.cell))&&
+mxEvent.consume(L)):39==L.keyCode?(e(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(e(g.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(Y){f.handleError(Y)}mxEvent.isConsumed(L)||ia.apply(this,arguments)};var ka=g.connectVertex;g.connectVertex=function(L,V,R,Y,Z,la,q){var F=g.getIncomingTreeEdges(L);if(l(L)){var T=M(L),aa=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,U=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return T==V||0==F.length?K(L,V):aa==U?H(L):S(L,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return ka.apply(this,arguments)};g.getSubtree=function(L){var V=[L];!B(L)&&!l(L)||E(L)||g.traverse(L,!0,function(R,Y){var Z=null!=Y&&g.isTreeEdge(Y);Z&&0>mxUtils.indexOf(V,Y)&&V.push(Y);(null==Y||Z)&&0>mxUtils.indexOf(V,R)&&V.push(R);return null==Y||Z});return V};var ja=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ja.apply(this,arguments);(B(this.state.cell)||l(this.state.cell))&&
!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(L){this.graph.graphHandler.start(this.state.cell,
mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(L)})))};var ca=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ca.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var pa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){pa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var qa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){qa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var pa=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){pa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var ra=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(L,V){ra.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),B=this.graph;return l.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
E.vertex=!0;var M=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);p.insert(S);p.insert(E);p.insert(M);return sb.createVertexTemplateFromCells([p],p.geometry.width,
p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var M=new mxCell("Topic",
@@ -4000,87 +4002,83 @@ K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);return sb.createVertexTemplateFromCells([p,E],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;p.insertEdge(E,!1);var M=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");S.geometry.setTerminalPoint(new mxPoint(110,-40),!0);S.geometry.relative=
!0;S.edge=!0;M.insertEdge(S,!1);return sb.createVertexTemplateFromCells([E,S,p,M],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(g,u){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.formatWindow){u="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var C="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;y="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,y.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),u,C,240,y,
-function(I){g.createFormat(I).init()});g.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){g.formatWindow.window.fit()}));g.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else g.formatWindow.window.setVisible(null!=u?u:!g.formatWindow.window.isVisible())}else null==g.formatElt&&(g.formatElt=g.createSidebarContainer(),g.createFormat(g.formatElt).init(),g.formatElt.style.border="none",g.formatElt.style.width="240px",g.formatElt.style.borderLeft="1px solid gray",
-g.formatElt.style.right="0px"),y=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),y.style.right="0px"):(y.parentNode.appendChild(g.formatElt),y.style.right=g.formatElt.style.width)}function d(g,u){function y(N,G){var ha=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ha.funct.apply(this,arguments)}));N.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
-N.className="geTitle";u.appendChild(N);return N}var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";C.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";C.appendChild(I);mxUtils.write(C,mxResources.get("moreShapes"));u.appendChild(C);mxEvent.addListener(C,"click",function(){g.actions.get("shapes").funct()});
-var D=new Menubar(g,u);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?C.style.bottom="0":null!=g.actions.get("newLibrary")?(C=document.createElement("div"),C.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),C.appendChild(I),
-u.appendChild(C),mxEvent.addListener(C,"click",g.actions.get("newLibrary").funct),C=document.createElement("div"),C.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),C.appendChild(I),u.appendChild(C),mxEvent.addListener(C,
-"click",g.actions.get("openLibrary").funct)):(C=y("newLibrary",mxResources.get("newLibrary")),C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="0",C=y("openLibraryFrom",mxResources.get("openLibraryFrom")),C.style.borderLeft="1px solid lightgray",C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="50%");u.appendChild(g.sidebar.container);u.style.overflow="hidden"}
-function k(g,u){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){u=Math.min(y.container.clientWidth-10,218);var C="1"==urlParams.embedInline?650:Math.min(y.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(y.container.clientHeight-C)/2):56,u-6,C-6,function(I){d(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=u?u:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),d(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
-g.sidebarElt.style.borderRight="1px solid gray"),y=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),y.style.left="0px"):(y.parentNode.appendChild(g.sidebarElt),y.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Editor.checkmarkImage=
-Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
+EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.formatWindow){v="1"==urlParams.sketch?Math.max(10,g.diagramContainer.clientWidth-244):Math.max(10,g.diagramContainer.clientWidth-248);var C="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;y="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,y.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,C,240,y,
+function(I){g.createFormat(I).init()});g.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){g.formatWindow.window.fit()}));g.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else g.formatWindow.window.setVisible(null!=v?v:!g.formatWindow.window.isVisible())}else null==g.formatElt&&(g.formatElt=g.createSidebarContainer(),g.createFormat(g.formatElt).init(),g.formatElt.style.border="none",g.formatElt.style.width="240px",g.formatElt.style.borderLeft="1px solid gray",
+g.formatElt.style.right="0px"),y=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),y.style.right="0px"):(y.parentNode.appendChild(g.formatElt),y.style.right=g.formatElt.style.width)}function d(g,v){function y(N,G){var ia=g.menus.get(N);N=D.addMenu(G,mxUtils.bind(this,function(){ia.funct.apply(this,arguments)}));N.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";
+N.className="geTitle";v.appendChild(N);return N}var C=document.createElement("div");C.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";C.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";C.appendChild(I);mxUtils.write(C,mxResources.get("moreShapes"));v.appendChild(C);mxEvent.addListener(C,"click",function(){g.actions.get("shapes").funct()});
+var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?C.style.bottom="0":null!=g.actions.get("newLibrary")?(C=document.createElement("div"),C.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),C.appendChild(I),
+v.appendChild(C),mxEvent.addListener(C,"click",g.actions.get("newLibrary").funct),C=document.createElement("div"),C.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",C.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),C.appendChild(I),v.appendChild(C),mxEvent.addListener(C,
+"click",g.actions.get("openLibrary").funct)):(C=y("newLibrary",mxResources.get("newLibrary")),C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="0",C=y("openLibraryFrom",mxResources.get("openLibraryFrom")),C.style.borderLeft="1px solid lightgray",C.style.boxSizing="border-box",C.style.paddingRight="6px",C.style.paddingLeft="6px",C.style.height="32px",C.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
+function k(g,v){if(EditorUi.windowed){var y=g.editor.graph;y.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(y.container.clientWidth-10,218);var C="1"==urlParams.embedInline?650:Math.min(y.container.clientHeight-40,650);g.sidebarWindow=new WrapperWindow(g,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(y.container.clientHeight-C)/2):56,v-6,C-6,function(I){d(g,I)});g.sidebarWindow.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){g.sidebarWindow.window.fit()}));g.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);g.sidebarWindow.window.setVisible(!0);isLocalStorage&&g.getLocalData("sidebar",function(I){g.sidebar.showEntries(I,null,!0)});g.restoreLibraries()}else g.sidebarWindow.window.setVisible(null!=v?v:!g.sidebarWindow.window.isVisible())}else null==g.sidebarElt&&(g.sidebarElt=g.createSidebarContainer(),d(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
+g.sidebarElt.style.borderRight="1px solid gray"),y=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),y.style.left="0px"):(y.parentNode.appendChild(g.sidebarElt),y.style.left=g.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=null;else{var l=0;try{l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(g){}Menus.prototype.autoPopup=
+!1;Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;
mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR=
"#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor=
"#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.styleElt=document.createElement("style");Editor.styleElt.type="text/css";Editor.styleElt.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(Editor.styleElt);
Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var B=EditorUi.prototype.updateTabContainer;EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");B.apply(this,arguments)};var p=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){p.apply(this,arguments);this.menus.get("save").setEnabled(null!=
-this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,u){null!=u.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",u.shortcut):E.apply(this,arguments)};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var g=document.createElement("div");g.style.display="inline-block";g.style.position="relative";g.style.marginRight="4px";var u=document.createElement("a");
-u.className="geMenuItem gePrimaryBtn";u.style.marginLeft="8px";u.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var y="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(u,y);u.setAttribute("title",y);mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));g.appendChild(u)}}else mxUtils.write(u,mxResources.get("save")),u.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+
-"+S)"),mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),g.appendChild(u),"1"==urlParams.saveAndExit&&(u=document.createElement("a"),mxUtils.write(u,mxResources.get("saveAndExit")),u.setAttribute("title",mxResources.get("saveAndExit")),u.className="geMenuItem",u.style.marginLeft="6px",u.style.padding="6px",mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),g.appendChild(u));"1"!=urlParams.noExitBtn&&(u=
-document.createElement("a"),y="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(u,y),u.setAttribute("title",y),u.className="geMenuItem",u.style.marginLeft="6px",u.style.padding="6px",mxEvent.addListener(u,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),g.appendChild(u));"1"!=urlParams.sketch?(g.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top="0px";this.buttonContainer.appendChild(g);this.editor.fireEvent(new mxEventObject("statusChanged"))}};
-var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,u,y){var C=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?C.isEnabled()&&(g.addSeparator(),1==C.getSelectionCount()&&this.addMenuItems(g,["-","lockUnlock"],null,y)):1==C.getSelectionCount()?(C.isCellFoldable(C.getSelectionCell())&&this.addMenuItems(g,C.isCellCollapsed(u)?["expand"]:["collapse"],null,y),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,
-y),g.addSeparator(),this.addSubmenu("layout",g)):C.isSelectionEmpty()&&C.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,y),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,y)):C.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,y)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,u,y){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,
-["copyAsImage"],null,y)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};
-var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(g){K.apply(this,arguments);if(g){var u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=u&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=u||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};
-EditorUi.prototype.chromelessWindowResize=function(){};var Q=Menus.prototype.init;Menus.prototype.init=function(){Q.apply(this,arguments);var g=this.editorUi,u=g.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(G){g.setPagesVisible(!Editor.pagesVisible)}));u.setToggleAction(!0);u.setSelectedCallback(function(){return Editor.pagesVisible});g.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(g)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&
-!g.isOffline()&&g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var G=new ParseDialog(g,mxResources.get("plantUml")+"...","plantUml");g.showDialog(G.container,620,420,!0,!1);G.init()}));g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var G=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(G.container,620,420,!0,!1);G.init()}));var y=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,
-function(G,ha){var ka=this.editorUi.editor.graph,ja=ka.getSelectionCell();y.call(this,G,ja,null,ha);this.addMenuItems(G,["editTooltip"],ha);ka.model.isVertex(ja)&&this.addMenuItems(G,["editGeometry"],ha);this.addMenuItems(G,["-","edit"],ha)})));this.addPopupMenuCellEditItems=function(G,ha,ka,ja){G.addSeparator();this.addSubmenu("editCell",G,ja,mxResources.get("edit"))};var C=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(G,ha){C.funct(G,ha);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-g.menus.addMenuItems(G,["publishLink"],ha);g.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(G.addSeparator(ha),g.menus.addSubmenu("embed",G,ha))})));var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(G,ha){I.funct(G,ha);this.addMenuItems(G,["-","ruler","-","pageScale"],ha)})));var D="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),N=function(G,ha,ka,ja){G.addItem(ka,null,mxUtils.bind(this,function(){var ca=new CreateGraphDialog(g,
-ka,ja);g.showDialog(ca.container,620,420,!0,!1);ca.init()}),ha)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(G,ha){for(var ka=0;ka<D.length;ka++)"-"==D[ka]?G.addSeparator(ha):N(G,ha,mxResources.get(D[ka])+"...",D[ka])})))};EditorUi.prototype.installFormatToolbar=function(g){var u=this.editor.graph,y=document.createElement("div");y.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
-u.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,I){0<u.getSelectionCount()?(g.appendChild(y),y.innerHTML="Selected: "+u.getSelectionCount()):null!=y.parentNode&&y.parentNode.removeChild(y)}))};var e=!1;EditorUi.prototype.initFormatWindow=function(){if(!e&&null!=this.formatWindow){e=!0;var g=this.formatWindow.window.toggleMinimized,u=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(u=parseInt(this.div.style.width),this.div.style.width=
-"140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+u-140+"px"):(this.div.style.width=u+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-u+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function g(W,ea,ta){var ra=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ra.funct.apply(this,arguments)}),ha);va.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";va.style.display="inline-block";va.style.boxSizing="border-box";va.style.top="6px";va.style.marginRight="6px";va.style.height="30px";va.style.paddingTop="6px";va.style.paddingBottom="6px";va.style.cursor="pointer";va.setAttribute("title",mxResources.get(W));D.menus.menuCreated(ra,va,
-"geMenuItem");null!=ta?(va.style.backgroundImage="url("+ta+")",va.style.backgroundPosition="center center",va.style.backgroundRepeat="no-repeat",va.style.backgroundSize="24px 24px",va.style.width="34px",va.innerText=""):ea||(va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.backgroundPosition="right 6px center",va.style.backgroundRepeat="no-repeat",va.style.paddingRight="22px");return va}function u(W,ea,ta,ra,va,Ca){var Ea=document.createElement("a");Ea.className="1"==
-urlParams.sketch?"geToolbarButton":"geMenuItem";Ea.style.display="inline-block";Ea.style.boxSizing="border-box";Ea.style.height="30px";Ea.style.padding="6px";Ea.style.position="relative";Ea.style.verticalAlign="top";Ea.style.top="0px";"1"==urlParams.sketch&&(Ea.style.borderStyle="none",Ea.style.boxShadow="none",Ea.style.padding="6px",Ea.style.margin="0px");null!=D.statusContainer?G.insertBefore(Ea,D.statusContainer):G.appendChild(Ea);null!=Ca?(Ea.style.backgroundImage="url("+Ca+")",Ea.style.backgroundPosition=
-"center center",Ea.style.backgroundRepeat="no-repeat",Ea.style.backgroundSize="24px 24px",Ea.style.width="34px"):mxUtils.write(Ea,W);mxEvent.addListener(Ea,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Na){Na.preventDefault()}));mxEvent.addListener(Ea,"click",function(Na){"disabled"!=Ea.getAttribute("disabled")&&ea(Na);mxEvent.consume(Na)});null==ta&&(Ea.style.marginRight="4px");null!=ra&&Ea.setAttribute("title",ra);null!=va&&(W=function(){va.isEnabled()?(Ea.removeAttribute("disabled"),
-Ea.style.cursor="pointer"):(Ea.setAttribute("disabled","disabled"),Ea.style.cursor="default")},va.addListener("stateChanged",W),N.addListener("enabledChanged",W),W());return Ea}function y(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var ra=
-0;ra<W.length;ra++)null!=W[ra]&&("1"==urlParams.sketch&&(W[ra].style.padding="10px 8px",W[ra].style.width="30px"),W[ra].style.margin="0px",W[ra].style.boxShadow="none",ta.appendChild(W[ra]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function C(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=
-W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ha=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);y([ta,u(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),u(mxResources.get("format"),
-D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",!0,W?L:null);y([ea,u(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(y([oa,Aa],60),520<=l&&y([ab,640<=l?u("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?u("",
-sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(ra){(mxEvent.isShiftDown(ra)||mxEvent.isAltDown(ra)||mxEvent.isMetaDown(ra)||mxEvent.isControlDown(ra)||mxEvent.isPopupTrigger(ra))&&D.appIconClicked(ra)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?
-(null==x&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition="center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),x=ea),D.buttonContainer.style.paddingRight="34px"):
-(D.buttonContainer.style.paddingRight="0px",null!=x&&(x.parentNode.removeChild(x),x=null))}f.apply(this,arguments);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";I.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||
-8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var D=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||
-null==D.embedViewport)mxUtils.fit(this.div);else{var W=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),ta=D.embedViewport.x+D.embedViewport.width,ra=parseInt(this.div.offsetTop),va=parseInt(this.div.offsetHeight),Ca=D.embedViewport.y+D.embedViewport.height;this.div.style.left=Math.max(D.embedViewport.x,Math.min(W,ta-ea))+"px";this.div.style.top=Math.max(D.embedViewport.y,Math.min(ra,Ca-va))+"px";this.div.style.height=Math.min(D.embedViewport.height,parseInt(this.div.style.height))+
-"px";this.div.style.width=Math.min(D.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>l||708>I)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));D=this;var N=
-D.editor.graph;D.toolbar=this.createToolbar(D.createDiv("geToolbar"));D.defaultLibraryName=mxResources.get("untitledLibrary");var G=document.createElement("div");G.className="geMenubarContainer";var ha=null,ka=new Menubar(D,G);D.statusContainer=D.createStatusContainer();D.statusContainer.style.position="relative";D.statusContainer.style.maxWidth="";D.statusContainer.style.color="gray";D.statusContainer.style.cursor="default";var ja=D.hideCurrentMenu;D.hideCurrentMenu=function(){ja.apply(this,arguments);
-this.editor.graph.popupMenuHandler.hideMenu()};var ca=D.descriptorChanged;D.descriptorChanged=function(){ca.apply(this,arguments);var W=D.getCurrentFile();if(null!=W&&null!=W.getTitle()){var ea=W.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);G.setAttribute("title",W.getTitle()+(null!=ea?" ("+ea+")":""))}else G.removeAttribute("title")};D.setStatusText(D.editor.getStatus());G.appendChild(D.statusContainer);
-D.buttonContainer=document.createElement("div");D.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";G.appendChild(D.buttonContainer);D.menubarContainer=D.buttonContainer;D.tabContainer=document.createElement("div");D.tabContainer.className="geTabContainer";D.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";
-I=D.diagramContainer.parentNode;var pa=document.createElement("div");pa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";D.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){pa.style.top="20px";D.titlebar=document.createElement("div");D.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var qa=document.createElement("div");
-qa.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";D.titlebar.appendChild(qa);I.appendChild(D.titlebar)}var L="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null,Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Y.style.left=
-"10px",Y.style.top="10px",R.style.left="10px",R.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",D.diagramContainer.setAttribute("data-bounds",D.diagramContainer.style.top+" "+D.diagramContainer.style.left+" "+D.diagramContainer.style.width+" "+D.diagramContainer.style.height),D.diagramContainer.style.top="0px",D.diagramContainer.style.left="0px",D.diagramContainer.style.bottom="0px",D.diagramContainer.style.right="0px",D.diagramContainer.style.width="",D.diagramContainer.style.height=
-"";else{var W=D.diagramContainer.getAttribute("data-bounds");if(null!=W){D.diagramContainer.style.background="transparent";D.diagramContainer.removeAttribute("data-bounds");var ea=N.getGraphBounds();W=W.split(" ");D.diagramContainer.style.top=W[0];D.diagramContainer.style.left=W[1];D.diagramContainer.style.width=ea.width+50+"px";D.diagramContainer.style.height=ea.height+46+"px";D.diagramContainer.style.bottom="";D.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:D.diagramContainer.getBoundingClientRect()}),"*");D.refresh()}Y.style.left=D.diagramContainer.offsetLeft+"px";Y.style.top=D.diagramContainer.offsetTop-Y.offsetHeight-4+"px";R.style.display="";R.style.left=D.diagramContainer.offsetLeft-R.offsetWidth-4+"px";R.style.top=D.diagramContainer.offsetTop+"px";V.style.left=D.diagramContainer.offsetLeft+D.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=Y.style.top;V.style.right="";D.bottomResizer.style.left=D.diagramContainer.offsetLeft+(D.diagramContainer.offsetWidth-
-D.bottomResizer.offsetWidth)/2+"px";D.bottomResizer.style.top=D.diagramContainer.offsetTop+D.diagramContainer.offsetHeight-D.bottomResizer.offsetHeight/2-1+"px";D.rightResizer.style.left=D.diagramContainer.offsetLeft+D.diagramContainer.offsetWidth-D.rightResizer.offsetWidth/2-1+"px";D.rightResizer.style.top=D.diagramContainer.offsetTop+(D.diagramContainer.offsetHeight-D.bottomResizer.offsetHeight)/2+"px"}D.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";D.rightResizer.style.visibility=
-D.bottomResizer.style.visibility;G.style.display="none";Y.style.visibility="";V.style.visibility=""});qa=D.actions.get("fullscreen");var la=u("",qa.funct,null,mxResources.get(""),qa,Editor.fullscreenImage),q=mxUtils.bind(this,function(){la.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});qa=mxUtils.bind(this,function(){b(D,
-!0);D.initFormatWindow();var W=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(W.x+W.width+4,W.y);q()});D.addListener("inlineFullscreenChanged",q);D.addListener("editInlineStart",qa);"1"==urlParams.embedInline&&D.addListener("darkModeChanged",qa);D.addListener("editInlineStop",mxUtils.bind(this,function(W){D.diagramContainer.style.width="10px";D.diagramContainer.style.height="10px";D.diagramContainer.style.border="";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility=
-"hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}));if(null!=D.hoverIcons){var F=D.hoverIcons.update;D.hoverIcons.update=function(){N.freehand.isDrawing()||F.apply(this,arguments)}}if(null!=N.freehand){var T=N.freehand.createStyle;N.freehand.createStyle=function(W){return T.apply(this,arguments)+"sketch=0;"}}D.editor.addListener("statusChanged",mxUtils.bind(this,function(){D.setStatusText(D.editor.getStatus())}));D.setStatusText(D.editor.getStatus());if("1"==
-urlParams.sketch){R.className="geToolbarContainer";V.className="geToolbarContainer";Y.className="geToolbarContainer";G.className="geToolbarContainer";D.picker=R;D.sketchPickerMenuElt=R;"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&D.installStatusMinimizer();wa=g("diagram",null,Editor.menuImage);wa.style.boxShadow="none";wa.style.padding="6px";wa.style.margin="0px";Y.appendChild(wa);mxEvent.disableContextMenu(wa);mxEvent.addGestureListeners(wa,mxUtils.bind(this,function(W){(mxEvent.isShiftDown(W)||
-mxEvent.isAltDown(W)||mxEvent.isMetaDown(W)||mxEvent.isControlDown(W)||mxEvent.isPopupTrigger(W))&&this.appIconClicked(W)}),null,null);D.statusContainer.style.position="";D.statusContainer.style.display="none";D.statusContainer.style.margin="0px";D.statusContainer.style.padding="6px 0px";D.statusContainer.style.maxWidth=Math.min(l-240,280)+"px";D.statusContainer.style.display="inline-block";D.statusContainer.style.textOverflow="ellipsis";"1"==urlParams.embed&&(this.statusContainer.style.marginTop=
-"-2px",this.statusContainer.style.marginRight="8px");D.buttonContainer.style.display="inline-block";D.buttonContainer.style.position="relative";D.buttonContainer.style.paddingRight="0px";D.buttonContainer.style.top="0px";var ba=document.createElement("a");ba.style.padding="0px";ba.style.boxShadow="none";ba.className="geMenuItem";ba.style.display="inline-block";ba.style.width="40px";ba.style.height="12px";ba.style.marginBottom="-2px";ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
-")";ba.style.backgroundPosition="top center";ba.style.backgroundRepeat="no-repeat";ba.setAttribute("title","Minimize");var U=!1,da=mxUtils.bind(this,function(){R.innerText="";if(!U){var W=function(ea,ta,ra,va){null!=ta&&ea.setAttribute("title",ta);ea.style.cursor=null!=ra?ra:"default";ea.style.margin="2px 0px";R.appendChild(ea);mxUtils.br(R);null!=va&&(ea.style.position="relative",ea.style.overflow="visible",ta=document.createElement("div"),ta.style.position="absolute",ta.style.left="34px",ta.style.top=
-"28px",ta.style.fontSize="8px",mxUtils.write(ta,va),ea.appendChild(ta));return ea};W(D.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,!0),mxResources.get("text")+" (A)",null,"A");W(D.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");W(D.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");W(D.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,N.defaultEdgeLength,
-0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,0),!1);ea.geometry.points=[];ea.geometry.relative=!0;ea.edge=!0;W(D.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";
-ea.geometry.width=N.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,20),!1);W(D.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,ta,ra,va){ea=u("",ea.funct,null,ta,ea,ra);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return W(ea,null,"pointer",va)})(D.actions.get("insertFreehand"),mxResources.get("freehand")+
-" (X)",Editor.freehandImage,"X");wa=g("insert",null,Editor.plusImage);wa.style.boxShadow="none";wa.style.opacity="0.7";wa.style.padding="6px";wa.style.margin="0px";wa.style.height="34px";wa.style.width="37px";W(wa,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(ba)});mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){U?(mxUtils.setPrefixedStyle(R.style,"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",ba.style.backgroundImage=
-"url("+mxWindow.prototype.normalizeImage+")",ba.style.width="40px",ba.style.height="12px",ba.setAttribute("title","Minimize"),U=!1,da()):(R.innerText="",R.appendChild(ba),mxUtils.setPrefixedStyle(R.style,"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",ba.style.height="24px",ba.style.backgroundImage="url("+Editor.plusImage+")",ba.setAttribute("title",mxResources.get("insert")),ba.style.width="24px",U=!0)}));da();D.addListener("darkModeChanged",
-da);D.addListener("sketchModeChanged",da)}qa=D.menus.get("viewZoom");if(null!=qa){var fa=function(W){if(mxEvent.isAltDown(W))D.hideCurrentMenu(),D.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geItem"!=mxEvent.getSource(W).className||mxEvent.isShiftDown(W))D.hideCurrentMenu(),D.actions.get("smartFit").funct(),mxEvent.consume(W)},na=D.actions.get("zoomIn"),sa=D.actions.get("zoomOut"),za=D.actions.get("resetView"),ua=D.actions.get("undo"),Ba=D.actions.get("redo"),oa=u("",ua.funct,null,
-mxResources.get("undo")+" ("+ua.shortcut+")",ua,Editor.undoImage),Aa=u("",Ba.funct,null,mxResources.get("redo")+" ("+Ba.shortcut+")",Ba,Editor.redoImage);if(null!=V){za=function(){Ia.style.display=null!=D.pages&&("0"!=urlParams.pages||1<D.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ya=function(){Ia.innerText="";if(null!=D.currentPage){mxUtils.write(Ia,D.currentPage.getName());var W=null!=D.pages?D.pages.length:1,ea=D.getPageIndex(D.currentPage);ea=null!=ea?ea+1:1;var ta=D.currentPage.getId();
-Ia.setAttribute("title",D.currentPage.getName()+" ("+ea+"/"+W+")"+(null!=ta?" ["+ta+"]":""))}},La=D.actions.get("delete"),Oa=u("",La.funct,null,mxResources.get("delete"),La,Editor.trashImage);Oa.style.opacity="0.3";Y.appendChild(Oa);La.addListener("stateChanged",function(){Oa.style.opacity=La.enabled?"":"0.3"});var Ma=function(){oa.style.display=0<D.editor.undoManager.history.length||N.isEditing()?"inline-block":"none";Aa.style.display=oa.style.display;oa.style.opacity=ua.enabled?"":"0.3";Aa.style.opacity=
-Ba.enabled?"":"0.3"};Y.appendChild(oa);Y.appendChild(Aa);ua.addListener("stateChanged",Ma);Ba.addListener("stateChanged",Ma);Ma();var Ia=this.createPageMenuTab(!1,!0);Ia.style.cssText="display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";V.appendChild(Ia);D.editor.addListener("pagesPatched",ya);D.editor.addListener("pageSelected",ya);D.editor.addListener("pageRenamed",ya);D.editor.addListener("fileLoaded",ya);ya();D.addListener("fileDescriptorChanged",
-za);D.addListener("pagesVisibleChanged",za);D.editor.addListener("pagesPatched",za);za();za=u("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",sa,Editor.zoomOutImage);V.appendChild(za);var wa=ka.addMenu("100%",qa.funct);wa.setAttribute("title",mxResources.get("zoom"));wa.innerHTML="100%";wa.style.display="inline-block";wa.style.color="inherit";wa.style.cursor="pointer";wa.style.textAlign="center";wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration=
-"none";wa.style.verticalAlign="top";wa.style.padding="6px 0";wa.style.fontSize="14px";wa.style.width="40px";V.appendChild(wa);qa=u("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",na,Editor.zoomInImage);V.appendChild(qa);"1"==urlParams.embedInline?(V.appendChild(la),qa=D.actions.get("exit"),V.appendChild(u("",qa.funct,null,mxResources.get("exit"),qa,Editor.closeImage))):la.parentNode.removeChild(la);D.tabContainer.style.visibility="hidden";G.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+this.getCurrentFile()||"1"==urlParams.embed)};var E=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(g,v){null!=v.shortcut&&900>l&&!mxClient.IS_IOS?g.firstChild.nextSibling.setAttribute("title",v.shortcut):E.apply(this,arguments)};var M=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(g,v,y){var C=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?C.isEnabled()&&(g.addSeparator(),1==C.getSelectionCount()&&this.addMenuItems(g,
+["-","lockUnlock"],null,y)):1==C.getSelectionCount()?(C.isCellFoldable(C.getSelectionCell())&&this.addMenuItems(g,C.isCellCollapsed(v)?["expand"]:["collapse"],null,y),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,y),g.addSeparator(),this.addSubmenu("layout",g)):C.isSelectionEmpty()&&C.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,y),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,y)):
+C.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,y)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,y){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,y)};EditorUi.prototype.toggleFormatPanel=function(g){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=g?g:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=
+this.formatWindow&&this.formatWindow.window.isVisible()};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var H=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();H.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(g){K.apply(this,arguments);if(g){var v=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=v&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&
+this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=v||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var Q=Menus.prototype.init;Menus.prototype.init=function(){Q.apply(this,arguments);var g=this.editorUi,v=g.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),
+function(D){g.setPagesVisible(!Editor.pagesVisible)}));v.setToggleAction(!0);v.setSelectedCallback(function(){return Editor.pagesVisible});g.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){k(g)},null,null,Editor.ctrlKey+"+Shift+K"));EditorUi.enablePlantUml&&!g.isOffline()&&g.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var D=new ParseDialog(g,mxResources.get("plantUml")+"...","plantUml");g.showDialog(D.container,620,420,!0,!1);D.init()}));
+g.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var D=new ParseDialog(g,mxResources.get("mermaid")+"...","mermaid");g.showDialog(D.container,620,420,!0,!1);D.init()}));var y=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();y.call(this,D,ia,null,N);this.addMenuItems(D,["editTooltip"],N);G.model.isVertex(ia)&&this.addMenuItems(D,["editGeometry"],N);this.addMenuItems(D,["-",
+"edit"],N)})));this.addPopupMenuCellEditItems=function(D,N,G,ia){D.addSeparator();this.addSubmenu("editCell",D,ia,mxResources.get("edit"))};var C="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),I=function(D,N,G,ia){D.addItem(G,null,mxUtils.bind(this,function(){var ka=new CreateGraphDialog(g,G,ia);g.showDialog(ka.container,620,420,!0,!1);ka.init()}),N)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(D,N){for(var G=0;G<C.length;G++)"-"==
+C[G]?D.addSeparator(N):I(D,N,mxResources.get(C[G])+"...",C[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,y=document.createElement("div");y.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";v.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,I){0<v.getSelectionCount()?(g.appendChild(y),y.innerHTML=
+"Selected: "+v.getSelectionCount()):null!=y.parentNode&&y.parentNode.removeChild(y)}))};var e=!1;EditorUi.prototype.initFormatWindow=function(){if(!e&&null!=this.formatWindow){e=!0;var g=this.formatWindow.window.toggleMinimized,v=240;this.formatWindow.window.toggleMinimized=function(){g.apply(this,arguments);this.minimized?(v=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.width=
+v+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-v+140)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(y){mxEvent.getSource(y)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){function g(W,ea,ta){var qa=D.menus.get(W),va=ka.addMenu(mxResources.get(W),mxUtils.bind(this,function(){qa.funct.apply(this,
+arguments)}),ia);va.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";va.style.display="inline-block";va.style.boxSizing="border-box";va.style.top="6px";va.style.marginRight="6px";va.style.height="30px";va.style.paddingTop="6px";va.style.paddingBottom="6px";va.style.cursor="pointer";va.setAttribute("title",mxResources.get(W));D.menus.menuCreated(qa,va,"geMenuItem");null!=ta?(va.style.backgroundImage="url("+ta+")",va.style.backgroundPosition="center center",va.style.backgroundRepeat="no-repeat",
+va.style.backgroundSize="24px 24px",va.style.width="34px",va.innerText=""):ea||(va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.backgroundPosition="right 6px center",va.style.backgroundRepeat="no-repeat",va.style.paddingRight="22px");return va}function v(W,ea,ta,qa,va,Ea){var Ca=document.createElement("a");Ca.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ca.style.display="inline-block";Ca.style.boxSizing="border-box";Ca.style.height="30px";Ca.style.padding=
+"6px";Ca.style.position="relative";Ca.style.verticalAlign="top";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.borderStyle="none",Ca.style.boxShadow="none",Ca.style.padding="6px",Ca.style.margin="0px");null!=D.statusContainer?G.insertBefore(Ca,D.statusContainer):G.appendChild(Ca);null!=Ea?(Ca.style.backgroundImage="url("+Ea+")",Ca.style.backgroundPosition="center center",Ca.style.backgroundRepeat="no-repeat",Ca.style.backgroundSize="24px 24px",Ca.style.width="34px"):mxUtils.write(Ca,W);mxEvent.addListener(Ca,
+mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ma){Ma.preventDefault()}));mxEvent.addListener(Ca,"click",function(Ma){"disabled"!=Ca.getAttribute("disabled")&&ea(Ma);mxEvent.consume(Ma)});null==ta&&(Ca.style.marginRight="4px");null!=qa&&Ca.setAttribute("title",qa);null!=va&&(W=function(){va.isEnabled()?(Ca.removeAttribute("disabled"),Ca.style.cursor="pointer"):(Ca.setAttribute("disabled","disabled"),Ca.style.cursor="default")},va.addListener("stateChanged",W),N.addListener("enabledChanged",
+W),W());return Ca}function y(W,ea,ta){ta=document.createElement("div");ta.className="geMenuItem";ta.style.display="inline-block";ta.style.verticalAlign="top";ta.style.marginRight="6px";ta.style.padding="0 4px 0 4px";ta.style.height="30px";ta.style.position="relative";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.boxShadow="none");for(var qa=0;qa<W.length;qa++)null!=W[qa]&&("1"==urlParams.sketch&&(W[qa].style.padding="10px 8px",W[qa].style.width="30px"),W[qa].style.margin="0px",W[qa].style.boxShadow=
+"none",ta.appendChild(W[qa]));null!=ea&&mxUtils.setOpacity(ta,ea);null!=D.statusContainer&&"1"!=urlParams.sketch?G.insertBefore(ta,D.statusContainer):G.appendChild(ta);return ta}function C(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Y.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var W=G.firstChild;null!=W;){var ea=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=ea}ia=G.firstChild;l=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;W=1E3>l||"1"==urlParams.sketch;var ta=null;W||(ta=g("diagram"));ea=W?g("diagram",null,Editor.menuImage):null;null!=ea&&(ta=ea);y([ta,v(mxResources.get("shapes"),D.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),D.actions.get("image"),W?Editor.shapesImage:null),v(mxResources.get("format"),D.actions.get("format").funct,null,mxResources.get("format")+" ("+D.actions.get("format").shortcut+")",D.actions.get("image"),W?Editor.formatImage:null)],W?60:null);ea=g("insert",
+!0,W?L:null);y([ea,v(mxResources.get("delete"),D.actions.get("delete").funct,null,mxResources.get("delete"),D.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);411<=l&&(y([oa,Aa],60),520<=l&&y([ab,640<=l?v("",na.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",na,Editor.zoomInImage):null,640<=l?v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ta&&(mxEvent.disableContextMenu(ta),mxEvent.addGestureListeners(ta,mxUtils.bind(this,
+function(qa){(mxEvent.isShiftDown(qa)||mxEvent.isAltDown(qa)||mxEvent.isMetaDown(qa)||mxEvent.isControlDown(qa)||mxEvent.isPopupTrigger(qa))&&D.appIconClicked(qa)}),null,null));ea=D.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=l&&"1"!=urlParams.embed&&"1"!=urlParams.sketch?(null==x&&(ea=ka.addMenu("",ea.funct),ea.setAttribute("title","language"),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
+"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="22px 22px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="12px",G.appendChild(ea),x=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=x&&(x.parentNode.removeChild(x),x=null))}f.apply(this,arguments);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+I.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=l||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var D=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==D.embedViewport)mxUtils.fit(this.div);else{var W=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),ta=D.embedViewport.x+D.embedViewport.width,qa=parseInt(this.div.offsetTop),va=parseInt(this.div.offsetHeight),Ea=D.embedViewport.y+
+D.embedViewport.height;this.div.style.left=Math.max(D.embedViewport.x,Math.min(W,ta-ea))+"px";this.div.style.top=Math.max(D.embedViewport.y,Math.min(qa,Ea-va))+"px";this.div.style.height=Math.min(D.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(D.embedViewport.width,parseInt(this.div.style.width))+"px"}};EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>l||708>I)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));D=this;var N=D.editor.graph;D.toolbar=this.createToolbar(D.createDiv("geToolbar"));D.defaultLibraryName=mxResources.get("untitledLibrary");var G=document.createElement("div");G.className="geMenubarContainer";var ia=null,ka=new Menubar(D,G);D.statusContainer=D.createStatusContainer();
+D.statusContainer.style.position="relative";D.statusContainer.style.maxWidth="";D.statusContainer.style.color="gray";D.statusContainer.style.cursor="default";var ja=D.hideCurrentMenu;D.hideCurrentMenu=function(){ja.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=D.descriptorChanged;D.descriptorChanged=function(){ca.apply(this,arguments);var W=D.getCurrentFile();if(null!=W&&null!=W.getTitle()){var ea=W.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==
+ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);G.setAttribute("title",W.getTitle()+(null!=ea?" ("+ea+")":""))}else G.removeAttribute("title")};D.setStatusText(D.editor.getStatus());G.appendChild(D.statusContainer);D.buttonContainer=document.createElement("div");D.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";G.appendChild(D.buttonContainer);D.menubarContainer=D.buttonContainer;
+D.tabContainer=document.createElement("div");D.tabContainer.className="geTabContainer";D.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=D.diagramContainer.parentNode;var pa=document.createElement("div");pa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";D.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){pa.style.top=
+"20px";D.titlebar=document.createElement("div");D.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var ra=document.createElement("div");ra.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";D.titlebar.appendChild(ra);I.appendChild(D.titlebar)}var L="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,
+V="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,Y="1"==urlParams.sketch?document.createElement("div"):null,Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Y.style.left="10px",Y.style.top="10px",R.style.left="10px",R.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",D.diagramContainer.setAttribute("data-bounds",D.diagramContainer.style.top+" "+D.diagramContainer.style.left+" "+D.diagramContainer.style.width+
+" "+D.diagramContainer.style.height),D.diagramContainer.style.top="0px",D.diagramContainer.style.left="0px",D.diagramContainer.style.bottom="0px",D.diagramContainer.style.right="0px",D.diagramContainer.style.width="",D.diagramContainer.style.height="";else{var W=D.diagramContainer.getAttribute("data-bounds");if(null!=W){D.diagramContainer.style.background="transparent";D.diagramContainer.removeAttribute("data-bounds");var ea=N.getGraphBounds();W=W.split(" ");D.diagramContainer.style.top=W[0];D.diagramContainer.style.left=
+W[1];D.diagramContainer.style.width=ea.width+50+"px";D.diagramContainer.style.height=ea.height+46+"px";D.diagramContainer.style.bottom="";D.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:D.diagramContainer.getBoundingClientRect()}),"*");D.refresh()}Y.style.left=D.diagramContainer.offsetLeft+"px";Y.style.top=D.diagramContainer.offsetTop-Y.offsetHeight-4+"px";R.style.display="";R.style.left=D.diagramContainer.offsetLeft-R.offsetWidth-4+
+"px";R.style.top=D.diagramContainer.offsetTop+"px";V.style.left=D.diagramContainer.offsetLeft+D.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=Y.style.top;V.style.right="";D.bottomResizer.style.left=D.diagramContainer.offsetLeft+(D.diagramContainer.offsetWidth-D.bottomResizer.offsetWidth)/2+"px";D.bottomResizer.style.top=D.diagramContainer.offsetTop+D.diagramContainer.offsetHeight-D.bottomResizer.offsetHeight/2-1+"px";D.rightResizer.style.left=D.diagramContainer.offsetLeft+D.diagramContainer.offsetWidth-
+D.rightResizer.offsetWidth/2-1+"px";D.rightResizer.style.top=D.diagramContainer.offsetTop+(D.diagramContainer.offsetHeight-D.bottomResizer.offsetHeight)/2+"px"}D.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";D.rightResizer.style.visibility=D.bottomResizer.style.visibility;G.style.display="none";Y.style.visibility="";V.style.visibility=""});ra=D.actions.get("fullscreen");var la=v("",ra.funct,null,mxResources.get(""),ra,Editor.fullscreenImage),q=mxUtils.bind(this,function(){la.style.backgroundImage=
+"url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});ra=mxUtils.bind(this,function(){b(D,!0);D.initFormatWindow();var W=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(W.x+W.width+4,W.y);q()});D.addListener("inlineFullscreenChanged",q);D.addListener("editInlineStart",ra);"1"==urlParams.embedInline&&D.addListener("darkModeChanged",
+ra);D.addListener("editInlineStop",mxUtils.bind(this,function(W){D.diagramContainer.style.width="10px";D.diagramContainer.style.height="10px";D.diagramContainer.style.border="";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}));if(null!=D.hoverIcons){var F=D.hoverIcons.update;D.hoverIcons.update=function(){N.freehand.isDrawing()||F.apply(this,arguments)}}if(null!=N.freehand){var T=N.freehand.createStyle;
+N.freehand.createStyle=function(W){return T.apply(this,arguments)+"sketch=0;"}}D.editor.addListener("statusChanged",mxUtils.bind(this,function(){D.setStatusText(D.editor.getStatus())}));D.setStatusText(D.editor.getStatus());if("1"==urlParams.sketch){R.className="geToolbarContainer";V.className="geToolbarContainer";Y.className="geToolbarContainer";G.className="geToolbarContainer";D.picker=R;D.sketchPickerMenuElt=R;"1"!=urlParams.embed&&"atlassian"!=this.getServiceName()&&D.installStatusMinimizer();
+wa=g("diagram",null,Editor.menuImage);wa.style.boxShadow="none";wa.style.padding="6px";wa.style.margin="0px";Y.appendChild(wa);mxEvent.disableContextMenu(wa);mxEvent.addGestureListeners(wa,mxUtils.bind(this,function(W){(mxEvent.isShiftDown(W)||mxEvent.isAltDown(W)||mxEvent.isMetaDown(W)||mxEvent.isControlDown(W)||mxEvent.isPopupTrigger(W))&&this.appIconClicked(W)}),null,null);D.statusContainer.style.position="";D.statusContainer.style.display="none";D.statusContainer.style.margin="0px";D.statusContainer.style.padding=
+"6px 0px";D.statusContainer.style.maxWidth=Math.min(l-240,280)+"px";D.statusContainer.style.display="inline-block";D.statusContainer.style.textOverflow="ellipsis";"1"==urlParams.embed&&(this.statusContainer.style.marginTop="-2px",this.statusContainer.style.marginRight="8px");D.buttonContainer.style.display="inline-block";D.buttonContainer.style.position="relative";D.buttonContainer.style.paddingRight="0px";D.buttonContainer.style.top="0px";var aa=document.createElement("a");aa.style.padding="0px";
+aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var U=!1,da=mxUtils.bind(this,function(){R.innerText="";if(!U){var W=function(ea,ta,qa,va){null!=ta&&ea.setAttribute("title",ta);ea.style.cursor=null!=qa?qa:"default";
+ea.style.margin="2px 0px";R.appendChild(ea);mxUtils.br(R);null!=va&&(ea.style.position="relative",ea.style.overflow="visible",ta=document.createElement("div"),ta.style.position="absolute",ta.style.left="34px",ta.style.top="28px",ta.style.fontSize="8px",mxUtils.write(ta,va),ea.appendChild(ta));return ea};W(D.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text")+" (A)",!0,!1,null,!0,
+!0),mxResources.get("text")+" (A)",null,"A");W(D.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note")+" (S)",!0,!1,null,!0),mxResources.get("note")+" (S)",null,"S");W(D.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle")+
+" (D)",!0,!1,null,!0),mxResources.get("rectangle")+" (D)",null,"D");W(D.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse")+" (F)",!0,!1,null,!0),mxResources.get("ellipse")+" (F)",null,"F");(function(){var ea=new mxCell("",new mxGeometry(0,0,N.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ea.geometry.setTerminalPoint(new mxPoint(0,0),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,0),!1);ea.geometry.points=
+[];ea.geometry.relative=!0;ea.edge=!0;W(D.sidebar.createEdgeTemplateFromCells([ea],ea.geometry.width,ea.geometry.height,mxResources.get("line")+" (C)",!0,null,!0,!1),mxResources.get("line")+" (C)",null,"C");ea=ea.clone();ea.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ea.geometry.width=N.defaultEdgeLength+20;ea.geometry.setTerminalPoint(new mxPoint(0,20),!0);ea.geometry.setTerminalPoint(new mxPoint(ea.geometry.width,20),!1);W(D.sidebar.createEdgeTemplateFromCells([ea],
+ea.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"))})();(function(ea,ta,qa,va){ea=v("",ea.funct,null,ta,ea,qa);ea.style.width="40px";ea.style.height="34px";ea.style.opacity="0.7";return W(ea,null,"pointer",va)})(D.actions.get("insertFreehand"),mxResources.get("freehand")+" (X)",Editor.freehandImage,"X");wa=g("insert",null,Editor.plusImage);wa.style.boxShadow="none";wa.style.opacity="0.7";wa.style.padding="6px";wa.style.margin="0px";wa.style.height="34px";wa.style.width=
+"37px";W(wa,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){U?(mxUtils.setPrefixedStyle(R.style,"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),U=!1,da()):(R.innerText="",R.appendChild(aa),mxUtils.setPrefixedStyle(R.style,
+"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",aa.style.height="24px",aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",U=!0)}));da();D.addListener("darkModeChanged",da);D.addListener("sketchModeChanged",da)}ra=D.menus.get("viewZoom");if(null!=ra){var fa=function(W){if(mxEvent.isAltDown(W))D.hideCurrentMenu(),D.actions.get("customZoom").funct(),mxEvent.consume(W);
+else if("geItem"!=mxEvent.getSource(W).className||mxEvent.isShiftDown(W))D.hideCurrentMenu(),D.actions.get("smartFit").funct(),mxEvent.consume(W)},na=D.actions.get("zoomIn"),sa=D.actions.get("zoomOut"),za=D.actions.get("resetView"),ua=D.actions.get("undo"),Ba=D.actions.get("redo"),oa=v("",ua.funct,null,mxResources.get("undo")+" ("+ua.shortcut+")",ua,Editor.undoImage),Aa=v("",Ba.funct,null,mxResources.get("redo")+" ("+Ba.shortcut+")",Ba,Editor.redoImage);if(null!=V){za=function(){Ia.style.display=
+null!=D.pages&&("0"!=urlParams.pages||1<D.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ya=function(){Ia.innerText="";if(null!=D.currentPage){mxUtils.write(Ia,D.currentPage.getName());var W=null!=D.pages?D.pages.length:1,ea=D.getPageIndex(D.currentPage);ea=null!=ea?ea+1:1;var ta=D.currentPage.getId();Ia.setAttribute("title",D.currentPage.getName()+" ("+ea+"/"+W+")"+(null!=ta?" ["+ta+"]":""))}},La=D.actions.get("delete"),Oa=v("",La.funct,null,mxResources.get("delete"),La,Editor.trashImage);
+Oa.style.opacity="0.3";Y.appendChild(Oa);La.addListener("stateChanged",function(){Oa.style.opacity=La.enabled?"":"0.3"});var Na=function(){oa.style.display=0<D.editor.undoManager.history.length||N.isEditing()?"inline-block":"none";Aa.style.display=oa.style.display;oa.style.opacity=ua.enabled?"":"0.3";Aa.style.opacity=Ba.enabled?"":"0.3"};Y.appendChild(oa);Y.appendChild(Aa);ua.addListener("stateChanged",Na);Ba.addListener("stateChanged",Na);Na();var Ia=this.createPageMenuTab(!1,!0);Ia.style.cssText=
+"display:inline-block;white-space:nowrap;overflow:hidden;padding:6px;cursor:pointer;max-width:160px;text-overflow:ellipsis;";V.appendChild(Ia);D.editor.addListener("pagesPatched",ya);D.editor.addListener("pageSelected",ya);D.editor.addListener("pageRenamed",ya);D.editor.addListener("fileLoaded",ya);ya();D.addListener("fileDescriptorChanged",za);D.addListener("pagesVisibleChanged",za);D.editor.addListener("pagesPatched",za);za();za=v("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",
+sa,Editor.zoomOutImage);V.appendChild(za);var wa=ka.addMenu("100%",ra.funct);wa.setAttribute("title",mxResources.get("zoom"));wa.innerHTML="100%";wa.style.display="inline-block";wa.style.color="inherit";wa.style.cursor="pointer";wa.style.textAlign="center";wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration="none";wa.style.verticalAlign="top";wa.style.padding="6px 0";wa.style.fontSize="14px";wa.style.width="40px";V.appendChild(wa);ra=v("",na.funct,!0,mxResources.get("zoomIn")+
+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",na,Editor.zoomInImage);V.appendChild(ra);"1"==urlParams.embedInline?(V.appendChild(la),ra=D.actions.get("exit"),V.appendChild(v("",ra.funct,null,mxResources.get("exit"),ra,Editor.closeImage))):la.parentNode.removeChild(la);D.tabContainer.style.visibility="hidden";G.style.cssText="position:absolute;right:12px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
Y.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:12px;bottom:12px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";pa.appendChild(Y);pa.appendChild(V);R.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(R.style.touchAction="none");pa.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(pa)}else{var ab=u("",fa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",za,Editor.zoomFitImage);G.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";wa=ka.addMenu("100%",
-qa.funct);wa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration="none";wa.style.textDecoration="none";wa.style.overflow="hidden";wa.style.visibility="hidden";wa.style.textAlign="center";wa.style.cursor="pointer";wa.style.height=parseInt(D.tabContainerHeight)-1+"px";wa.style.lineHeight=parseInt(D.tabContainerHeight)+1+"px";wa.style.position="absolute";wa.style.display="block";wa.style.fontSize="12px";wa.style.width=
+mxClient.IS_POINTER&&(R.style.touchAction="none");pa.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(pa)}else{var ab=v("",fa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",za,Editor.zoomFitImage);G.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";wa=ka.addMenu("100%",
+ra.funct);wa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");wa.style.whiteSpace="nowrap";wa.style.paddingRight="10px";wa.style.textDecoration="none";wa.style.textDecoration="none";wa.style.overflow="hidden";wa.style.visibility="hidden";wa.style.textAlign="center";wa.style.cursor="pointer";wa.style.height=parseInt(D.tabContainerHeight)-1+"px";wa.style.lineHeight=parseInt(D.tabContainerHeight)+1+"px";wa.style.position="absolute";wa.style.display="block";wa.style.fontSize="12px";wa.style.width=
"59px";wa.style.right="0px";wa.style.bottom="0px";wa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";wa.style.backgroundPosition="right 6px center";wa.style.backgroundRepeat="no-repeat";pa.appendChild(wa)}(function(W){mxEvent.addListener(W,"click",fa);var ea=mxUtils.bind(this,function(){W.innerText="";mxUtils.write(W,Math.round(100*D.editor.graph.view.scale)+"%")});D.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);D.editor.addListener("resetGraphView",ea);D.editor.addListener("pageSelected",
ea)})(wa);var Ya=D.setGraphEnabled;D.setGraphEnabled=function(){Ya.apply(this,arguments);null!=this.tabContainer&&(wa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}pa.appendChild(G);pa.appendChild(D.diagramContainer);I.appendChild(pa);D.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=l)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&pa.appendChild(D.tabContainer);
var x=null;C();mxEvent.addListener(window,"resize",function(){C();null!=D.sidebarWindow&&D.sidebarWindow.window.fit();null!=D.formatWindow&&D.formatWindow.window.fit();null!=D.actions.outlineWindow&&D.actions.outlineWindow.window.fit();null!=D.actions.layersWindow&&D.actions.layersWindow.window.fit();null!=D.menus.tagsWindow&&D.menus.tagsWindow.window.fit();null!=D.menus.findWindow&&D.menus.findWindow.window.fit();null!=D.menus.findReplaceWindow&&D.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor=
"text";R.style.transform="";mxEvent.addGestureListeners(D.diagramContainer.parentNode,function(W){mxEvent.getSource(W)==D.diagramContainer.parentNode&&(D.embedExitPoint=new mxPoint(mxEvent.getClientX(W),mxEvent.getClientY(W)),D.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor="row-resize";D.diagramContainer.parentNode.appendChild(I);
-D.bottomResizer=I;var O=null,P=null,X=null,aa=null;mxEvent.addGestureListeners(I,function(W){aa=parseInt(D.diagramContainer.style.height);P=mxEvent.getClientY(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});I=I.cloneNode(!1);I.style.cursor="col-resize";D.diagramContainer.parentNode.appendChild(I);D.rightResizer=I;mxEvent.addGestureListeners(I,function(W){X=parseInt(D.diagramContainer.style.width);O=mxEvent.getClientX(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});mxEvent.addGestureListeners(document.body,
-null,function(W){var ea=!1;null!=O&&(D.diagramContainer.style.width=Math.max(20,X+mxEvent.getClientX(W)-O)+"px",ea=!0);null!=P&&(D.diagramContainer.style.height=Math.max(20,aa+mxEvent.getClientY(W)-P)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:D.diagramContainer.getBoundingClientRect()}),"*"),Z(),D.refresh())},function(W){null==O&&null==P||mxEvent.consume(W);P=O=null});this.diagramContainer.style.borderRadius=
+D.bottomResizer=I;var O=null,P=null,X=null,ba=null;mxEvent.addGestureListeners(I,function(W){ba=parseInt(D.diagramContainer.style.height);P=mxEvent.getClientY(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});I=I.cloneNode(!1);I.style.cursor="col-resize";D.diagramContainer.parentNode.appendChild(I);D.rightResizer=I;mxEvent.addGestureListeners(I,function(W){X=parseInt(D.diagramContainer.style.width);O=mxEvent.getClientX(W);N.popupMenuHandler.hideMenu();mxEvent.consume(W)});mxEvent.addGestureListeners(document.body,
+null,function(W){var ea=!1;null!=O&&(D.diagramContainer.style.width=Math.max(20,X+mxEvent.getClientX(W)-O)+"px",ea=!0);null!=P&&(D.diagramContainer.style.height=Math.max(20,ba+mxEvent.getClientY(W)-P)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:D.diagramContainer.getBoundingClientRect()}),"*"),Z(),D.refresh())},function(W){null==O&&null==P||mxEvent.consume(W);P=O=null});this.diagramContainer.style.borderRadius=
"4px";document.body.style.backgroundColor="transparent";D.bottomResizer.style.visibility="hidden";D.rightResizer.style.visibility="hidden";Y.style.visibility="hidden";V.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&D.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var d=EditorUi.initTheme;EditorUi.initTheme=function(){d.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,d,k,l,B,p,E){this.file=b;this.id=d;this.content=k;this.modifiedDate=l;this.createdDate=B;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,d,k,l,B){d()};DrawioComment.prototype.editComment=function(b,d,k){d()};DrawioComment.prototype.deleteComment=function(b,d){b()};DrawioUser=function(b,d,k,l,B){this.id=b;this.email=d;this.displayName=k;this.pictureUrl=l;this.locale=B};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,d,k){this.init(b,d,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -4088,15 +4086,15 @@ GraphViewer.prototype.init=function(b,d,k){this.graphConfig=null!=k?k:{};this.au
this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.forceCenter=null!=this.graphConfig.forceCenter?this.graphConfig.forceCenter:this.forceCenter;this.center=null!=this.graphConfig.center?this.graphConfig.center:this.center||this.forceCenter;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=0<=mxUtils.indexOf(this.toolbarItems,
"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.tagsEnabled=0<=mxUtils.indexOf(this.toolbarItems,"tags");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialOverflow=document.body.style.overflow;this.initialWidth=null!=b?b.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.responsive=(null!=this.graphConfig.responsive?
this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO&&!mxClient.IS_SF;this.pageId=this.graphConfig.pageId;this.editor=null;"inline"==this.graphConfig["toolbar-position"]&&(this.minHeight+=this.toolbarHeight);if(null!=d&&(this.xmlDocument=d.ownerDocument,this.xmlNode=d,this.xml=mxUtils.getXml(d),null!=b)){var l=mxUtils.bind(this,function(){this.graph=new Graph(b);this.graph.enableFlowAnimation=!0;this.graph.defaultPageBackgroundColor="transparent";this.graph.transparentBackground=
-!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var u=this.view.graphBounds,y=this.view.translate;E.setAttribute("viewBox",u.x+y.x-this.panDx+" "+(u.y+y.y-this.panDy)+
-" "+(u.width+1)+" "+(u.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",u))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(u){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
-this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(u){return M.getImageUrl(u)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
-S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(u){var y=S[M.currentPage];return"page"==u?y.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==u?M.currentPage+1:"pagecount"==u?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(u){this.handlingResize||(this.currentPage=mxUtils.mod(u,this.diagrams.length),
-this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(u){u=this.getIndexById(u);var y=0<=u;y&&this.selectPage(u);return y};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(u){if(null!=u&&Graph.isPageLink(u.src)){var y=u.src,
-C=y.indexOf(",");0<C&&(C=M.getIndexById(y.substring(C+1)),0<=C&&(u=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[C])),u.originalSrc=y))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(u){var y=f.apply(this,arguments);u=this.backgroundImage;if(null!=u){var C=this.view.translate,I=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((C.x+u.x)*I,(C.y+u.y)*I,u.width*I,u.height*I))}return y};this.addListener("xmlNodeChanged",H);H();
-urlParams.page=M.currentPage;H=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,H=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(u){return!mxEvent.isPopupTrigger(u.getEvent())&&"auto"==this.graph.container.style.overflow},
+!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var v=this.view.graphBounds,y=this.view.translate;E.setAttribute("viewBox",v.x+y.x-this.panDx+" "+(v.y+y.y-this.panDy)+
+" "+(v.width+1)+" "+(v.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",v))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(v){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=d&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var M=this;this.graph.getImageFromBundles=function(v){return M.getImageUrl(v)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var S=this.xmlNode.getElementsByTagName("diagram");if(0<
+S.length){if(null!=this.pageId)for(var H=0;H<S.length;H++)if(this.pageId==S[H].getAttribute("id")){this.currentPage=H;break}var K=this.graph.getGlobalVariable;M=this;this.graph.getGlobalVariable=function(v){var y=S[M.currentPage];return"page"==v?y.getAttribute("name")||"Page-"+(M.currentPage+1):"pagenumber"==v?M.currentPage+1:"pagecount"==v?S.length:K.apply(this,arguments)}}}this.diagrams=[];var Q=null;this.selectPage=function(v){this.handlingResize||(this.currentPage=mxUtils.mod(v,this.diagrams.length),
+this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(v){v=this.getIndexById(v);var y=0<=v;y&&this.selectPage(v);return y};H=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=Q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),Q=this.xmlNode)});var e=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var y=v.src,
+C=y.indexOf(",");0<C&&(C=M.getIndexById(y.substring(C+1)),0<=C&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[C])),v.originalSrc=y))}e.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var y=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var C=this.view.translate,I=this.view.scale;y=mxRectangle.fromRectangle(y);y.add(new mxRectangle((C.x+v.x)*I,(C.y+v.y)*I,v.width*I,v.height*I))}return y};this.addListener("xmlNodeChanged",H);H();
+urlParams.page=M.currentPage;H=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,H=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(v){return!mxEvent.isPopupTrigger(v.getEvent())&&"auto"==this.graph.container.style.overflow},
this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&!this.autoCrop||this.crop();this.addClickHandler(this.graph);
-this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(u){if(Graph.isPageLink(u)){var y=u.indexOf(",");M.selectPageById(u.substring(y+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(u);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
+this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=H&&this.setLayersVisible(H);this.graph.customLinkClicked=function(v){if(Graph.isPageLink(v)){var y=v.indexOf(",");M.selectPageById(v.substring(y+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(v);return!0};var g=this.graph.foldTreeCell;this.graph.foldTreeCell=mxUtils.bind(this,function(){this.treeCellFolded=
!0;return g.apply(this.graph,arguments)});this.fireEvent(new mxEventObject("render"))});k=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(this.checkVisibleState&&0==b.offsetWidth&&"undefined"!==typeof k){var B=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(B,{attributes:!0})}else l()}};
GraphViewer.prototype.getObservableParent=function(b){for(b=b.parentNode;b!=document.body&&null!=b.parentNode&&"none"!==mxUtils.getCurrentStyle(b).display;)b=b.parentNode;return b};GraphViewer.prototype.getImageUrl=function(b){null!=b&&"http://"!=b.substring(0,7)&&"https://"!=b.substring(0,8)&&"data:image"!=b.substring(0,10)&&("/"==b.charAt(0)&&(b=b.substring(1,b.length)),b=this.imageBaseUrl+b);return b};
GraphViewer.prototype.getImageForGraphModel=function(b){var d=Graph.createOffscreenGraph(this.graph.getStylesheet());d.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(d.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;d.model.setRoot(b);b=d.getSvg();var k=d.getGraphBounds();document.body.removeChild(d.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
@@ -4120,20 +4118,20 @@ GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"=
d.style.height=this.toolbarHeight+"px";this.toolbar=d;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(d.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(d,30);var k=null,l=null,B=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);k=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(d,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){d.style.display="none";
l=null}),100)}),ja||200)}),p=mxUtils.bind(this,function(ja){null!=k&&(window.clearTimeout(k),fadeThead=null);null!=l&&(window.clearTimeout(l),fadeThead2=null);d.style.display="";mxUtils.setOpacity(d,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),B())}));mxEvent.addListener(d,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(d,"mouseenter",
mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(d,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||p(30)}));var E=this.graph,M=E.getTolerance();E.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ja,ca){this.startX=ca.getGraphX();this.startY=ca.getGraphY();this.scrollLeft=E.container.scrollLeft;this.scrollTop=E.container.scrollTop},mouseMove:function(ja,
-ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(d.style.opacity||0)?B():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,qa){ja=this.createToolbarButton(ja,ca,pa,qa);d.appendChild(ja);H++;return ja}),Q=null,e=null,f=null,g=null,u=0;u<S.length;u++){var y=S[u];
+ca){},mouseUp:function(ja,ca){mxEvent.isTouchEvent(ca.getEvent())&&Math.abs(this.scrollLeft-E.container.scrollLeft)<M&&Math.abs(this.scrollTop-E.container.scrollTop)<M&&Math.abs(this.startX-ca.getGraphX())<M&&Math.abs(this.startY-ca.getGraphY())<M&&(0<parseFloat(d.style.opacity||0)?B():p(30))}})}for(var S=this.toolbarItems,H=0,K=mxUtils.bind(this,function(ja,ca,pa,ra){ja=this.createToolbarButton(ja,ca,pa,ra);d.appendChild(ja);H++;return ja}),Q=null,e=null,f=null,g=null,v=0;v<S.length;v++){var y=S[v];
if("pages"==y){g=b.ownerDocument.createElement("div");g.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(g,70);var C=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");C.style.borderRightStyle="none";C.style.paddingLeft="0px";C.style.paddingRight="0px";d.appendChild(g);var I=K(mxUtils.bind(this,
function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");I.style.paddingLeft="0px";I.style.paddingRight="0px";y=mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";C.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",y);y()}else if("zoom"==y)this.zoomEnabled&&(K(mxUtils.bind(this,function(){this.graph.zoomOut()}),
Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),K(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),K(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"==y){if(this.layersEnabled){var D=this.graph.getModel(),N=K(mxUtils.bind(this,function(ja){if(null!=
-Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var pa=this.graph.getGraphBounds(),qa=this.graph.view;0>pa.x||0>pa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:qa.translate.clone(),scale:qa.scale}):null!=this.graph.originalViewState&&0<pa.x/qa.scale+this.graph.originalViewState.translate.x-qa.translate.x&&0<pa.y/qa.scale+this.graph.originalViewState.translate.y-
-qa.translate.y&&(qa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:qa.translate.clone(),scale:qa.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=N.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
+Q)Q.parentNode.removeChild(Q),Q=null;else{Q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var pa=this.graph.getGraphBounds(),ra=this.graph.view;0>pa.x||0>pa.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale}):null!=this.graph.originalViewState&&0<pa.x/ra.scale+this.graph.originalViewState.translate.x-ra.translate.x&&0<pa.y/ra.scale+this.graph.originalViewState.translate.y-
+ra.translate.y&&(ra.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ra.translate.clone(),scale:ra.scale})}}));mxEvent.addListener(Q,"mouseleave",function(){Q.parentNode.removeChild(Q);Q=null});ja=N.getBoundingClientRect();Q.style.width="140px";Q.style.padding="2px 0px 2px 0px";Q.style.border="1px solid #d0d0d0";Q.style.backgroundColor="#eee";Q.style.fontFamily=Editor.defaultHtmlFont;
Q.style.fontSize="11px";Q.style.overflowY="auto";Q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";Q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(Q,80);var ca=mxUtils.getDocumentScrollOrigin(document);Q.style.left=ca.x+ja.left-1+"px";Q.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(Q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");D.addListener(mxEvent.CHANGE,function(){N.style.display=1<D.getChildCount(D.root)?"inline-block":"none"});N.style.display=
1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==y){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==e&&(e=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),e.div.getElementsByTagName("div")[0].style.position="",e.div.style.maxHeight="160px",e.div.style.maxWidth="120px",e.div.style.padding="2px",e.div.style.overflow="auto",e.div.style.height="auto",e.div.style.position="fixed",e.div.style.fontFamily=Editor.defaultHtmlFont,e.div.style.fontSize="11px",
e.div.style.backgroundColor="#eee",e.div.style.color="#000",e.div.style.border="1px solid #d0d0d0",e.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(e.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=e.div;mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});ja=G.getBoundingClientRect();var ca=mxUtils.getDocumentScrollOrigin(document);f.style.left=ca.x+ja.left-1+"px";f.style.top=ca.y+ja.bottom-2+"px";document.body.appendChild(f);e.refresh()}}),Editor.tagsImage,
mxResources.get("tags")||"Tags");D.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));G.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==y?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(y=this.graphConfig["toolbar-buttons"][y],null!=y&&(y.elem=K(null==
y.enabled||y.enabled?y.handler:function(){},y.image,y.title,y.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*H);null!=this.graphConfig.title&&(S=b.ownerDocument.createElement("div"),S.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;",S.setAttribute("title",this.graphConfig.title),mxUtils.write(S,this.graphConfig.title),mxUtils.setOpacity(S,70),
-d.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ha=b.style.border,ka=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
-ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ha&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var pa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
-Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ha});mxEvent.addListener(document,"mousemove",function(qa){for(qa=mxEvent.getSource(qa);null!=qa;){if(qa==b||qa==d||qa==Q)return;qa=qa.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(qa){pa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+d.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){d.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";d.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ja=b.getBoundingClientRect(),ca=mxUtils.getScrollOrigin(document.body);ca="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-ca.x,top:-ca.y};ja={left:ja.left-
+ca.left,top:ja.top-ca.top,bottom:ja.bottom-ca.top,right:ja.right-ca.left};d.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?d.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(d.style.marginTop=-this.toolbarHeight+"px",d.style.top=ja.top+1+"px"):d.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(d);var pa=mxUtils.bind(this,function(){null!=d.parentNode&&d.parentNode.removeChild(d);null!=
+Q&&(Q.parentNode.removeChild(Q),Q=null);b.style.border=ia});mxEvent.addListener(document,"mousemove",function(ra){for(ra=mxEvent.getSource(ra);null!=ra;){if(ra==b||ra==d||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else d.style.top=-this.toolbarHeight+"px",b.appendChild(d)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
d.parentNode&&ka()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,d,k,l){var B=document.createElement("div");B.style.borderRight="1px solid #d0d0d0";B.style.padding="3px 6px 3px 6px";mxEvent.addListener(B,"click",b);null!=k&&B.setAttribute("title",k);B.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",d);b.style.width="18px";null==l||l?(mxEvent.addListener(B,"mouseenter",function(){B.style.backgroundColor="#ddd"}),mxEvent.addListener(B,"mouseleave",
function(){B.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),B.style.cursor="pointer"):mxUtils.setOpacity(B,30);B.appendChild(b);return B};GraphViewer.prototype.disableButton=function(b){var d=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=d&&(mxUtils.setOpacity(d.elem,30),mxEvent.removeListener(d.elem,"click",d.handler),mxEvent.addListener(d.elem,"mouseenter",function(){d.elem.style.backgroundColor="#eee"}))};
@@ -4157,8 +4155,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,d,k){if(null!=GraphViewer.cachedUrls[b])d(GraphViewer.cachedUrls[b]);else{var l=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;l.open("GET",b);l.onload=function(){d(null!=l.getText?l.getText():l.responseText)};l.onerror=k;l.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},d=function(k,l){function B(){this.q=[];this.add=function(f){this.q.push(f)};var Q,e;this.call=function(){Q=0;for(e=this.q.length;Q<e;Q++)this.q[Q].call()}}function p(Q,e){return Q.currentStyle?Q.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(e):Q.style[e]}function E(Q,e){if(!Q.resizedAttached)Q.resizedAttached=
new B,Q.resizedAttached.add(e);else if(Q.resizedAttached){Q.resizedAttached.add(e);return}Q.resizeSensor=document.createElement("div");Q.resizeSensor.className="resize-sensor";Q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";Q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],u=Q.resizeSensor.childNodes[1],y=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;u.scrollLeft=1E5;u.scrollTop=1E5};y();var C=!1,I=function(){Q.resizedAttached&&(C&&(Q.resizedAttached.call(),C=!1),b(I))};b(I);var D,N,G,ha;e=function(){if((G=Q.offsetWidth)!=D||(ha=Q.offsetHeight)!=N)C=!0,D=G,N=ha;y()};var ka=function(ja,
-ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",e);ka(u,"scroll",e)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,e=k.length;Q<e;Q++)d.detach(k[Q]);
+Q.appendChild(Q.resizeSensor);"static"==p(Q,"position")&&(Q.style.position="relative");var f=Q.resizeSensor.childNodes[0],g=f.childNodes[0],v=Q.resizeSensor.childNodes[1],y=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};y();var C=!1,I=function(){Q.resizedAttached&&(C&&(Q.resizedAttached.call(),C=!1),b(I))};b(I);var D,N,G,ia;e=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)C=!0,D=G,N=ia;y()};var ka=function(ja,
+ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",e);ka(v,"scroll",e)}var M=function(){GraphViewer.resizeSensorEnabled&&l()},S=Object.prototype.toString.call(k),H="[object Array]"===S||"[object NodeList]"===S||"[object HTMLCollection]"===S||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(H){S=0;for(var K=k.length;S<K;S++)E(k[S],M)}else E(k,M);this.detach=function(){if(H)for(var Q=0,e=k.length;Q<e;Q++)d.detach(k[Q]);
else d.detach(k)}};d.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=d})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},