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.js2796
1 files changed, 1408 insertions, 1388 deletions
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 4da4f399..02cc5fd5 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -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.4.0",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.4.2",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]"!==
@@ -428,7 +428,7 @@ mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGrad
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
-c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return null}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
a);d.appendChild(e);return d};
mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
@@ -442,7 +442,7 @@ mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(nu
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
-")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();a=null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?null:this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale);b||null==a?this.node.setAttribute("fill",d):this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")")};
mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
@@ -1952,10 +1952,10 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,d){b.raw=d;return b};$jscomp.arrayIteratorImpl=function(b){var d=0;return function(){return d<b.length?{done:!1,value:b[d++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var d="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return d?d.call(b):$jscomp.arrayIterator(b)};
-Editor=function(b,d,k,l,B){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(d,k);this.editable=null!=B?B:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p){this.status=p;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
-(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(d){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
+Editor=function(b,e,k,l,C){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=l||this.createGraph(e,k);this.editable=null!=C?C:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(p,E){this.status=p;this.statusFunction=E;this.fireEvent(new mxEventObject("statusChanged"))};
+this.getStatus=function(){return this.status};this.graphChangeListener=function(p,E){p=null!=E?E.getProperty("edit"):null;null!=p&&p.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=";Editor.lightCheckmarkImage="data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=";
Editor.darkCheckmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAMAAACeyVWkAAAARVBMVEUAAACZmZkICAgEBASNjY2Dg4MYGBiTk5N5eXl1dXVmZmZQUFBCQkI3NzceHh4MDAykpKSJiYl+fn5sbGxaWlo/Pz8SEhK96uPlAAAAAXRSTlMAQObYZgAAAE5JREFUGNPFzTcSgDAQQ1HJGUfy/Y9K7V1qeOUfzQifCQZai1XHaz11LFysbDbzgDSSWMZiETz3+b8yNUc/MMsktxuC8XQBSncdLwz+8gCCggGXzBcozAAAAABJRU5ErkJggg==";Editor.darkHelpImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAP1BMVEUAAAD///////////////////////////////////////////////////////////////////////////////9Du/pqAAAAFXRSTlMAT30qCJRBboyDZyCgRzUUdF46MJlgXETgAAAAeklEQVQY022O2w4DIQhEQUURda/9/28tUO2+7CQS5sgQ4F1RapX78YUwRqQjTU8ILqQfKerTKTvACJ4nLX3krt+8aS82oI8aQC4KavRgtvEW/mDvsICgA03PSGRr79MqX1YPNIxzjyqtw8ZnnRo4t5a5undtJYRywau+ds4Cyza3E6YAAAAASUVORK5CYII=";
Editor.lightHelpImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJub25lIiBkPSJNMCAwaDI0djI0SDB6Ii8+PHBhdGggZD0iTTExIDE4aDJ2LTJoLTJ2MnptMS0xNkM2LjQ4IDIgMiA2LjQ4IDIgMTJzNC40OCAxMCAxMCAxMCAxMC00LjQ4IDEwLTEwUzE3LjUyIDIgMTIgMnptMCAxOGMtNC40MSAwLTgtMy41OS04LThzMy41OS04IDgtOCA4IDMuNTkgOCA4LTMuNTkgOC04IDh6bTAtMTRjLTIuMjEgMC00IDEuNzktNCA0aDJjMC0xLjEuOS0yIDItMnMyIC45IDIgMmMwIDItMyAxLjc1LTMgNWgyYzAtMi4yNSAzLTIuNSAzLTUgMC0yLjIxLTEuNzktNC00LTR6Ii8+PC9zdmc+";
@@ -1981,85 +1981,85 @@ Editor.formatImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
Editor.freehandImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHJlY3QgZmlsbD0ibm9uZSIgaGVpZ2h0PSIyNCIgd2lkdGg9IjI0Ii8+PHBhdGggZD0iTTQuNSw4YzEuMDQsMCwyLjM0LTEuNSw0LjI1LTEuNWMxLjUyLDAsMi43NSwxLjIzLDIuNzUsMi43NWMwLDIuMDQtMS45OSwzLjE1LTMuOTEsNC4yMkM1LjQyLDE0LjY3LDQsMTUuNTcsNCwxNyBjMCwxLjEsMC45LDIsMiwydjJjLTIuMjEsMC00LTEuNzktNC00YzAtMi43MSwyLjU2LTQuMTQsNC42Mi01LjI4YzEuNDItMC43OSwyLjg4LTEuNiwyLjg4LTIuNDdjMC0wLjQxLTAuMzQtMC43NS0wLjc1LTAuNzUgQzcuNSw4LjUsNi4yNSwxMCw0LjUsMTBDMy4xMiwxMCwyLDguODgsMiw3LjVDMiw1LjQ1LDQuMTcsMi44Myw1LDJsMS40MSwxLjQxQzUuNDEsNC40Miw0LDYuNDMsNCw3LjVDNCw3Ljc4LDQuMjIsOCw0LjUsOHogTTgsMjEgbDMuNzUsMGw4LjA2LTguMDZsLTMuNzUtMy43NUw4LDE3LjI1TDgsMjF6IE0xMCwxOC4wOGw2LjA2LTYuMDZsMC45MiwwLjkyTDEwLjkyLDE5TDEwLDE5TDEwLDE4LjA4eiBNMjAuMzcsNi4yOSBjLTAuMzktMC4zOS0xLjAyLTAuMzktMS40MSwwbC0xLjgzLDEuODNsMy43NSwzLjc1bDEuODMtMS44M2MwLjM5LTAuMzksMC4zOS0xLjAyLDAtMS40MUwyMC4zNyw2LjI5eiIvPjwvc3ZnPg==";
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
-Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;
-Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
+Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";Editor.compareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTE1Ljg1IDQwLTIuMS0yLjEgNi4wNS02LjA1SDR2LTNoMTUuOGwtNi4wNS02LjA1IDIuMS0yLjEgOS42NSA5LjY1Wm0xNi4zLTEyLjctOS42NS05LjY1TDMyLjE1IDhsMi4xIDIuMS02LjA1IDYuMDVINDR2M0gyOC4ybDYuMDUgNi4wNVoiLz48L3N2Zz4=";
+Editor.helpImage=Editor.lightHelpImage;Editor.checkmarkImage=Editor.lightCheckmarkImage;Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.currentTheme=uiTheme;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isDarkMode=function(b){return Editor.darkMode};Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};
Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(b){var d=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(B,p,E){B=l.substring(B+8,B+8+E);"zTXt"==p?(E=B.indexOf(String.fromCharCode(0)),"mxGraphModel"==B.substring(0,E)&&(B=pako.inflateRaw(Graph.stringToArrayBuffer(B.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=B&&0<B.length&&(d=B))):"tEXt"==p&&(B=B.split(String.fromCharCode(0)),1<B.length&&("mxGraphModel"==
-B[0]||"mxfile"==B[0])&&(d=B[1]));if(null!=d||"IDAT"==p)return!0}))}catch(B){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
+Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),l=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(l,mxUtils.bind(this,function(C,p,E){C=l.substring(C+8,C+8+E);"zTXt"==p?(E=C.indexOf(String.fromCharCode(0)),"mxGraphModel"==C.substring(0,E)&&(C=pako.inflateRaw(Graph.stringToArrayBuffer(C.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=C&&0<C.length&&(e=C))):"tEXt"==p&&(C=C.split(String.fromCharCode(0)),1<C.length&&("mxGraphModel"==
+C[0]||"mxfile"==C[0])&&(e=C[1]));if(null!=e||"IDAT"==p)return!0}))}catch(C){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};mxUtils.extend(Editor,mxEventSource);Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";
Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;Editor.prototype.initialTopSpacing=0;Editor.prototype.appName=document.title;Editor.prototype.editBlankUrl=window.location.protocol+"//"+window.location.host+"/";Editor.prototype.defaultGraphOverflow="hidden";Editor.prototype.init=function(){};Editor.prototype.isChromelessView=function(){return this.chromeless};
Editor.prototype.setAutosave=function(b){this.autosave=b;this.fireEvent(new mxEventObject("autosaveChanged"))};Editor.prototype.getEditBlankUrl=function(b){return this.editBlankUrl+b};
-Editor.prototype.editAsNew=function(b,d){d=null!=d?"?title="+encodeURIComponent(d):"";null!=urlParams.ui&&(d+=(0<d.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(B){"ready"==B.data&&B.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(d+(0<d.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(d)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,d){b=new Graph(null,d,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(B){return!this.isExternalProtocol(B)});return b};
+Editor.prototype.editAsNew=function(b,e){e=null!=e?"?title="+encodeURIComponent(e):"";null!=urlParams.ui&&(e+=(0<e.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var k=null,l=mxUtils.bind(this,function(C){"ready"==C.data&&C.source==k&&(mxEvent.removeListener(window,"message",l),k.postMessage(b,"*"))});mxEvent.addListener(window,"message",l);k=this.graph.openLink(this.getEditBlankUrl(e+(0<e.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(e)+"#R"+encodeURIComponent(b))};Editor.prototype.createGraph=function(b,e){b=new Graph(null,e,null,null,b);b.transparentBackground=!1;var k=b.isCssTransformsSupported,l=this;b.isCssTransformsSupported=function(){return k.apply(this,arguments)&&(!l.chromeless||!mxClient.IS_SF)};this.chromeless||(b.isBlankLink=function(C){return!this.isExternalProtocol(C)});return b};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
-Editor.prototype.readGraphState=function(b){var d=b.getAttribute("grid");if(null==d||""==d)d=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=d&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
-"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);d=parseFloat(b.getAttribute("pageScale"));!isNaN(d)&&0<d?this.graph.pageScale=d:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(d=b.getAttribute("page"),this.graph.pageVisible=
-null!=d?"0"!=d:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;d=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(d)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,d,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
-Editor.prototype.setGraphXml=function(b){if(null!=b){var d=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),d.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=d.document.createElement("mxGraphModel");k.appendChild(b);d.decode(k,this.graph.getModel());
+Editor.prototype.readGraphState=function(b){var e=b.getAttribute("grid");if(null==e||""==e)e=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=e&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=b.getAttribute("guides");this.graph.setTooltips("0"!=b.getAttribute("tooltips"));this.graph.setConnectable("0"!=b.getAttribute("connect"));this.graph.connectionArrowsEnabled=
+"0"!=b.getAttribute("arrows");this.graph.foldingEnabled="0"!=b.getAttribute("fold");this.isChromelessView()&&this.graph.foldingEnabled&&(this.graph.foldingEnabled="1"==urlParams.nav,this.graph.cellRenderer.forceControlClickHandler=this.graph.foldingEnabled);e=parseFloat(b.getAttribute("pageScale"));!isNaN(e)&&0<e?this.graph.pageScale=e:this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.isLightboxView()||this.graph.isViewer()?this.graph.pageVisible=!1:(e=b.getAttribute("page"),this.graph.pageVisible=
+null!=e?"0"!=e:this.graph.defaultPageVisible);this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;e=parseFloat(b.getAttribute("pageWidth"));var k=parseFloat(b.getAttribute("pageHeight"));isNaN(e)||isNaN(k)||(this.graph.pageFormat=new mxRectangle(0,0,e,k));b=b.getAttribute("background");this.graph.background=null!=b&&0<b.length?b:null};
+Editor.prototype.setGraphXml=function(b){if(null!=b){var e=new mxCodec(b.ownerDocument);if("mxGraphModel"==b.nodeName){this.graph.model.beginUpdate();try{this.graph.model.clear(),this.graph.view.scale=1,this.readGraphState(b),this.updateGraphComponents(),e.decode(b,this.graph.getModel())}finally{this.graph.model.endUpdate()}this.fireEvent(new mxEventObject("resetGraphView"))}else if("root"==b.nodeName){this.resetGraph();var k=e.document.createElement("mxGraphModel");k.appendChild(b);e.decode(k,this.graph.getModel());
this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))}else throw{message:mxResources.get("cannotOpenFile"),node:b,toString:function(){return this.message}};}else this.resetGraph(),this.graph.model.clear(),this.fireEvent(new mxEventObject("resetGraphView"))};
Editor.prototype.getGraphXml=function(b){b=(null!=b?b:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)b.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),b.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);b.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");b.setAttribute("gridSize",
this.graph.gridSize);b.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");b.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");b.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");b.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");b.setAttribute("fold",this.graph.foldingEnabled?"1":"0");b.setAttribute("page",this.graph.pageVisible?"1":"0");b.setAttribute("pageScale",this.graph.pageScale);b.setAttribute("pageWidth",this.graph.pageFormat.width);
b.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&b.setAttribute("background",this.graph.background);return b};Editor.prototype.updateGraphComponents=function(){var b=this.graph;null!=b.container&&(b.view.validateBackground(),b.container.style.overflow=b.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(b){this.modified=b};
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()};
+Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(l,C){e.undoableEditHappened(C.getProperty("edit"))};var k=mxUtils.bind(this,function(l,C){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(l,C){l=b.getSelectionCellsForChanges(C.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<l.length){b.getModel();C=[];for(var p=0;p<l.length;p++)null!=
+b.view.getState(l[p])&&C.push(l[p]);b.setSelectionCells(C)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};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,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&&
-d.clientHeight>D.clientHeight-g&&(d.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=C+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,l,C,p,E,M,S,H,K){var Q=S?57:0,d=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 x=v.height,B=Math.max(1,Math.round((v.width-k-g)/2)),I=Math.max(1,Math.round((x-l-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-g):k;l=Math.min(l,x-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=x+"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";B+=v.x;I+=v.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+I+=b.embedViewport.y,B+=b.embedViewport.x);C&&document.body.appendChild(this.bg);var D=b.createDiv(S?"geTransDialog":"geDialog");C=this.getPosition(B,I,k,l);B=C.x;I=C.y;D.style.width=k+"px";D.style.height=l+"px";D.style.left=B+"px";D.style.top=I+"px";D.style.zIndex=this.zIndex;D.appendChild(e);document.body.appendChild(D);!M&&e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");e.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=B+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&&(d=k=G.w,f=l=G.h)}G=mxUtils.getDocumentSize();x=G.height;this.bg.style.height=x+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");B=Math.max(1,Math.round((G.width-k-g)/2));I=Math.max(1,Math.round((x-l-b.footerHeight)/3));k=null!=document.body?Math.min(d,document.body.scrollWidth-g):d;l=Math.min(f,x-g);G=this.getPosition(B,I,k,l);B=G.x;I=G.y;D.style.left=B+"px";D.style.top=I+"px";D.style.width=k+"px";D.style.height=l+"px";!M&&
+e.clientHeight>D.clientHeight-g&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=I+14+"px",this.dialogImg.style.left=B+k+38-Q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=D;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
-"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,d){return new mxPoint(b,d)};Dialog.prototype.close=function(b,d){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,d))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-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,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",
-function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);B.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
-M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var e=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();d(!1)});e.className="geBtn";M.appendChild(e)}e=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();d(!0)});e.className="geBtn gePrimaryBtn";M.appendChild(e);b.editor.cancelFirst||
-M.appendChild(S);p.appendChild(M);B.appendChild(p);l.appendChild(B);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var d=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(d,500):d()}}catch(k){}};
-PrintDialog.createPrintPreview=function(b,d,k,l,B,p,E){d=new mxPrintPreview(b,d,k,l,B,p);d.title=mxResources.get("preview");d.printBackgroundImage=!0;d.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";d.backgroundColor=b;var M=d.writeHead;d.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return d};
+"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
+var ErrorDialog=function(b,e,k,l,C,p,E,M,S,H,K){S=null!=S?S:!0;var Q=document.createElement("div");Q.style.textAlign="center";if(null!=e){var d=document.createElement("div");d.style.padding="0px";d.style.margin="0px";d.style.fontSize="18px";d.style.paddingBottom="16px";d.style.marginBottom="10px";d.style.borderBottom="1px solid #c0c0c0";d.style.color="gray";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";mxUtils.write(d,e);d.setAttribute("title",e);Q.appendChild(d)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;Q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=p&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();p()}),e.className="geBtn",k.appendChild(e),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!=C&&C()});
+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,e){this.create(b,e)};
+PrintDialog.prototype.create=function(b){function e(f){var g=E.checked||H.checked,v=parseInt(Q.value)/100;isNaN(v)&&(v=1,Q.value="100%");v*=.75;var x=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,B=1/k.pageScale;if(g){var I=E.checked?1:parseInt(K.value);isNaN(I)||(B=mxUtils.getScaleForPageCount(I,k,x))}k.getGraphBounds();var D=I=0;x=mxRectangle.fromRectangle(x);x.width=Math.ceil(x.width*v);x.height=Math.ceil(x.height*v);B*=v;!g&&k.pageVisible?(v=k.getPageLayout(),I-=v.x*x.width,D-=v.y*x.height):
+g=!0;g=PrintDialog.createPrintPreview(k,B,x,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 C=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);C.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);C.appendChild(p);mxEvent.addListener(H,"change",
+function(){H.checked?K.removeAttribute("disabled"):K.setAttribute("disabled","disabled");E.checked=!H.checked});p=p.cloneNode(!1);M=document.createElement("td");mxUtils.write(M,mxResources.get("pageScale")+":");p.appendChild(M);M=document.createElement("td");var Q=document.createElement("input");Q.setAttribute("value","100 %");Q.setAttribute("size","5");Q.style.width="50px";M.appendChild(Q);p.appendChild(M);C.appendChild(p);p=document.createElement("tr");M=document.createElement("td");M.colSpan=2;
+M.style.paddingTop="20px";M.setAttribute("align","right");S=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});S.className="geBtn";b.editor.cancelFirst&&M.appendChild(S);if(PrintDialog.previewEnabled){var d=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});d.className="geBtn";M.appendChild(d)}d=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});d.className="geBtn gePrimaryBtn";M.appendChild(d);b.editor.cancelFirst||
+M.appendChild(S);p.appendChild(M);C.appendChild(p);l.appendChild(C);this.container=l};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.createPrintPreview=function(b,e,k,l,C,p,E){e=new mxPrintPreview(b,e,k,l,C,p);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var M=e.writeHead;e.writeHead=function(S){M.apply(this,arguments);S.writeln('<style type="text/css">');S.writeln("@media screen {");S.writeln(" body > div { padding:30px;box-sizing:content-box; }");S.writeln("}");S.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function d(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var y=g;null!=y&&Graph.isPageLink(y.src)&&(y=b.createImageForPageLink(y.src,null));null!=y&&null!=y.src?(f.setAttribute("src",y.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,B=document.createElement("table");B.style.width=
-"100%";B.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
-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,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(),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}};
+var PageSetupDialog=function(b){function e(){null==K||K==mxConstants.NONE?(H.style.backgroundColor="",H.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(H.style.backgroundColor=K,H.style.backgroundImage="")}function k(){var x=g;null!=x&&Graph.isPageLink(x.src)&&(x=b.createImageForPageLink(x.src,null));null!=x&&null!=x.src?(f.setAttribute("src",x.src),f.style.display=""):(f.removeAttribute("src"),f.style.display="none")}var l=b.editor.graph,C=document.createElement("table");C.style.width=
+"100%";C.style.height="100%";var p=document.createElement("tbody");var E=document.createElement("tr");var M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";mxUtils.write(M,mxResources.get("paperSize")+":");E.appendChild(M);M=document.createElement("td");M.style.verticalAlign="top";M.style.fontSize="10pt";var S=PageSetupDialog.addPageFormatPanel(M,"pagesetupdialog",l.pageFormat);E.appendChild(M);p.appendChild(E);E=document.createElement("tr");M=document.createElement("td");
+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;e();mxEvent.addListener(H,
+"click",function(x){b.pickColor(K||"none",function(B){K=B;e()});mxEvent.consume(x)});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 x=parseInt(Q.value);Q.value=Math.max(1,isNaN(x)?l.getGridSize():x)});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 d=document.createElement("button");d.className="geBtn";d.style.margin="0px";mxUtils.write(d,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,v=function(x){b.showBackgroundImageDialog(function(B,I){I||(g=B,k())},g);mxEvent.consume(x)};mxEvent.addListener(d,"click",v);mxEvent.addListener(f,"click",v);k();M.appendChild(f);M.appendChild(d);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");d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";
+b.editor.cancelFirst&&M.appendChild(d);v=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var x=parseInt(Q.value);isNaN(x)||l.gridSize===x||l.setGridSize(x);x=new ChangePageSetup(b,K,g,S.get());x.ignoreColor=l.background==K;x.ignoreImage=(null!=l.backgroundImage?l.backgroundImage.src:null)===(null!=g?g.src:null);l.pageFormat.width==x.previousFormat.width&&l.pageFormat.height==x.previousFormat.height&&x.ignoreColor&&x.ignoreImage||l.model.execute(x)});v.className="geBtn gePrimaryBtn";
+M.appendChild(v);b.editor.cancelFirst||M.appendChild(d);E.appendChild(M);p.appendChild(E);C.appendChild(p);this.container=C};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,l){function C(G,ia,ka){if(ka||Q!=document.activeElement&&d!=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,d.value=k.height/100,p.setAttribute("checked",
+"checked"),M.value="custom",S.style.display="none",K.style.display="")}}e="format-"+e;var p=document.createElement("input");p.setAttribute("name",e);p.setAttribute("type","radio");p.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);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);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));S.appendChild(e);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 d=document.createElement("input");d.setAttribute("size","7");d.style.textAlign="right";K.appendChild(d);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 x=g[v];f[x.key]=x;var B=document.createElement("option");B.setAttribute("value",
+x.key);mxUtils.write(B,x.title);M.appendChild(B)}var I=!1;C();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,d.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(d.value);if(isNaN(G)||0>=G)d.value=k.height/100;G=new mxRectangle(0,0,Math.floor(100*parseFloat(Q.value)),
+Math.floor(100*parseFloat(d.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(e,"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(d,"blur",N);mxEvent.addListener(d,"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;C(null,null,!0)},get:function(){return D},widthInput:Q,heightInput:d}};
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 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);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);
-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};
-FilenameDialog.createFileTypes=function(b,d,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var B=document.createElement("option");B.setAttribute("value",b);mxUtils.write(B,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(B)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=d.value.lastIndexOf(".drawio.");E=0<E?E:d.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);d.value=0<E?d.value.substring(0,E+1)+p:d.value+"."+p;"createEvent"in
-document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),d.dispatchEvent(p)):d.fireEvent("onchange")});b=function(p){p=d.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(d,"change",b);mxEvent.addListener(d,"keyup",b);b();return l};
-var WrapperWindow=function(b,d,k,l,B,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(d,M,k,l,B,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
+var FilenameDialog=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){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 x=document.createElement("td");x.style.textOverflow="ellipsis";x.style.textAlign="right";x.style.maxWidth=(d?d+15:100)+"px";x.style.fontSize="10pt";x.style.width=(d?d:84)+"px";mxUtils.write(x,(C||mxResources.get("filename"))+":");v.appendChild(x);var B=
+document.createElement("input");B.setAttribute("value",e||"");B.style.marginLeft="4px";B.style.width=null!=Q?Q+"px":"180px";var I=mxUtils.button(k,function(){if(null==p||p(B.value))S&&b.hideDialog(),l(B.value)});I.className="geBtn gePrimaryBtn";this.init=function(){if(null!=C||null==E)if(B.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.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=B,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")&&(B.value=decodeURIComponent(G.dataTransfer.getData("text/uri-list")),
+I.click());G.stopPropagation();G.preventDefault()}))}}};x=document.createElement("td");x.style.whiteSpace="nowrap";x.appendChild(B);v.appendChild(x);if(null!=C||null==E)g.appendChild(v),null!=K&&(x.appendChild(FilenameDialog.createTypeHint(b,B,K)),null!=b.editor.diagramFileTypes&&(v=document.createElement("tr"),x=document.createElement("td"),x.style.textOverflow="ellipsis",x.style.textAlign="right",x.style.maxWidth="100px",x.style.fontSize="10pt",x.style.width="84px",mxUtils.write(x,mxResources.get("type")+
+":"),v.appendChild(x),x=document.createElement("td"),x.style.whiteSpace="nowrap",v.appendChild(x),e=FilenameDialog.createFileTypes(b,B,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",x.appendChild(e),B.style.width=null!=Q?Q-40+"px":"190px",v.appendChild(x),g.appendChild(v)));null!=E&&(v=document.createElement("tr"),x=document.createElement("td"),x.colSpan=2,x.appendChild(E),v.appendChild(x),g.appendChild(v));v=document.createElement("tr");x=document.createElement("td");x.colSpan=
+2;x.style.paddingTop=null!=K?"12px":"20px";x.style.whiteSpace="nowrap";x.setAttribute("align","right");K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=H&&H()});K.className="geBtn";b.editor.cancelFirst&&x.appendChild(K);null!=M&&(Q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(M)}),Q.className="geBtn",x.appendChild(Q));mxEvent.addListener(B,"keypress",function(D){13==D.keyCode&&I.click()});x.appendChild(I);b.editor.cancelFirst||x.appendChild(K);
+v.appendChild(x);g.appendChild(v);f.appendChild(g);this.container=f};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(b,e,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 C=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&&e.value.toLowerCase().substring(e.value.length-
+k[p].ext.length-1)=="."+k[p].ext){l.setAttribute("title",mxResources.get(k[p].title));break}};mxEvent.addListener(e,"keyup",C);mxEvent.addListener(e,"change",C);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)});
+C();return l};
+FilenameDialog.createFileTypes=function(b,e,k){var l=document.createElement("select");for(b=0;b<k.length;b++){var C=document.createElement("option");C.setAttribute("value",b);mxUtils.write(C,mxResources.get(k[b].description)+" (."+k[b].extension+")");l.appendChild(C)}mxEvent.addListener(l,"change",function(p){p=k[l.value].extension;var E=e.value.lastIndexOf(".drawio.");E=0<E?E:e.value.lastIndexOf(".");"drawio"!=p&&(p="drawio."+p);e.value=0<E?e.value.substring(0,E+1)+p:e.value+"."+p;"createEvent"in
+document?(p=document.createEvent("HTMLEvents"),p.initEvent("change",!1,!0),e.dispatchEvent(p)):e.fireEvent("onchange")});b=function(p){p=e.value.toLowerCase();for(var E=0,M=0;M<k.length;M++){var S=k[M].extension,H=null;"drawio"!=S&&(H=S,S=".drawio."+S);if(p.substring(p.length-S.length-1)=="."+S||null!=H&&p.substring(p.length-H.length-1)=="."+H){E=M;break}}l.value=E};mxEvent.addListener(e,"change",b);mxEvent.addListener(e,"keyup",b);b();return l};
+var WrapperWindow=function(b,e,k,l,C,p,E){var M=b.createSidebarContainer();E(M);this.window=new mxWindow(e,M,k,l,C,p,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);b.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(S){null==S&&(S=window.event);return null!=S&&b.isSelectionAllowed(S)}))};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var M=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var S=E.container.firstChild;null!=S&&S.nodeType!=mxConstants.NODETYPE_ELEMENT;)S=S.nextSibling;null!=S&&(this.backgroundPageShape=this.createBackgroundPageShape(M),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),S.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,S),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(H){E.dblClick(H)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){null!=
E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(H)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(H))}),mxUtils.bind(this,function(H){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(H))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=M,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2068,29 +2068,29 @@ 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),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;
-mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var e=B.apply(this,arguments);null==Q||Q||mxEvent.addListener(e,"mousedown",function(f){mxEvent.consume(f)});return e};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(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,d=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*d,Q.height*d),v=(E=E&&Math.min(g.width,g.height)>this.minPageBreakDist)?Math.ceil(S/g.height)-1:0,x=E?Math.ceil(M/g.width)-1:0,B=f.x+M,
+I=f.y+S;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(D){if(null!=D){for(var N=D==this.horizontalPageBreaks?v:x,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(B),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 e=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 e.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 d=Math.floor(Math.min(0,S)/H);return new mxRectangle(this.scale*(this.translate.x+K*Q),this.scale*(this.translate.y+d*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)-d)*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 C=mxPopupMenu.prototype.addItem;
+mxPopupMenu.prototype.addItem=function(E,M,S,H,K,Q){var d=C.apply(this,arguments);null==Q||Q||mxEvent.addListener(d,"mousedown",function(f){mxEvent.consume(f)});return d};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(E,M,S){var H=this.graph.model.getParent(E);if(M){var K=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);K=!this.graph.model.isEdge(H)&&!this.graph.isSiblingSelected(E)&&(null!=K&&K.relative||!this.graph.isContainer(H)||
this.graph.isPart(E))}else if(K=p.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))K=H,this.graph.isTable(K)||(K=this.graph.model.getParent(K)),K=!this.graph.selectionCellsHandler.isHandled(K)||this.graph.isCellSelected(K)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(H);return K};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();
-for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,d,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=d||document.body;var l=this.editor.graph;l.lightbox=k;var B=l.getGraphBounds;l.getGraphBounds=function(){var R=B.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.useCssTransforms&&(this.lazyZoomDelay=
+for(var M=this.graph.getModel(),S=M.getParent(E),H=this.graph.view.getState(S),K=this.graph.isCellSelected(E);null!=H&&(M.isVertex(S)||M.isEdge(S));){var Q=this.graph.isCellSelected(S);K=K||Q;if(Q||!K&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=S;S=M.getParent(S)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var l=this.editor.graph;l.lightbox=k;var C=l.getGraphBounds;l.getGraphBounds=function(){var R=C.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var Z=this.view.translate,la=this.view.scale;R=mxRectangle.fromRectangle(R);R.add(new mxRectangle((Z.x+Y.x)*la,(Z.y+Y.y)*la,Y.width*la,Y.height*la))}return R};l.useCssTransforms&&(this.lazyZoomDelay=
0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(R,Y){this.clearSelectionState()});l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
l.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);l.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);l.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);l.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,l.isEnabled=function(){return!1},l.panningHandler.isForcePanningEvent=function(R){return!mxEvent.isPopupTrigger(R.getEvent())});this.actions=new Actions(this);this.menus=
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 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=
+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(e=0;e<K.length;e++)0>mxUtils.indexOf(p,K[e])&&p.push(K[e]);var Q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),d=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing",
+"targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<d.length;e++)for(k=0;k<d[e].length;k++)p.push(d[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(p,E[e])&&p.push(E[e]);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<d.length;T++){var Aa=d[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 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||
+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?(e=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",
+e):this.diagramContainer.oncontextmenu=e):l.panningHandler.usePopupTrigger=!1;l.init(this.diagramContainer);mxClient.IS_SVG&&null!=l.view.getDrawPane()&&(e=l.view.getDrawPane().ownerSVGElement,null!=e&&(e.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 x=!1,B=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(R,Y){return x||B.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):(x=!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="";x=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var I=l.panningHandler.isForcePanningEvent;l.panningHandler.isForcePanningEvent=function(R){return I.apply(this,arguments)||x||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 x||
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;
@@ -2104,122 +2104,122 @@ l.currentEdgeStyle.edgeStyle||"none"==l.currentEdgeStyle.edgeStyle||null==l.curr
0<R.length&&l.getModel().setVisible(Y,!0)});this.gestureHandler=mxUtils.bind(this,function(R){null!=this.currentMenu&&mxEvent.getSource(R)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){l.view.validateBackground()}));this.addListener("backgroundColorChanged",
mxUtils.bind(this,function(){l.view.validateBackground()}));l.addListener("gridSizeChanged",mxUtils.bind(this,function(){l.isGridEnabled()&&l.view.validateBackground()}));this.editor.resetGraph()}this.init();l.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(b,d,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function B(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=B(b);var E=l(b,4);if(null!=d&&d(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
+EditorUi.parsePng=function(b,e,k){function l(M,S){var H=p;p+=S;return M.substring(H,p)}function C(M){M=l(M,4);return M.charCodeAt(3)+(M.charCodeAt(2)<<8)+(M.charCodeAt(1)<<16)+(M.charCodeAt(0)<<24)}var p=0;if(l(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(l(b,4),"IHDR"!=l(b,4))null!=k&&k();else{l(b,17);do{k=C(b);var E=l(b,4);if(null!=e&&e(p-8,E,k))break;value=l(b,k);l(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(b.container,"scroll",mxUtils.bind(this,function(){b.tooltipHandler.hide();null!=b.connectionHandler&&null!=b.connectionHandler.constraintHandler&&b.connectionHandler.constraintHandler.reset()}));b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){b.tooltipHandler.hide();var l=b.getRubberband();null!=l&&l.cancel()}));mxEvent.addListener(b.container,
-"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var d=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){d.apply(this,
+"keydown",mxUtils.bind(this,function(l){this.onKeyDown(l)}));mxEvent.addListener(b.container,"keypress",mxUtils.bind(this,function(l){this.onKeyPress(l)}));this.addUndoListener();this.addBeforeUnloadListener();b.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));b.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var e=b.setDefaultParent,k=this;this.editor.graph.setDefaultParent=function(){e.apply(this,
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,d=b.getSelectionCells(),k=this.initSelectionState(),l=!0,B=0;B<d.length;B++){var p=b.getCurrentCellStyle(d[B]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,d[B],d,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
+EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),l=!0,C=0;C<e.length;C++){var p=b.getCurrentCellStyle(e[C]);"0"!=mxUtils.getValue(p,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[C],e,l),l=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var d=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(d[0]),B=k.getParent(l),p=l.getIndex(d[0]),E=B.getIndex(l),M=null,S=1,H=1,K=0,Q=E<B.getChildCount()-1?k.getChildAt(k.getChildAt(B,E+1),p):null;K<d.length-1;){var e=d[++K];null==Q||Q!=e||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<B.getChildCount()?k.getChildAt(k.getChildAt(B,E+H),p):null);var f=this.editor.graph.view.getState(e);
-if(e==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=d[0],b.colspan=S,b.rowspan=H)}};
-EditorUi.prototype.updateSelectionStateForCell=function(b,d,k,l){k=this.editor.graph;b.cells.push(d);if(k.getModel().isVertex(d)){b.connections=0<k.model.getEdgeCount(d);b.unlocked=b.unlocked&&!k.isCellLocked(d);b.resizable=b.resizable&&k.isCellResizable(d);b.rotatable=b.rotatable&&k.isCellRotatable(d);b.movable=b.movable&&k.isCellMovable(d)&&!k.isTableRow(d)&&!k.isTableCell(d);b.swimlane=b.swimlane||k.isSwimlane(d);b.table=b.table||k.isTable(d);b.cell=b.cell||k.isTableCell(d);b.row=b.row||k.isTableRow(d);
-b.vertices.push(d);var B=k.getCellGeometry(d);if(null!=B&&(0<B.width?null==b.width?b.width=B.width:b.width!=B.width&&(b.width=""):b.containsLabel=!0,0<B.height?null==b.height?b.height=B.height:b.height!=B.height&&(b.height=""):b.containsLabel=!0,!B.relative||null!=B.offset)){var p=B.relative?B.offset.x:B.x;B=B.relative?B.offset.y:B.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=B:b.y!=B&&(b.y="")}}else k.getModel().isEdge(d)&&(b.edges.push(d),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
-!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 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};
-EditorUi.prototype.createShapePicker=function(b,d,k,l,B,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");B=K.view.getState(k);var Q=null==k||null!=B&&K.isTransparentState(B)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+d+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(e){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(Q,[e]):H.insertHandler([e],""!=e.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([e],25,25,f,null,!0,!1,e.geometry.width,e.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(e);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-e.geometry.width/2);g.geometry.y=K.snap(Math.round(d/K.view.scale)-K.view.translate.y-e.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
-K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(B=0;B<(M?Math.min(E.length,4):E.length);B++)k(E[B]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,d-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
-EditorUi.prototype.getCellsForShapePicker=function(b,d){d=mxUtils.bind(this,function(k,l,B,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,B||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):d("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),d("whiteSpace=wrap;html=1;"),d("ellipse;whiteSpace=wrap;html=1;"),d("rhombus;whiteSpace=wrap;html=1;",80,80),d("rounded=1;whiteSpace=wrap;html=1;"),d("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
-d("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),d("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),d("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),d("triangle;whiteSpace=wrap;html=1;",60,80),d("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),d("shape=tape;whiteSpace=wrap;html=1;",120,100),d("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
-120,80),d("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),d("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(b){var d=this.editor.graph;if(9==b.which&&d.isEnabled()&&!mxEvent.isControlDown(b)){if(d.isEditing())if(mxEvent.isAltDown(b))d.stopEditing(!1);else try{var k=d.cellEditor.isContentEditing()&&d.cellEditor.isTextSelected();if(window.getSelection&&d.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),B=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=B&&("LI"==B.nodeName||null!=B.parentNode&&"LI"==
-B.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?d.stopEditing(!1):d.cellEditor.insertTab(d.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?d.selectParentCell():d.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
-EditorUi.prototype.onKeyPress=function(b){var d=this.editor.graph;!this.isImmediateEditingEvent(b)||d.isEditing()||d.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(d.escape(),d.startEditing(),mxClient.IS_FF&&(d=d.cellEditor,null!=d.textarea&&(d.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(d.textarea),b.collapse(!1),d=window.getSelection(),d.removeAllRanges(),d.addRange(b))))};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,l=k.getParent(e[0]),C=k.getParent(l),p=l.getIndex(e[0]),E=C.getIndex(l),M=null,S=1,H=1,K=0,Q=E<C.getChildCount()-1?k.getChildAt(k.getChildAt(C,E+1),p):null;K<e.length-1;){var d=e[++K];null==Q||Q!=d||null!=M&&S!=M||(M=S,S=0,H++,l=k.getParent(Q),Q=E+H<C.getChildCount()?k.getChildAt(k.getChildAt(C,E+H),p):null);var f=this.editor.graph.view.getState(d);
+if(d==k.getChildAt(l,p+S)&&null!=f&&1==mxUtils.getValue(f.style,"colspan",1)&&1==mxUtils.getValue(f.style,"rowspan",1))S++;else break}K==H*S-1&&(b.mergeCell=e[0],b.colspan=S,b.rowspan=H)}};
+EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,l){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
+b.vertices.push(e);var C=k.getCellGeometry(e);if(null!=C&&(0<C.width?null==b.width?b.width=C.width:b.width!=C.width&&(b.width=""):b.containsLabel=!0,0<C.height?null==b.height?b.height=C.height:b.height!=C.height&&(b.height=""):b.containsLabel=!0,!C.relative||null!=C.offset)){var p=C.relative?C.offset.x:C.x;C=C.relative?C.offset.y:C.y;null==b.x?b.x=p:b.x!=p&&(b.x="");null==b.y?b.y=C:b.y!=C&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
+!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),p=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==p,k.mergeStyle(e.style,b.style,l))};
+EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(S,H){"mouseDown"==H.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.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!=e.shapePicker};var C=b.dblClick;b.dblClick=function(S,H){if(this.isEnabled())if(null!=H||null==e.sidebar||mxEvent.isShiftDown(S)||b.isCellLocked(b.getDefaultParent()))C.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(){e.showShapePicker(K.x,K.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var p=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.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(d,f,g){var v=b.getCompositeParent(S.cell);d=b.getCellGeometry(v);for(K.consume();null!=v&&b.model.isVertex(v)&&null!=d&&d.relative;)cell=
+v,v=b.model.getParent(cell),d=b.getCellGeometry(v);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(K.getGraphX(),K.getGraphY(),v,mxUtils.bind(this,function(x){g(x);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(x))}),H)}),30)}),mxUtils.bind(this,function(d){this.graph.selectCellsForConnectVertex(d,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"),d=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),x=e.showShapePicker(g,f,v,mxUtils.bind(this,function(B){null!=B&&b.connectVertex(v,Q,b.defaultEdgeLength,d,!0,!0,function(I,D,N){N(B);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(B))},
+function(I){b.selectCellsForConnectVertex(I)},d,this.hoverIcons)}),Q,!0);this.centerShapePicker(x,K,g,f,Q);mxUtils.setOpacity(x,30);mxEvent.addListener(x,"mouseenter",function(){mxUtils.setOpacity(x,100)});mxEvent.addListener(x,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(S,H){null!=M&&window.clearTimeout(M)}))}};
+EditorUi.prototype.centerShapePicker=function(b,e,k,l,C){if(C==mxConstants.DIRECTION_EAST||C==mxConstants.DIRECTION_WEST)b.style.width="40px";var p=b.getBoundingClientRect();C==mxConstants.DIRECTION_NORTH?(k-=p.width/2-10,l-=p.height+6):C==mxConstants.DIRECTION_SOUTH?(k-=p.width/2-10,l+=e.height+6):C==mxConstants.DIRECTION_WEST?(k-=p.width+6,l-=p.height/2-10):C==mxConstants.DIRECTION_EAST&&(k+=e.width+6,l-=p.height/2-10);b.style.left=k+"px";b.style.top=l+"px"};
+EditorUi.prototype.showShapePicker=function(b,e,k,l,C,p){b=this.createShapePicker(b,e,k,l,C,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};
+EditorUi.prototype.createShapePicker=function(b,e,k,l,C,p,E,M){var S=null;if(null!=E&&0<E.length){var H=this,K=this.editor.graph;S=document.createElement("div");C=K.view.getState(k);var Q=null==k||null!=C&&K.isTransparentState(C)?null:K.copyStyle(k);k=6>E.length?35*E.length:140;S.className="geToolbarContainer geSidebarContainer";S.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";M||mxUtils.setPrefixedStyle(S.style,"transform","translate(-22px,-22px)");null!=K.background&&K.background!=mxConstants.NONE&&(S.style.backgroundColor=K.background);K.container.appendChild(S);k=mxUtils.bind(this,function(d){var f=document.createElement("a");f.className="geItem";f.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";S.appendChild(f);null!=Q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(Q,[d]):H.insertHandler([d],""!=d.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([d],25,25,f,null,!0,!1,d.geometry.width,d.geometry.height);mxEvent.addListener(f,"click",function(){var g=K.cloneCell(d);if(null!=l)l(g);else{g.geometry.x=K.snap(Math.round(b/K.view.scale)-K.view.translate.x-d.geometry.width/2);g.geometry.y=K.snap(Math.round(e/K.view.scale)-K.view.translate.y-d.geometry.height/2);K.model.beginUpdate();try{K.addCell(g)}finally{K.model.endUpdate()}K.setSelectionCell(g);
+K.scrollCellToVisible(g);K.startEditingAtCell(g);null!=H.hoverIcons&&H.hoverIcons.update(K.view.getState(g))}null!=p&&p()})});for(C=0;C<(M?Math.min(E.length,4):E.length);C++)k(E[C]);E=S.offsetTop+S.clientHeight-(K.container.scrollTop+K.container.offsetHeight);0<E&&(S.style.top=Math.max(K.container.scrollTop+22,e-E)+"px");E=S.offsetLeft+S.clientWidth-(K.container.scrollLeft+K.container.offsetWidth);0<E&&(S.style.left=Math.max(K.container.scrollLeft+22,b-E)+"px")}return S};
+EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,l,C,p){return this.editor.graph.createVertex(null,null,p||"",0,0,l||120,C||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
+120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
+EditorUi.prototype.onKeyDown=function(b){var e=this.editor.graph;if(9==b.which&&e.isEnabled()&&!mxEvent.isControlDown(b)){if(e.isEditing())if(mxEvent.isAltDown(b))e.stopEditing(!1);else try{var k=e.cellEditor.isContentEditing()&&e.cellEditor.isTextSelected();if(window.getSelection&&e.cellEditor.isContentEditing()&&!k&&!mxClient.IS_IE&&!mxClient.IS_IE11){var l=window.getSelection(),C=0<l.rangeCount?l.getRangeAt(0).commonAncestorContainer:null;k=null!=C&&("LI"==C.nodeName||null!=C.parentNode&&"LI"==
+C.parentNode.nodeName)}k?document.execCommand(mxEvent.isShiftDown(b)?"outdent":"indent",!1,null):mxEvent.isShiftDown(b)?e.stopEditing(!1):e.cellEditor.insertTab(e.cellEditor.isContentEditing()?null:4)}catch(p){}else mxEvent.isAltDown(b)?e.selectParentCell():e.selectCell(!mxEvent.isShiftDown(b));mxEvent.consume(b)}};
+EditorUi.prototype.onKeyPress=function(b){var e=this.editor.graph;!this.isImmediateEditingEvent(b)||e.isEditing()||e.isSelectionEmpty()||0===b.which||27===b.which||mxEvent.isAltDown(b)||mxEvent.isControlDown(b)||mxEvent.isMetaDown(b)||(e.escape(),e.startEditing(),mxClient.IS_FF&&(e=e.cellEditor,null!=e.textarea&&(e.textarea.innerHTML=String.fromCharCode(b.which),b=document.createRange(),b.selectNodeContents(e.textarea),b.collapse(!1),e=window.getSelection(),e.removeAllRanges(),e.addRange(b))))};
EditorUi.prototype.isImmediateEditingEvent=function(b){return!0};
-EditorUi.prototype.updateCssForMarker=function(b,d,k,l,B){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+d+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,B),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==d&&mxUtils.setPrefixedStyle(l.style,
+EditorUi.prototype.updateCssForMarker=function(b,e,k,l,C){b.style.verticalAlign="top";b.style.height="21px";b.style.width="21px";b.innerText="";"flexArrow"==k?b.className=null!=l&&l!=mxConstants.NONE?"geSprite geSprite-"+e+"blocktrans":"geSprite geSprite-noarrow":(k=this.getImageForMarker(l,C),null!=k?(l=document.createElement("img"),l.className="geAdaptiveAsset",l.style.position="absolute",l.style.marginTop="0.5px",l.setAttribute("src",k),b.className="","end"==e&&mxUtils.setPrefixedStyle(l.style,
"transform","scaleX(-1)"),b.appendChild(l)):(b.className="geSprite geSprite-noarrow",b.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),b.style.backgroundImage="none",b.style.verticalAlign="top",b.style.marginTop="4px",b.style.fontSize="10px",b.style.filter="none",b.style.color=this.defaultStrokeColor,b.nextSibling.style.marginTop="0px"))};
-EditorUi.prototype.getImageForMarker=function(b,d){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=d?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=d?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=d?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
-b==mxConstants.ARROW_BLOCK_THIN?k="1"!=d?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=d?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=d?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=d?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=d?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
-"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=d?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
+EditorUi.prototype.getImageForMarker=function(b,e){var k=null;b==mxConstants.ARROW_CLASSIC?k="1"!=e?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:b==mxConstants.ARROW_CLASSIC_THIN?k="1"!=e?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_OPEN?k=Format.openFilledMarkerImage.src:b==mxConstants.ARROW_OPEN_THIN?k=Format.openThinFilledMarkerImage.src:b==mxConstants.ARROW_BLOCK?k="1"!=e?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
+b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:b==mxConstants.ARROW_OVAL?k="1"!=e?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND?k="1"!=e?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:b==mxConstants.ARROW_DIAMOND_THIN?k="1"!=e?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==b?k="1"!=e?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
+"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
-EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,d=this.actions.get("paste"),k=this.actions.get("pasteHere");d.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(d.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,d=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):d.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
-0),e=0;e<H.length;e++){K.add(Q,H[e]);var f=p.view.getState(E[e]);if(null!=f){var g=p.getCellGeometry(H[e]);null!=g&&g.relative&&!K.isEdge(E[e])&&null==S[mxObjectIdentity.get(K.getParent(E[e]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
-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.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(p){p.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(p){var E=null;if(p.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||p.getSelectionCells();E=p.getExportableCells(p.model.getTopmostCells(E));for(var M={},S=p.createCellLookup(E),H=p.cloneCells(E,null,M),K=new mxGraphModel,Q=K.getChildAt(K.getRoot(),
+0),d=0;d<H.length;d++){K.add(Q,H[d]);var f=p.view.getState(E[d]);if(null!=f){var g=p.getCellGeometry(H[d]);null!=g&&g.relative&&!K.isEdge(E[d])&&null==S[mxObjectIdentity.get(K.getParent(E[d]))]&&(g.offset=null,g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(M,S),H);mxClipboard.insertCount=1;mxClipboard.setCells(H)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(p){var E=
+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 C=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,E){C.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(),aa=mxUtils.hasScrollbars(b.container),U=b.view.translate,da=b.view.scale,
+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 e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=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=
+"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 C=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++;
-var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=B.backBtn){var M=Graph.sanitizeLink(B.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
+var F=document.createElement("span");F.style.paddingLeft="8px";F.style.paddingRight="8px";F.style.cursor="pointer";mxEvent.addListener(F,"click",Z);null!=q&&F.setAttribute("title",q);Z=document.createElement("img");Z.setAttribute("border","0");Z.setAttribute("src",la);Z.style.width="36px";Z.style.filter="invert(100%)";F.appendChild(Z);this.chromelessToolbar.appendChild(F);return F});if(null!=C.backBtn){var M=Graph.sanitizeLink(C.backBtn.url);null!=M&&p(mxUtils.bind(this,function(Z){window.location.href=
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,
+"0px";var d=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",d);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,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=
+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)}),x=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 B=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=B.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);
-this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){C.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
-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),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)?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||
+this.layersDialog.style.zIndex=la.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(Z)}),Editor.layersImage,mxResources.get("layers")),I=b.getModel();I.addListener(mxEvent.CHANGE,function(){B.style.display=1<I.getChildCount(I.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(Z){null!=
+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(d=0;d<this.lightboxToolbarActions.length;d++){var D=this.lightboxToolbarActions[d];D.elem=p(D.fn,D.icon,D.tooltip)}if(null!=C.refreshBtn){var N=null==C.refreshBtn.url?null:Graph.sanitizeLink(C.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!=C.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(Z){C.fullscreenBtn.url?b.openLink(C.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(Z)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(C.closeBtn&&window.self===window.top||b.lightbox&&("1"==
+urlParams.close||this.container!=document.body))&&p(mxUtils.bind(this,function(Z){"1"==urlParams.close||C.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)||x(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():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(Z){mxEvent.isShiftDown(Z)?v():x(100);
+mxEvent.consume(Z)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(Z){mxEvent.isTouchEvent(Z)||x(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)?v():x(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,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=
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=F&&(null!=L&&(T+=la.x-L.x,aa+=la.y-L.y),null!=e&&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 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"))};
+(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(e){this.actions.get("print").funct();mxEvent.consume(e)}),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))};
+EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));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))};
EditorUi.prototype.isSelectionAllowed=function(b){return"SELECT"==mxEvent.getSource(b).nodeName||"INPUT"==mxEvent.getSource(b).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(b))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,d){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=d&&(this.editor.setFilename(d),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,d,k,l){this.editor.graph.popupMenuHandler.hideMenu();var B=new mxPopupMenu(b);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()});B.popup(d,k,null,l);this.setCurrentMenu(B)};
-EditorUi.prototype.setCurrentMenu=function(b,d){this.currentMenuElt=d;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
-EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var d=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);d==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
-EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var d=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==d?b+"?":b+"&",b+=k+"="+urlParams[k],d++;return b};
-EditorUi.prototype.setScrollbars=function(b){var d=this.editor.graph,k=d.container.style.overflow;d.scrollbars=b;this.editor.updateGraphComponents();k!=d.container.style.overflow&&(d.container.scrollTop=0,d.container.scrollLeft=0,d.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
-EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var d=b.getPagePadding();b.container.scrollTop=Math.floor(d.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(d.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
-1;d=b.getGraphBounds();0<d.width&&0<d.height&&(d.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(d.x+d.width-b.container.clientWidth,d.x-10)),d.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(d.y+d.height-b.container.clientHeight,d.y-10)))}else{d=b.getGraphBounds();var k=Math.max(d.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,d.y-Math.max(20,(b.container.clientHeight-Math.max(d.height,
-b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,d.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{d=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;d.x=d.x/l-k.x;d.y=d.y/l-k.y;d.width/=l;d.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-d.width)/2)-d.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-d.height)/4))-d.y+1))}};
-EditorUi.prototype.setPageVisible=function(b){var d=this.editor.graph,k=mxUtils.hasScrollbars(d.container),l=0,B=0;k&&(l=d.view.translate.x*d.view.scale-d.container.scrollLeft,B=d.view.translate.y*d.view.scale-d.container.scrollTop);d.pageVisible=b;d.pageBreaksVisible=b;d.preferPageSize=b;d.view.validateBackground();if(k){var p=d.getSelectionCells();d.clearSelection();d.setSelectionCells(p)}d.sizeDidChange();k&&(d.container.scrollLeft=d.view.translate.x*d.view.scale-l,d.container.scrollTop=d.view.translate.y*
-d.view.scale-B);d.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
-EditorUi.prototype.installResizeHandler=function(b,d,k){d&&(b.window.setSize=function(B,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;B=Math.min(B,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(B,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
-M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);B=Math.max(0,Math.min(B,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==B&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);d&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var B=b.window.getX(),p=b.window.getY();b.window.setLocation(B,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
-"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,d){this.ui=b;this.color=d}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
-function ChangePageSetup(b,d,k,l,B){this.ui=b;this.previousColor=this.color=d;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=B;this.ignoreImage=this.ignoreColor=!1}
-ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var d=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=d}if(!this.ignoreImage){this.image=this.previousImage;d=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=d}null!=this.previousFormat&&
-(this.format=this.previousFormat,d=b.pageFormat,this.previousFormat.width!=d.width||this.previousFormat.height!=d.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=d);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(d,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(b,e){try{var k=mxUtils.parseXml(b);this.editor.setGraphXml(k.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=e&&(this.editor.setFilename(e),this.updateDocumentTitle())}catch(l){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+l.message)}}))}catch(b){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(b,e,k,l){this.editor.graph.popupMenuHandler.hideMenu();var C=new mxPopupMenu(b);C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});C.popup(e,k,null,l);this.setCurrentMenu(C)};
+EditorUi.prototype.setCurrentMenu=function(b,e){this.currentMenuElt=e;this.currentMenu=b;this.hideShapePicker()};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var b=this.editor.getOrCreateFilename();null!=this.editor.appName&&(b+=" - "+this.editor.appName);document.title=b};
+EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(b){}};EditorUi.prototype.undo=function(){try{var b=this.editor.graph;if(b.isEditing()){var e=b.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);e==b.cellEditor.textarea.innerHTML&&(b.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(k){}};
+EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var e=0<b.indexOf("?")?1:0,k;for(k in urlParams)b=0==e?b+"?":b+"&",b+=k+"="+urlParams[k],e++;return b};
+EditorUi.prototype.setScrollbars=function(b){var e=this.editor.graph,k=e.container.style.overflow;e.scrollbars=b;this.editor.updateGraphComponents();k!=e.container.style.overflow&&(e.container.scrollTop=0,e.container.scrollLeft=0,e.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
+EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.editor.extendCanvas)b.container.scrollTop=0,b.container.scrollLeft=0,mxUtils.hasScrollbars(b.container)||b.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(b.container))if(b.pageVisible){var e=b.getPagePadding();b.container.scrollTop=Math.floor(e.y-this.editor.initialTopSpacing)-1;b.container.scrollLeft=Math.floor(Math.min(e.x,(b.container.scrollWidth-b.container.clientWidth)/2))-
+1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
+b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var l=b.view.scale;e.x=e.x/l-k.x;e.y=e.y/l-k.y;e.width/=l;e.height/=l;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
+EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),l=0,C=0;k&&(l=e.view.translate.x*e.view.scale-e.container.scrollLeft,C=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var p=e.getSelectionCells();e.clearSelection();e.setSelectionCells(p)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-l,e.container.scrollTop=e.view.translate.y*
+e.view.scale-C);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(C,p){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;C=Math.min(C,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());p=Math.min(p,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(C,p){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+M=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,S=parseInt(this.div.style.width),H=parseInt(this.div.style.height);C=Math.max(0,Math.min(C,E-S));p=Math.max(0,Math.min(p,M-H));this.getX()==C&&this.getY()==p||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(S,H)};var l=mxUtils.bind(this,function(){var C=b.window.getX(),p=b.window.getY();b.window.setLocation(C,p)});mxEvent.addListener(window,"resize",l);b.destroy=function(){mxEvent.removeListener(window,
+"resize",l);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}ChangeGridColor.prototype.execute=function(){var b=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=b};(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(b)})();
+function ChangePageSetup(b,e,k,l,C){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=l;this.previousPageScale=this.pageScale=C;this.ignoreImage=this.ignoreColor=!1}
+ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
+(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
+this.previousPageScale=b))};(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);b.afterDecode=function(e,k,l){l.previousColor=l.color;l.previousImage=l.image;l.previousFormat=l.format;l.previousPageScale=l.pageScale;null!=l.foldingEnabled&&(l.foldingEnabled=!l.foldingEnabled);return l};mxCodecRegistry.register(b)})();
EditorUi.prototype.setBackgroundColor=function(b){this.editor.graph.background=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(b){this.editor.graph.foldingEnabled=b;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
-EditorUi.prototype.setPageFormat=function(b,d){d=null!=d?d:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;d||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
+EditorUi.prototype.setPageFormat=function(b,e){e=null!=e?e:"1"==urlParams.sketch;this.editor.graph.pageFormat=b;e||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(b){this.editor.graph.pageScale=b;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(b){this.editor.graph.view.gridColor=b;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),d=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());d.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var B=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){B.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var b=this.actions.get("undo"),e=this.actions.get("redo"),k=this.editor.undoManager,l=mxUtils.bind(this,function(){b.setEnabled(this.canUndo());e.setEnabled(this.canRedo())});k.addListener(mxEvent.ADD,l);k.addListener(mxEvent.UNDO,l);k.addListener(mxEvent.REDO,l);k.addListener(mxEvent.CLEAR,l);var C=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){C.apply(this,arguments);l()};var p=this.editor.graph.cellEditor.stopEditing;
this.editor.graph.cellEditor.stopEditing=function(E,M){p.apply(this,arguments);l()};l()};
-EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,d=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),B=0;B<l.length;B++)this.actions.get(l[B]).setEnabled(0<d.cells.length);
-this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<d.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<d.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==d.cells.length);this.actions.get("sendBackward").setEnabled(1==
-d.cells.length);this.actions.get("rotation").setEnabled(1==d.vertices.length);this.actions.get("wordWrap").setEnabled(1==d.vertices.length);this.actions.get("autosize").setEnabled(0<d.vertices.length);this.actions.get("copySize").setEnabled(1==d.vertices.length);this.actions.get("clearWaypoints").setEnabled(d.connections);this.actions.get("curved").setEnabled(0<d.edges.length);this.actions.get("turn").setEnabled(0<d.cells.length);this.actions.get("group").setEnabled(!d.row&&!d.cell&&(1<d.cells.length||
-1==d.vertices.length&&0==b.model.getChildCount(d.cells[0])&&!b.isContainer(d.vertices[0])));this.actions.get("ungroup").setEnabled(!d.row&&!d.cell&&!d.table&&0<d.vertices.length&&(b.isContainer(d.vertices[0])||0<b.getModel().getChildCount(d.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==d.cells.length&&b.getModel().isVertex(b.getModel().getParent(d.cells[0])));this.actions.get("collapsible").setEnabled(1==d.vertices.length&&(0<b.model.getChildCount(d.vertices[0])||b.isContainer(d.vertices[0])));
-this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==d.cells.length&&b.isValidRoot(d.cells[0]));this.actions.get("editLink").setEnabled(1==d.cells.length);this.actions.get("openLink").setEnabled(1==d.cells.length&&null!=b.getLinkForCell(d.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
-this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==d.vertices.length&&b.isCellFoldable(d.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<d.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(d.unlocked&&1==d.vertices.length);this.menus.get("distribute").setEnabled(d.unlocked&&
-1<d.vertices.length);this.menus.get("align").setEnabled(d.unlocked&&0<d.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var d=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(d=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var B=Math.max(0,Math.min(this.hsplitPosition,
-d-this.splitSize-20));d=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",d+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",d+=this.toolbarHeight);0<d&&(d+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-d-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=B+"px";this.sidebarFooterContainer.style.height=
-p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=d+"px";this.sidebarContainer.style.width=B+"px";this.formatContainer.style.top=d+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?B+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=B+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");B=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",B=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
-this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=d+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+B+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.updateActionStates=function(){for(var b=this.editor.graph,e=this.getSelectionState(),k=b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()),l="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack solid dashed pasteSize dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded strokeColor sharp snapToGrid".split(" "),C=0;C<l.length;C++)this.actions.get(l[C]).setEnabled(0<e.cells.length);
+this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<e.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<e.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==b.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!b.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==e.cells.length);this.actions.get("sendBackward").setEnabled(1==
+e.cells.length);this.actions.get("rotation").setEnabled(1==e.vertices.length);this.actions.get("wordWrap").setEnabled(1==e.vertices.length);this.actions.get("autosize").setEnabled(0<e.vertices.length);this.actions.get("copySize").setEnabled(1==e.vertices.length);this.actions.get("clearWaypoints").setEnabled(e.connections);this.actions.get("curved").setEnabled(0<e.edges.length);this.actions.get("turn").setEnabled(0<e.cells.length);this.actions.get("group").setEnabled(!e.row&&!e.cell&&(1<e.cells.length||
+1==e.vertices.length&&0==b.model.getChildCount(e.cells[0])&&!b.isContainer(e.vertices[0])));this.actions.get("ungroup").setEnabled(!e.row&&!e.cell&&!e.table&&0<e.vertices.length&&(b.isContainer(e.vertices[0])||0<b.getModel().getChildCount(e.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==e.cells.length&&b.getModel().isVertex(b.getModel().getParent(e.cells[0])));this.actions.get("collapsible").setEnabled(1==e.vertices.length&&(0<b.model.getChildCount(e.vertices[0])||b.isContainer(e.vertices[0])));
+this.actions.get("exitGroup").setEnabled(null!=b.view.currentRoot);this.actions.get("home").setEnabled(null!=b.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==e.cells.length&&b.isValidRoot(e.cells[0]));this.actions.get("editLink").setEnabled(1==e.cells.length);this.actions.get("openLink").setEnabled(1==e.cells.length&&null!=b.getLinkForCell(e.cells[0]));this.actions.get("guides").setEnabled(b.isEnabled());this.actions.get("selectVertices").setEnabled(k);this.actions.get("selectEdges").setEnabled(k);
+this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEnabled(k);l=1==e.vertices.length&&b.isCellFoldable(e.vertices[0]);this.actions.get("expand").setEnabled(l);this.actions.get("collapse").setEnabled(l);this.menus.get("navigation").setEnabled(0<e.cells.length||null!=b.view.currentRoot);this.menus.get("layout").setEnabled(k);this.menus.get("insert").setEnabled(k);this.menus.get("direction").setEnabled(e.unlocked&&1==e.vertices.length);this.menus.get("distribute").setEnabled(e.unlocked&&
+1<e.vertices.length);this.menus.get("align").setEnabled(e.unlocked&&0<e.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
+EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var l=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(l=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var C=Math.max(0,Math.min(this.hsplitPosition,
+e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var p=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+l;p=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=C+"px";this.sidebarFooterContainer.style.height=
+p+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=C+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var M=null!=this.hsplit.parentNode?C+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
+this.hsplit.style.bottom=this.footerHeight+l+"px";this.hsplit.style.left=C+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=M+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=l+"px");C=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+l+"px",this.tabContainer.style.right=k+"px",C=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+p+l+"px";this.formatContainer.style.bottom=
+this.footerHeight+l+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=M+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+l+C+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};
@@ -2227,61 +2227,65 @@ EditorUi.prototype.createSidebarContainer=function(){var b=document.createElemen
EditorUi.prototype.createUi=function(){this.menubar=this.editor.chromeless?null:this.menus.createMenubar(this.createDiv("geMenubar"));null!=this.menubar&&this.menubarContainer.appendChild(this.menubar.container);null!=this.menubar&&(this.statusContainer=this.createStatusContainer(),this.editor.addListener("statusChanged",mxUtils.bind(this,function(){this.setStatusText(this.editor.getStatus())})),this.setStatusText(this.editor.getStatus()),this.menubar.container.appendChild(this.statusContainer),this.container.appendChild(this.menubarContainer));
this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContainer);null!=this.sidebar&&this.container.appendChild(this.sidebarContainer);this.format=this.editor.chromeless||!this.formatEnabled?null:this.createFormat(this.formatContainer);null!=this.format&&this.container.appendChild(this.formatContainer);var b=this.editor.chromeless?null:this.createFooter();null!=b&&(this.footerContainer.appendChild(b),this.container.appendChild(this.footerContainer));null!=this.sidebar&&this.sidebarFooterContainer&&
this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
-!0,0,mxUtils.bind(this,function(d){this.hsplitPosition=d;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
-EditorUi.prototype.createStatusDiv=function(b){var d=document.createElement("div");d.setAttribute("title",b);d.innerHTML=b;return d};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
-EditorUi.prototype.createDiv=function(b){var d=document.createElement("div");d.className=b;return d};
-EditorUi.prototype.addSplitHandler=function(b,d,k,l){function B(Q){if(null!=E){var e=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(d?e.x-E.x:E.y-e.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){B(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(d?b.style.left:b.style.bottom);d||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
-mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var e=null!=H?H-k:0;H=K();l(e);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,B,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,B,p)})};
-EditorUi.prototype.prompt=function(b,d,k){b=new FilenameDialog(this,d,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
-EditorUi.prototype.handleError=function(b,d,k,l,B){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=d){B=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");d=null!=d?d:mxResources.get("error");null!=b&&null!=b.message&&(B=mxUtils.htmlEntities(b.message));this.showError(d,B,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,d,k,l,B,p,E,M,S,H,K,Q,e){b=new ErrorDialog(this,b,d,k||mxResources.get("ok"),l,B,p,E,Q,M,S);d=Math.ceil(null!=d?d.length/50:1);this.showDialog(b.container,H||340,K||100+20*d,!0,!1,e);b.init()};EditorUi.prototype.showDialog=function(b,d,k,l,B,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,d,k,l,B,p,E,M,S,H);this.dialogs.push(this.dialog)};
-EditorUi.prototype.hideDialog=function(b,d,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,d)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var d=b.getSelectionCells(),k=new mxDictionary,l=[],B=0;B<d.length;B++){var p=b.isTableCell(d[B])?b.model.getParent(d[B]):d[B];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
-EditorUi.prototype.pickColor=function(b,d){var k=this.editor.graph,l=k.cellEditor.saveSelection(),B=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);d(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,B,!0,!1);b.init()};
+!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};
+EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";mxEvent.addListener(b,"click",mxUtils.bind(this,function(e){var k=mxEvent.getSource(e),l=k.getAttribute("data-action");if("statusFunction"==l&&null!=this.editor.statusFunction)this.editor.statusFunction();else if(null!=l)k=this.actions.get(l),null!=k&&k.funct();else{l=k.getAttribute("data-title");var C=k.getAttribute("data-message");null!=l&&null!=C?this.showError(l,C):(k=k.getAttribute("data-link"),
+null!=k&&this.editor.graph.openLink(k))}mxEvent.consume(e)}));return b};
+EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&null!=b&&0<b.length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b));b=this.statusContainer.querySelectorAll('[data-effect="fade"]');if(null!=b)for(var e=0;e<b.length;e++)(function(k){mxUtils.setOpacity(k,0);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setPrefixedStyle(k.style,"transition","all 0.2s ease");
+window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(k,100);mxUtils.setPrefixedStyle(k.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(k.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(k.style,"transform","scaleX(0)");mxUtils.setOpacity(k,0);window.setTimeout(mxUtils.bind(this,function(){null!=k.parentNode&&k.parentNode.removeChild(k)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(b[e])};
+EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
+EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
+EditorUi.prototype.addSplitHandler=function(b,e,k,l){function C(Q){if(null!=E){var d=new mxPoint(mxEvent.getClientX(Q),mxEvent.getClientY(Q));l(Math.max(0,M+(e?d.x-E.x:E.y-d.y)-k));mxEvent.consume(Q);M!=K()&&(S=!0,H=null)}}function p(Q){C(Q);E=M=null}var E=null,M=null,S=!0,H=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var K=mxUtils.bind(this,function(){var Q=parseInt(e?b.style.left:b.style.bottom);e||(Q=Q+k-this.footerHeight);return Q});mxEvent.addGestureListeners(b,function(Q){E=new mxPoint(mxEvent.getClientX(Q),
+mxEvent.getClientY(Q));M=K();S=!1;mxEvent.consume(Q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(Q){if(!S&&this.hsplitClickEnabled){var d=null!=H?H-k:0;H=K();l(d);mxEvent.consume(Q)}}));mxEvent.addGestureListeners(document,null,C,p);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,C,p)})};
+EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(l){k(parseFloat(l))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
+EditorUi.prototype.handleError=function(b,e,k,l,C){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){C=mxUtils.htmlEntities(mxResources.get("unknownError"));var p=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(C=mxUtils.htmlEntities(b.message));this.showError(e,C,p,k,null,null,null,null,null,null,null,null,l?k:null)}else null!=k&&k()};
+EditorUi.prototype.showError=function(b,e,k,l,C,p,E,M,S,H,K,Q,d){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),l,C,p,E,Q,M,S);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,H||340,K||100+20*e,!0,!1,d);b.init()};EditorUi.prototype.showDialog=function(b,e,k,l,C,p,E,M,S,H){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,l,C,p,E,M,S,H);this.dialogs.push(this.dialog)};
+EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,l=[],C=0;C<e.length;C++){var p=b.isTableCell(e[C])?b.model.getParent(e[C]):e[C];null==p||k.get(p)||(k.put(p,!0),l.push(p))}b.setSelectionCells(b.duplicateCells(l,!1))}catch(E){this.handleError(E)}};
+EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,l=k.cellEditor.saveSelection(),C=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(p){k.cellEditor.restoreSelection(l);e(p)},function(){k.cellEditor.restoreSelection(l)});this.showDialog(b.container,230,C,!0,!1);b.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(b){this.hideDialog(b)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(b){var d=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(d=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(B){}return d};
-EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(d){null!=d?b(d):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,d){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==d&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(B){try{var p=this.parseHtmlData(B),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
-0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(B){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==d&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(B){b(B)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var l=b.lastIndexOf("&lt;/mxGraphModel&gt;");l>k&&(e=b.substring(k,l+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(C){}return e};
+EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var l=decodeURIComponent(k);this.isCompatibleString(l)&&(k=l)}b(k)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(l){l.text().then(mxUtils.bind(this,function(C){try{var p=this.parseHtmlData(C),E="text/plain"!=p.getAttribute("data-type")?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);try{var M=E.lastIndexOf("%3E");
+0<=M&&M<E.length-3&&(E=E.substring(0,M+3))}catch(K){}try{var S=p.getElementsByTagName("span"),H=null!=S&&0<S.length?mxUtils.trim(decodeURIComponent(S[0].textContent)):decodeURIComponent(E);this.isCompatibleString(H)&&(E=H)}catch(K){}}catch(K){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(C){b(null)})}))["catch"](function(l){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(l){l.text().then(function(C){b(C)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
-EditorUi.prototype.parseHtmlData=function(b){var d=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);d=document.createElement("div");d.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=d.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=d.firstChild&&d.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=d.firstChild.nextSibling&&d.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
-d.firstChild.nodeName&&"A"==d.firstChild.nextSibling.nodeName&&null==d.firstChild.nextSibling.nextSibling&&(b=null==d.firstChild.nextSibling.innerText?mxUtils.getTextContent(d.firstChild.nextSibling):d.firstChild.nextSibling.innerText,b==d.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(d,b),asHtml=!1));k=k&&null!=d.firstChild?d.firstChild.nextSibling:d.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
-null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)):(k=d.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==d&&1==d.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(d,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(d)}asHtml||d.setAttribute("data-type","text/plain");return d};
-EditorUi.prototype.extractGraphModelFromEvent=function(b){var d=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
-(d=k);return d};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(d){this.save(d)}),null,mxUtils.bind(this,function(d){if(null!=d&&0<d.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
-EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,d);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(d.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(d))).simulate(document,
-"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(d);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(b,d){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,d)};
-EditorUi.prototype.executeLayout=function(b,d,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(B){throw B;}finally{this.allowAnimation&&d&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
-EditorUi.prototype.showImageDialog=function(b,d,k,l){l=this.editor.graph.cellEditor;var B=l.saveSelection(),p=mxUtils.prompt(b,d);l.restoreSelection(B);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,d,k){b=new LinkDialog(this,b,d,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
+EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
+e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
+null!=b&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)):(k=e.getElementsByTagName("img"),1==k.length&&(k=k[0],b=k.getAttribute("src"),null!=b&&k.parentNode==e&&1==e.children.length&&(Editor.isPngDataUrl(b)&&(k=Editor.extractGraphModelFromPng(b),null!=k&&0<k.length&&(b=k)),mxUtils.setTextContent(e,b),asHtml=!1)));asHtml&&Graph.removePasteFormatting(e)}asHtml||e.setAttribute("data-type","text/plain");return e};
+EditorUi.prototype.extractGraphModelFromEvent=function(b){var e=null,k=null;null!=b&&(b=null!=b.dataTransfer?b.dataTransfer:b.clipboardData,null!=b&&(10==document.documentMode||11==document.documentMode?k=b.getData("Text"):(k=0<=mxUtils.indexOf(b.types,"text/html")?b.getData("text/html"):null,0<=mxUtils.indexOf(b.types,"text/plain")&&(null==k||0==k.length)&&(k=b.getData("text/plain"))),null!=k&&(k=Graph.zapGremlins(mxUtils.trim(k)),b=this.extractGraphModelFromHtml(k),null!=b&&(k=b))));null!=k&&this.isCompatibleString(k)&&
+(e=k);return e};EditorUi.prototype.isCompatibleString=function(b){return!1};EditorUi.prototype.saveFile=function(b){b||null==this.editor.filename?(b=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(e){this.save(e)}),null,mxUtils.bind(this,function(e){if(null!=e&&0<e.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(b.container,300,100,!0,!0),b.init()):this.save(this.editor.getOrCreateFilename())};
+EditorUi.prototype.save=function(b){if(null!=b){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var e=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(b)&&!mxUtils.confirm(mxResources.get("replaceIt",[b])))return;localStorage.setItem(b,e);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(e.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&xml="+encodeURIComponent(e))).simulate(document,
+"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(e);return}this.editor.setModified(!1);this.editor.setFilename(b);this.updateDocumentTitle()}catch(k){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
+EditorUi.prototype.executeLayouts=function(b,e){this.executeLayout(mxUtils.bind(this,function(){var k=new mxCompositeLayout(this.editor.graph,b),l=this.editor.graph.getSelectionCells();k.execute(this.editor.graph.getDefaultParent(),0==l.length?null:l)}),!0,e)};
+EditorUi.prototype.executeLayout=function(b,e,k){var l=this.editor.graph;l.getModel().beginUpdate();try{b()}catch(C){throw C;}finally{this.allowAnimation&&e&&l.isEnabled()?(b=new mxMorphing(l),b.addListener(mxEvent.DONE,mxUtils.bind(this,function(){l.getModel().endUpdate();null!=k&&k()})),b.startAnimation()):(l.getModel().endUpdate(),null!=k&&k())}};
+EditorUi.prototype.showImageDialog=function(b,e,k,l){l=this.editor.graph.cellEditor;var C=l.saveSelection(),p=mxUtils.prompt(b,e);l.restoreSelection(C);if(null!=p&&0<p.length){var E=new Image;E.onload=function(){k(p,E.width,E.height)};E.onerror=function(){k(null);mxUtils.alert(mxResources.get("fileNotFound"))};E.src=p}else k(null)};EditorUi.prototype.showLinkDialog=function(b,e,k){b=new LinkDialog(this,b,e,k);this.showDialog(b.container,420,90,!0,!0);b.init()};
EditorUi.prototype.showDataDialog=function(b){null!=b&&(b=new EditDataDialog(this,b),this.showDialog(b.container,480,420,!0,!1,null,!1),b.init())};
-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.showBackgroundImageDialog=function(b,e){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!=e?e.src:"");null!=k&&0<k.length?(e=new Image,e.onload=function(){b(new mxImage(k,e.width,e.height),!1)},e.onerror=function(){b(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},e.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,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
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()),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 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,
-!0,"underline"),B.bindAction(85,!0,"ungroup",!0),B.bindAction(190,!0,"superscript"),B.bindAction(188,!0,"subscript"),B.bindAction(13,!1,"keyPressEnter"),B.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?B.bindAction(89,!0,"redo"):B.bindAction(90,!0,"redo",!0);return B};
+EditorUi.prototype.createKeyHandler=function(b){function e(Q,d,f){if(!l.isSelectionEmpty()&&l.isEnabled()){d=null!=d?d: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 x=l.getCellGeometry(g[v]);null!=x&&(x=x.clone(),37==Q?x.width=Math.max(0,x.width-d):38==Q?x.height=Math.max(0,x.height-d):39==Q?x.width+=d:40==Q&&(x.height+=d),l.getModel().setGeometry(g[v],
+x))}}finally{l.getModel().endUpdate()}}else{x=l.model.getParent(v);var B=l.getView().scale;f=null;1==l.getSelectionCount()&&l.model.isVertex(v)&&null!=l.layoutManager&&!l.isCellLocked(v)&&(f=l.layoutManager.getLayout(x));if(null!=f&&f.constructor==mxStackLayout)d=x.getIndex(v),37==Q||38==Q?l.model.add(x,v,Math.max(0,d-1)):(39==Q||40==Q)&&l.model.add(x,v,Math.min(l.model.getChildCount(x),d+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=-d:38==
+Q?v=-d:39==Q?g=d:40==Q&&(v=d),I.currentDx+=g*B,I.currentDy+=v*B,I.checkPreview(),I.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=I.first){var D=I.roundLength(I.currentDx/B),N=I.roundLength(I.currentDy/B);I.moveCells(I.cells,D,N);I.reset()}},400))}}}}var k=this,l=this.editor.graph,C=new mxKeyHandler(l),p=C.isEventIgnored;C.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)};C.isEnabledForEvent=function(Q){return!mxEvent.isConsumed(Q)&&this.isGraphEvent(Q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};C.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=C.getFunction;mxKeyHandler.prototype.getFunction=function(Q){if(l.isEnabled()){if(mxEvent.isShiftDown(Q)&&mxEvent.isAltDown(Q)){var d=k.actions.get(k.altShiftActions[Q.keyCode]);if(null!=d)return d.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(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null,!0)}:function(){e(Q.keyCode,mxEvent.isShiftDown(Q)?l.gridSize:null)}}return S.apply(this,arguments)};C.bindAction=mxUtils.bind(this,
+function(Q,d,f,g){var v=this.actions.get(f);null!=v&&(f=function(){v.isEnabled()&&v.funct.apply(this,arguments)},d?g?C.bindControlShiftKey(Q,f):C.bindControlKey(Q,f):g?C.bindShiftKey(Q,f):C.bindKey(Q,f))});var H=this,K=C.escape;C.escape=function(Q){K.apply(this,arguments)};C.enter=function(){};C.bindControlShiftKey(36,function(){l.exitGroup()});C.bindControlShiftKey(35,function(){l.enterGroup()});C.bindShiftKey(36,function(){l.home()});C.bindKey(35,function(){l.refresh()});C.bindAction(107,!0,"zoomIn");
+C.bindAction(109,!0,"zoomOut");C.bindAction(80,!0,"print");C.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)C.bindControlKey(36,function(){l.isEnabled()&&l.foldCells(!0)}),C.bindControlKey(35,function(){l.isEnabled()&&l.foldCells(!1)}),C.bindControlKey(13,function(){H.ctrlEnter()}),C.bindAction(8,!1,"delete"),C.bindAction(8,!0,"deleteAll"),C.bindAction(8,!1,"deleteLabels",!0),C.bindAction(46,!1,"delete"),C.bindAction(46,!0,"deleteAll"),C.bindAction(46,!1,"deleteLabels",
+!0),C.bindAction(36,!1,"resetView"),C.bindAction(72,!0,"fitWindow",!0),C.bindAction(74,!0,"fitPage"),C.bindAction(74,!0,"fitTwoPages",!0),C.bindAction(48,!0,"customZoom"),C.bindAction(82,!0,"turn"),C.bindAction(82,!0,"clearDefaultStyle",!0),C.bindAction(83,!0,"save"),C.bindAction(83,!0,"saveAs",!0),C.bindAction(65,!0,"selectAll"),C.bindAction(65,!0,"selectNone",!0),C.bindAction(73,!0,"selectVertices",!0),C.bindAction(69,!0,"selectEdges",!0),C.bindAction(69,!0,"editStyle"),C.bindAction(66,!0,"bold"),
+C.bindAction(66,!0,"toBack",!0),C.bindAction(70,!0,"toFront",!0),C.bindAction(68,!0,"duplicate"),C.bindAction(68,!0,"setAsDefaultStyle",!0),C.bindAction(90,!0,"undo"),C.bindAction(89,!0,"autosize",!0),C.bindAction(88,!0,"cut"),C.bindAction(67,!0,"copy"),C.bindAction(86,!0,"paste"),C.bindAction(71,!0,"group"),C.bindAction(77,!0,"editData"),C.bindAction(71,!0,"grid",!0),C.bindAction(73,!0,"italic"),C.bindAction(76,!0,"lockUnlock"),C.bindAction(76,!0,"layers",!0),C.bindAction(80,!0,"format",!0),C.bindAction(85,
+!0,"underline"),C.bindAction(85,!0,"ungroup",!0),C.bindAction(190,!0,"superscript"),C.bindAction(188,!0,"subscript"),C.bindAction(13,!1,"keyPressEnter"),C.bindKey(113,function(){l.isEnabled()&&l.startEditingAtCell()});mxClient.IS_WIN?C.bindAction(89,!0,"redo"):C.bindAction(90,!0,"redo",!0);return C};
EditorUi.prototype.destroy=function(){var b=this.editor.graph;null!=b&&null!=this.selectionStateListener&&(b.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),b.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),b.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
-this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var d=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<d.length;b++)null!=d[b]&&null!=d[b].parentNode&&d[b].parentNode.removeChild(d[b])};(function(){var b=[["nbsp","160"],["shy","173"]],d=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return d(k)}})();
-Date.prototype.toISOString||function(){function b(d){d=String(d);1===d.length&&(d="0"+d);return d}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,d=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var B=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!d(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var M=Number(B.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=d(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=B[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var l=0;l<b.length;l++)k=k.replace(new RegExp("&"+b[l][0]+";","g"),"&#"+b[l][1]+";");return e(k)}})();
+Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
+Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(l){return"function"===typeof l||"[object Function]"===b.call(l)},k=Math.pow(2,53)-1;return function(l){var C=Object(l);if(null==l)throw new TypeError("Array.from requires an array-like object - not null or undefined");var p=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof p){if(!e(p))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
+arguments[2])}var M=Number(C.length);M=isNaN(M)?0:0!==M&&isFinite(M)?(0<M?1:-1)*Math.floor(Math.abs(M)):M;M=Math.min(Math.max(M,0),k);for(var S=e(this)?Object(new this(M)):Array(M),H=0,K;H<M;)K=C[H],S[H]=p?"undefined"===typeof E?p(K,H):p.call(E,K,H):K,H+=1;S.length=M;return S}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
-(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(d){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
+(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
-mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,d,k){return null};
+mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,d,k,l,B,p){mxGraph.call(this,b,d,k,l);this.themes=B||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;d=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<d&&(d=b.indexOf("/",d+2),0<d&&(this.domainUrl=b.substring(0,d)),d=b.lastIndexOf("/"),0<d&&(this.domainPathUrl=b.substring(0,d+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
+Graph=function(b,e,k,l,C,p){mxGraph.call(this,b,e,k,l);this.themes=C||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,M=null,S=null,H=null,K=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){L=V.getProperty("event");var R=L.getState();V=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=R)if(this.model.isEdge(R.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),K=this.isCellSelected(R.cell),S=R,M=L,null!=R.text&&null!=
R.text.boundingBox&&mxUtils.contains(R.text.boundingBox,L.getGraphX(),L.getGraphY()))H=mxEvent.LABEL_HANDLE;else{var Y=this.selectionCellsHandler.getHandler(R.cell);null!=Y&&null!=Y.bends&&0<Y.bends.length&&(H=Y.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(Y=this.selectionCellsHandler.getHandler(R.cell),null==Y||null==Y.getHandleForEvent(L))){var Z=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),la=mxEvent.isTouchEvent(L.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+2)/2;Y=la+2;Z.grow(la);if(this.isTableCell(R.cell)&&!this.isCellSelected(R.cell)&&!(mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()-Y)&&mxUtils.contains(R,L.getGraphX()-Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()+Y)&&mxUtils.contains(R,L.getGraphX()+Y,L.getGraphY()-Y))){var q=this.model.getParent(R.cell);Y=this.model.getParent(q);if(!this.isCellSelected(Y)){la*=V;var F=2*la;if(this.model.getChildAt(Y,0)!=q&&mxUtils.intersects(Z,new mxRectangle(R.x,
@@ -2298,9 +2302,9 @@ this.isOrthogonal(R)&&(V=mxUtils.findNearestSegment(R,V.getGraphX(),V.getGraphY(
(V=1!=L.style.html?mxUtils.htmlEntities(V,!1):L.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;
this.connectionHandler.isValidSource=function(L,V){return!1};this.alternateEdgeStyle="vertical";null==l&&this.loadStylesheet();var Q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=Q.apply(this,arguments);if(this.graph.pageVisible){var V=[],R=this.graph.pageFormat,Y=this.graph.pageScale,Z=R.width*Y;R=R.height*Y;Y=this.graph.view.translate;for(var la=this.graph.view.scale,q=this.graph.getPageLayout(),F=0;F<q.width;F++)V.push(new mxRectangle(((q.x+F)*Z+Y.x)*la,(q.y*
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;
+arguments)};var d=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var V=d.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 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||
+var v=(new Date).getTime(),x=0,B=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;B.apply(this,arguments);L!=this.currentState?(v=(new Date).getTime(),x=0):x=(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<x||(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 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!=
@@ -2313,29 +2317,29 @@ this.initTouch();var ra=this.updateMouseEvent;this.updateMouseEvent=function(L){
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(" ");
-Graph.createOffscreenGraph=function(b){var d=new Graph(document.createElement("div"));d.stylesheet.styles=mxUtils.clone(b.styles);d.resetViewOnRootChange=!1;d.setConnectable(!1);d.gridEnabled=!1;d.autoScroll=!1;d.setTooltips(!1);d.setEnabled(!1);d.container.style.visibility="hidden";d.container.style.position="absolute";d.container.style.overflow="hidden";d.container.style.height="1px";d.container.style.width="1px";return d};
-Graph.createSvgImage=function(b,d,k,l,B){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+d+'px" '+(null!=l&&null!=B?'viewBox="0 0 '+l+" "+B+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,d)};
-Graph.createSvgNode=function(b,d,k,l,B){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=B&&(null!=E.style?E.style.backgroundColor=B:E.setAttribute("style","background-color:"+B));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
-E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+d+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,d,k,l){var B=document.createElement("canvas");B.width=d;B.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){B.getContext("2d").drawImage(p,0,0);l(B.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(b){for(var d=0,k=[],l=0;l<b.length;l++){var B=b.charCodeAt(l);(32<=B||9==B||10==B||13==B)&&65535!=B&&65534!=B||(k.push(b.substring(d,l)),d=l+1)}0<d&&d<b.length&&k.push(b.substring(d));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=b.charCodeAt(k);return d};Graph.bytesToString=function(b){for(var d=Array(b.length),k=0;k<b.length;k++)d[k]=String.fromCharCode(b[k]);return d.join("")};
-Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(d,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(d){return"%"+("00"+d.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,d){b=mxUtils.getXml(b);return Graph.compress(d?b:Graph.zapGremlins(b))};
-Graph.arrayBufferToString=function(b){var d="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)d+=String.fromCharCode(b[l]);return d};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(d){return d.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(b,d,k){var l=d.charCodeAt(0),B=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+d.length-1;k++){if(b[k]!=d.charCodeAt(B))return Graph.arrayBufferIndexOfString(b,d,p+1);B++}return B==d.length-1?p:-1};Graph.compress=function(b,d){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=d?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
-Graph.decompress=function(b,d,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));d=decodeURIComponent(d?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?d:Graph.zapGremlins(d)};
-Graph.fadeNodes=function(b,d,k,l,B){B=null!=B?B:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,d);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+B+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},B)},0)};Graph.removeKeys=function(b,d){for(var k in b)d(k)&&delete b[k]};
-Graph.setTransitionForNodes=function(b,d){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",d)};Graph.setOpacityForNodes=function(b,d){for(var k=0;k<b.length;k++)b[k].style.opacity=d};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
-Graph.sanitizeHtml=function(b,d){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var d=document.createElement("a");d.setAttribute("href",b);Graph.sanitizeNode(d);return d.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
-DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,d){"svg"==b.nodeName&&"content"==d.attrName&&(d.forceKeepAttr=!0);return b});Graph.domPurify=function(b,d){window.DOM_PURIFY_CONFIG.IN_PLACE=d;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(b,d){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),B=l.indexOf("<svg");if(0<=B){k.innerHTML=Graph.sanitizeHtml(l.substring(B));var p=k.getElementsByTagName("svg");if(0<p.length){if(d||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=d=
-1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(d=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-K.width/d),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
-Graph.createRemoveIcon=function(b,d){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",d);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
+Graph.createOffscreenGraph=function(b){var e=new Graph(document.createElement("div"));e.stylesheet.styles=mxUtils.clone(b.styles);e.resetViewOnRootChange=!1;e.setConnectable(!1);e.gridEnabled=!1;e.autoScroll=!1;e.setTooltips(!1);e.setEnabled(!1);e.container.style.visibility="hidden";e.container.style.position="absolute";e.container.style.overflow="hidden";e.container.style.height="1px";e.container.style.width="1px";return e};
+Graph.createSvgImage=function(b,e,k,l,C){k=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+b+'px" height="'+e+'px" '+(null!=l&&null!=C?'viewBox="0 0 '+l+" "+C+'" ':"")+'version="1.1">'+k+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0)),b,e)};
+Graph.createSvgNode=function(b,e,k,l,C){var p=mxUtils.createXmlDocument(),E=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");null!=C&&(null!=E.style?E.style.backgroundColor=C:E.setAttribute("style","background-color:"+C));null==p.createElementNS?(E.setAttribute("xmlns",mxConstants.NS_SVG),E.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):E.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);E.setAttribute("version","1.1");
+E.setAttribute("width",k+"px");E.setAttribute("height",l+"px");E.setAttribute("viewBox",b+" "+e+" "+k+" "+l);p.appendChild(E);return E};Graph.htmlToPng=function(b,e,k,l){var C=document.createElement("canvas");C.width=e;C.height=k;var p=document.createElement("img");p.onload=mxUtils.bind(this,function(){C.getContext("2d").drawImage(p,0,0);l(C.toDataURL())});p.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(b){for(var e=0,k=[],l=0;l<b.length;l++){var C=b.charCodeAt(l);(32<=C||9==C||10==C||13==C)&&65535!=C&&65534!=C||(k.push(b.substring(e,l)),e=l+1)}0<e&&e<b.length&&k.push(b.substring(e));return 0==k.length?b:k.join("")};Graph.stringToBytes=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=b.charCodeAt(k);return e};Graph.bytesToString=function(b){for(var e=Array(b.length),k=0;k<b.length;k++)e[k]=String.fromCharCode(b[k]);return e.join("")};
+Graph.base64EncodeUnicode=function(b){return btoa(encodeURIComponent(b).replace(/%([0-9A-F]{2})/g,function(e,k){return String.fromCharCode(parseInt(k,16))}))};Graph.base64DecodeUnicode=function(b){return decodeURIComponent(Array.prototype.map.call(atob(b),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(b,e){b=mxUtils.getXml(b);return Graph.compress(e?b:Graph.zapGremlins(b))};
+Graph.arrayBufferToString=function(b){var e="";b=new Uint8Array(b);for(var k=b.byteLength,l=0;l<k;l++)e+=String.fromCharCode(b[l]);return e};Graph.stringToArrayBuffer=function(b){return Uint8Array.from(b,function(e){return e.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(b,e,k){var l=e.charCodeAt(0),C=1,p=-1;for(k=k||0;k<b.byteLength;k++)if(b[k]==l){p=k;break}for(k=p+1;-1<p&&k<b.byteLength&&k<p+e.length-1;k++){if(b[k]!=e.charCodeAt(C))return Graph.arrayBufferIndexOfString(b,e,p+1);C++}return C==e.length-1?p:-1};Graph.compress=function(b,e){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=e?pako.deflate(encodeURIComponent(b)):pako.deflateRaw(encodeURIComponent(b));return btoa(Graph.arrayBufferToString(new Uint8Array(b)))};
+Graph.decompress=function(b,e,k){if(null==b||0==b.length||"undefined"===typeof pako)return b;b=Graph.stringToArrayBuffer(atob(b));e=decodeURIComponent(e?pako.inflate(b,{to:"string"}):pako.inflateRaw(b,{to:"string"}));return k?e:Graph.zapGremlins(e)};
+Graph.fadeNodes=function(b,e,k,l,C){C=null!=C?C:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+C+"ms ease-in-out");Graph.setOpacityForNodes(b,k);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=l&&l()},C)},0)};Graph.removeKeys=function(b,e){for(var k in b)e(k)&&delete b[k]};
+Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.setPrefixedStyle(b[k].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var k=0;k<b.length;k++)b[k].style.opacity=e};Graph.removePasteFormatting=function(b){for(;null!=b;)null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild),b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style&&(b.style.whiteSpace="","#000000"==b.style.color&&(b.style.color="")),b=b.nextSibling};
+Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){if(null==b)return null;var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};
+DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&(null!=b.getAttribute("xlink:href")&&!b.getAttribute("xlink:href").startsWith("#")||null!=b.getAttribute("href")&&!b.getAttribute("href").startsWith("#"))&&b.remove()});DOMPurify.addHook("uponSanitizeAttribute",function(b,e){"svg"==b.nodeName&&"content"==e.attrName&&(e.forceKeepAttr=!0);return b});Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
+Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var l=decodeURIComponent(escape(atob(b.substring(26)))),C=l.indexOf("<svg");if(0<=C){k.innerHTML=Graph.sanitizeHtml(l.substring(C));var p=k.getElementsByTagName("svg");if(0<p.length){if(e||null!=p[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{l=e=
+1;var E=p[0].getAttribute("width"),M=p[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;M=null!=M&&"%"!=M.charAt(M.length-1)?parseFloat(M):NaN;var S=p[0].getAttribute("viewBox");if(null!=S&&!isNaN(E)&&!isNaN(M)){var H=S.split(" ");4<=S.length&&(e=parseFloat(H[2])/E,l=parseFloat(H[3])/M)}var K=p[0].getBBox();0<K.width&&0<K.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",K.x+" "+K.y+" "+K.width+" "+K.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+K.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",K.height/l))}catch(Q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(p[0]))}}}catch(Q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.simpleBackgroundColor="#f0f0f0";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;
Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var B=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<B&&Math.abs(E.y-mxEvent.getClientY(K))<B}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
-Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var d=this.tooltipHandler.init;this.tooltipHandler.init=function(){d.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,l){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var C=k.view.graph.tolerance,p=!0,E=null,M=mxUtils.bind(this,function(K){p=!0;E=new mxPoint(mxEvent.getClientX(K),mxEvent.getClientY(K))}),S=mxUtils.bind(this,function(K){p=p&&null!=E&&Math.abs(E.x-mxEvent.getClientX(K))<C&&Math.abs(E.y-mxEvent.getClientY(K))<C}),H=mxUtils.bind(this,function(K){if(p)for(var Q=mxEvent.getSource(K);null!=
+Q&&Q!=l.node;){if("a"==Q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,Q,K);break}Q=Q.parentNode}});mxEvent.addGestureListeners(l.node,M,S,H);mxEvent.addListener(l.node,"click",function(K){mxEvent.consume(K)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var l=mxEvent.getSource(k);"A"==l.nodeName&&(l=l.getAttribute("href"),null!=
l&&this.graph.isCustomLink(l)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(l)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,l){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||
@@ -2345,86 +2349,86 @@ function(E){for(var M={},S=0;S<E.length;S++){var H=this.view.getState(E[S]);this
0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),M=this.getCellStyle(E),M=parseInt(mxUtils.getValue(M,mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==M)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(M=0;M<this.model.getChildCount(E);M++){var S=this.model.getChildAt(E,M);if(this.isCellEditable(S)){E=S;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,M,S){S=null!=S?S:Graph.pasteStyles;
Graph.removeKeys(E,function(H){return 0>mxUtils.indexOf(S,H)});this.updateCellStyles(E,M)};Graph.prototype.updateCellStyles=function(E,M){this.model.beginUpdate();try{for(var S=0;S<M.length;S++)if(this.model.isVertex(M[S])||this.model.isEdge(M[S])){var H=this.getCellStyle(M[S],!1),K;for(K in E){var Q=E[K];H[K]!=Q&&this.setCellStyles(K,Q,[M[S]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&
(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,M,S,H,K,Q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,M=M/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,M,S,H,K,Q){H=null!=H?H:!0;K=null!=K?K:!0;
-null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var e=this.model.getChildCount(S)-1;0<=e;e--){var f=this.model.getChildAt(S,e),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
+null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));if(null!=S)for(var d=this.model.getChildCount(S)-1;0<=d;d--){var f=this.model.getChildAt(S,d),g=this.getScaledCellAt(E,M,f,H,K,Q);if(null!=g)return g;if(this.isCellVisible(f)&&(K&&this.model.isEdge(f)||H&&this.model.isVertex(f))&&(g=this.view.getState(f),null!=g&&(null==Q||!Q(g,E,M))&&this.intersects(g,E,M)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&
!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var M=this.getCellGeometry(E);null!=M&&M.relative;)E=this.getModel().getParent(E),M=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var M=
new mxDictionary,S=[],H=0;H<E.length;H++){var K=this.getCompositeParent(E[H]);this.isTableCell(K)&&(K=this.graph.model.getParent(K));this.isTableRow(K)&&(K=this.graph.model.getParent(K));null==K||M.get(K)||(M.put(K,!0),S.push(K))}return S};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var M=this.model.getParent(E);if(!this.model.isVertex(M))break;E=M}return E};Graph.prototype.filterSelectionCells=function(E){var M=this.getSelectionCells();if(null!=E){for(var S=[],H=0;H<M.length;H++)E(M[H])||
S.push(M[H]);M=S}return M};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var M=this.currentScale,S=this.currentTranslate;E=new mxRectangle((E.x+2*S.x)*M-S.x,(E.y+2*S.y)*M-S.y,E.width*M,E.height*M)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;
-if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var d=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
-this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);d.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
+if(this.graph.useCssTransforms){var M=this.graph.currentTranslate,S=this.graph.currentScale;E=new mxRectangle((E.x+M.x)*S,(E.y+M.y)*S,E.width*S,E.height*S)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=
+this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};var l=
mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=l.apply(this,arguments);for(var M=[],S=0;S<E.length;S++)this.isTable(E[S])||this.isTableRow(E[S])||this.isTableCell(E[S])||M.push(E[S]);return M};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var M=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var S=Math.round(100*this.currentScale)/100;E.setAttribute("transform",
-"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var B=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
-E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);B.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
-Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,d,k){var l=d.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(d);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
-Graph.prototype.openLink=function(b,d,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==d&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top){var B=b.split("#")[1];window.location.hash=="#"+B&&(window.location.hash="");window.location.hash=B}else l=window.open(b,null!=d?d:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
+"scale("+S+","+S+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");M!=E.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var C=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,M=this.scale,S=this.translate;
+E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);C.apply(this,arguments);E&&(this.scale=M,this.translate=S)};var p=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(E,M,S){var H=this.useCssTransforms,K=this.view.scale,Q=this.view.translate;H&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);p.apply(this,arguments);H&&(this.view.scale=K,this.view.translate=Q,this.useCssTransforms=!0)}})();
+Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};Graph.prototype.labelLinkClicked=function(b,e,k){var l=e.getAttribute("href");l!=Graph.sanitizeLink(l)&&Graph.sanitizeNode(e);if(null!=l&&!this.isCustomLink(l)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(l)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(l),b);mxEvent.consume(k)}};
+Graph.prototype.openLink=function(b,e,k){var l=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var C=b.split("#")[1];window.location.hash=="#"+C&&(window.location.hash="");window.location.hash=C}else l=window.open(b,null!=e?e:"_blank"),null==l||k||(l.opener=null)}catch(p){}return l};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(b){return null!=b&&!this.absoluteUrlPattern.test(b)&&"data:"!==b.substring(0,5)&&!this.isExternalProtocol(b)};Graph.prototype.getAbsoluteUrl=function(b){null!=b&&this.isRelativeUrl(b)&&(b="#"==b.charAt(0)?this.baseUrl+b:"/"==b.charAt(0)?this.domainUrl+b:this.domainPathUrl+b);return b};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,d){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(d!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,d))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return d=new mxStackLayout(this.graph,!0),d.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
-"1"),d.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),d.spacing=b.stackSpacing||d.spacing,d.border=b.stackBorder||d.border,d.marginLeft=b.marginLeft||0,d.marginRight=b.marginRight||0,d.marginTop=b.marginTop||0,d.marginBottom=b.marginBottom||0,d.allowGaps=b.allowGaps||0,d.fill=!0,d.allowGaps&&(d.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),d;if("treeLayout"==
-b.childLayout)return d=new mxCompactTreeLayout(this.graph),d.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),d.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),d.groupPadding=mxUtils.getValue(b,"parentPadding",20),d.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),d.maintainParentLocation=!0,d.edgeRouting=!1,d.resetEdges=!1,d;if("flowLayout"==b.childLayout)return d=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),d.resizeParent=
-"1"==mxUtils.getValue(b,"resizeParent","1"),d.parentBorder=mxUtils.getValue(b,"parentPadding",20),d.maintainParentLocation=!0,d.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),d.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),d.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),d.parallelEdgeSpacing=mxUtils.getValue(b,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),d;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
-Graph.prototype.createLayouts=function(b){for(var d=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var B in b[k].config)l[B]=b[k].config[B];d.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return d};
-Graph.prototype.getDataForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,B={};B.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)B[l[p].nodeName]=l[p].nodeValue;else B.label=this.convertValueToString(b[k]);d.push(B)}return d};
-Graph.prototype.getNodesForCells=function(b){for(var d=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var B=this.cellRenderer.getShapesForState(l),p=0;p<B.length;p++)null!=B[p]&&null!=B[p].node&&d.push(B[p].node);null!=l.control&&null!=l.control.node&&d.push(l.control.node)}}return d};
-Graph.prototype.createWipeAnimations=function(b,d){for(var k=[],l=0;l<b.length;l++){var B=this.view.getState(b[l]);null!=B&&null!=B.shape&&(this.model.isEdge(B.cell)&&null!=B.absolutePoints&&1<B.absolutePoints.length?k.push(this.createEdgeWipeAnimation(B,d)):this.model.isVertex(B.cell)&&null!=B.shape.bounds&&k.push(this.createVertexWipeAnimation(B,d)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,d){var k=b.absolutePoints.slice(),l=b.segments,B=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;d||(M=1-M);for(var H=B*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
-b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(b,d){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,B){null!=b.shape&&(B=l/B,d||(B=1-B),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*B,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=B))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
-(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),d?1:0))})}};Graph.prototype.executeAnimations=function(b,d,k,l){k=null!=k?k:30;l=null!=l?l:30;var B=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(B);for(var M=0;M<b.length;M++)b[M].stop();null!=d&&d()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});B=window.setInterval(E,l);E()};
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(b){return null!=this.graph.getCellStyle(b).childLayout};this.layoutManager.getLayout=function(b,e){var k=this.graph.model.getParent(b);if(!this.graph.isCellCollapsed(b)&&(e!=mxEvent.BEGIN_UPDATE||this.hasLayout(k,e))){b=this.graph.getCellStyle(b);if("stackLayout"==b.childLayout)return e=new mxStackLayout(this.graph,!0),e.resizeParentMax="1"==mxUtils.getValue(b,"resizeParentMax",
+"1"),e.horizontal="1"==mxUtils.getValue(b,"horizontalStack","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.resizeLast="1"==mxUtils.getValue(b,"resizeLast","0"),e.spacing=b.stackSpacing||e.spacing,e.border=b.stackBorder||e.border,e.marginLeft=b.marginLeft||0,e.marginRight=b.marginRight||0,e.marginTop=b.marginTop||0,e.marginBottom=b.marginBottom||0,e.allowGaps=b.allowGaps||0,e.fill=!0,e.allowGaps&&(e.gridSize=parseFloat(mxUtils.getValue(b,"stackUnitSize",20))),e;if("treeLayout"==
+b.childLayout)return e=new mxCompactTreeLayout(this.graph),e.horizontal="1"==mxUtils.getValue(b,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(b,"resizeParent","1"),e.groupPadding=mxUtils.getValue(b,"parentPadding",20),e.levelDistance=mxUtils.getValue(b,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==b.childLayout)return e=new mxHierarchicalLayout(this.graph,mxUtils.getValue(b,"flowOrientation",mxConstants.DIRECTION_EAST)),e.resizeParent=
+"1"==mxUtils.getValue(b,"resizeParent","1"),e.parentBorder=mxUtils.getValue(b,"parentPadding",20),e.maintainParentLocation=!0,e.intraCellSpacing=mxUtils.getValue(b,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),e.interRankCellSpacing=mxUtils.getValue(b,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),e.interHierarchySpacing=mxUtils.getValue(b,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),e.parallelEdgeSpacing=mxUtils.getValue(b,
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),e;if("circleLayout"==b.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==b.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==b.childLayout)return new TableLayout(this.graph);if(null!=b.childLayout&&"["==b.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(b.childLayout)))}catch(l){null!=window.console&&console.error(l)}}return null}};
+Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=mxUtils.indexOf(Graph.layoutNames,b[k].layout)){var l=new window[b[k].layout](this);if(null!=b[k].config)for(var C in b[k].config)l[C]=b[k].config[C];e.push(l)}else throw Error(mxResources.get("invalidCallFnNotFound",[b[k].layout]));return e};
+Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=null!=b[k].value?b[k].value.attributes:null,C={};C.id=b[k].id;if(null!=l)for(var p=0;p<l.length;p++)C[l[p].nodeName]=l[p].nodeValue;else C.label=this.convertValueToString(b[k]);e.push(C)}return e};
+Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var l=this.view.getState(b[k]);if(null!=l){for(var C=this.cellRenderer.getShapesForState(l),p=0;p<C.length;p++)null!=C[p]&&null!=C[p].node&&e.push(C[p].node);null!=l.control&&null!=l.control.node&&e.push(l.control.node)}}return e};
+Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],l=0;l<b.length;l++){var C=this.view.getState(b[l]);null!=C&&null!=C.shape&&(this.model.isEdge(C.cell)&&null!=C.absolutePoints&&1<C.absolutePoints.length?k.push(this.createEdgeWipeAnimation(C,e)):this.model.isVertex(C.cell)&&null!=C.shape.bounds&&k.push(this.createVertexWipeAnimation(C,e)))}return k};
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),l=b.segments,C=b.length,p=k.length;return{execute:mxUtils.bind(this,function(E,M){if(null!=b.shape){var S=[k[0]];M=E/M;e||(M=1-M);for(var H=C*M,K=1;K<p;K++)if(H<=l[K-1]){S.push(new mxPoint(k[K-1].x+(k[K].x-k[K-1].x)*H/l[K-1],k[K-1].y+(k[K].y-k[K-1].y)*H/l[K-1]));break}else H-=l[K-1],S.push(k[K]);b.shape.points=S;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+b.text.node&&(b.text.node.style.opacity=M)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
+Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(l,C){null!=b.shape&&(C=l/C,e||(C=1-C),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*C,k.height),b.shape.redraw(),0==l&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=C))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
+(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,l){k=null!=k?k:30;l=null!=l?l:30;var C=null,p=0,E=mxUtils.bind(this,function(){if(p==k||this.stoppingCustomActions){window.clearInterval(C);for(var M=0;M<b.length;M++)b[M].stop();null!=e&&e()}else for(M=0;M<b.length;M++)b[M].execute(p,k);p++});C=window.setInterval(E,l);E()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),d=this.getGraphBounds();if(0==d.width||0==d.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(d.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(d.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((d.x+d.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((d.y+d.height)/this.view.scale)-this.view.translate.y)/b.height)-
-l)};Graph.prototype.sanitizeHtml=function(b,d){return Graph.sanitizeHtml(b,d)};Graph.prototype.updatePlaceholders=function(){var b=!1,d;for(d in this.model.cells){var k=this.model.cells[d];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var b=this.getPageSize(),e=this.getGraphBounds();if(0==e.width||0==e.height)return new mxRectangle(0,0,1,1);var k=Math.floor(Math.ceil(e.x/this.view.scale-this.view.translate.x)/b.width),l=Math.floor(Math.ceil(e.y/this.view.scale-this.view.translate.y)/b.height);return new mxRectangle(k,l,Math.ceil((Math.floor((e.x+e.width)/this.view.scale)-this.view.translate.x)/b.width)-k,Math.ceil((Math.floor((e.y+e.height)/this.view.scale)-this.view.translate.y)/b.height)-
+l)};Graph.prototype.sanitizeHtml=function(b,e){return Graph.sanitizeHtml(b,e)};Graph.prototype.updatePlaceholders=function(){var b=!1,e;for(e in this.model.cells){var k=this.model.cells[e];this.isReplacePlaceholders(k)&&(this.view.invalidate(k,!1,!1),b=!0)}b&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(b){return null!=b.value&&"object"==typeof b.value&&"1"==b.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(b){return Graph.zoomWheel&&!mxEvent.isShiftDown(b)&&!mxEvent.isMetaDown(b)&&!mxEvent.isAltDown(b)&&(!mxEvent.isControlDown(b)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(b)||mxEvent.isControlDown(b))};Graph.prototype.isScrollWheelEvent=function(b){return!this.isZoomWheelEvent(b)};Graph.prototype.isTransparentClickEvent=function(b){return mxEvent.isAltDown(b)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(b)};
-Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var d=!1;null!=b&&(b=this.getCurrentCellStyle(b),d="1"==mxUtils.getValue(b,"ignoreEdge","0"));return d};Graph.prototype.isSplitTarget=function(b,d,k){return!this.model.isEdge(d[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
-Graph.prototype.getLabel=function(b){var d=mxGraph.prototype.getLabel.apply(this,arguments);null!=d&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(d=this.replacePlaceholders(b,d));return d};Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(d,"labelMovable","0")))};
-Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var d=this.getLinkForCell(b);if(null!=d)return d;b=this.model.getParent(b)}while(null!=b);return null};
-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 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);
+Graph.prototype.isIgnoreTerminalEvent=function(b){return mxEvent.isAltDown(b)&&!mxEvent.isShiftDown(b)&&!mxEvent.isControlDown(b)&&!mxEvent.isMetaDown(b)};Graph.prototype.isEdgeIgnored=function(b){var e=!1;null!=b&&(b=this.getCurrentCellStyle(b),e="1"==mxUtils.getValue(b,"ignoreEdge","0"));return e};Graph.prototype.isSplitTarget=function(b,e,k){return!this.model.isEdge(e[0])&&!mxEvent.isAltDown(k)&&!mxEvent.isShiftDown(k)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
+Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this,arguments);null!=e&&this.isReplacePlaceholders(b)&&null==b.getAttribute("placeholder")&&(e=this.replacePlaceholders(b,e));return e};Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return!this.isCellLocked(b)&&(this.model.isEdge(b)&&this.edgeLabelsMovable||this.model.isVertex(b)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(e,"labelMovable","0")))};
+Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
+Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
+Graph.prototype.formatDate=function(b,e,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,C=/\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(B,I){B=String(B);for(I=I||2;B.length<I;)B="0"+B;return B};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(l.masks[e]||e||l.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.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"](),d=b[M+"Hours"](),f=b[M+"Minutes"](),g=b[M+"Seconds"]();M=b[M+"Milliseconds"]();var v=k?0:b.getTimezoneOffset(),x={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:d%12||12,hh:E(d%12||12),H:d,HH:E(d),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>d?"a":"p",tt:12>d?"am":"pm",T:12>d?"A":"P",TT:12>d?"AM":"PM",Z:k?"UTC":(String(b).match(C)||[""]).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 e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(B){return B in x?x[B]:B.slice(1,
+B.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var l=this.getModel(),C=l.getChildCount(l.root),p=0;p<C;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";e&&(K.style.filter="invert(100%)",K.style.top="-2px");H.appendChild(K);mxUtils.write(H,S);k.appendChild(H);
mxEvent.addListener(H,"click",function(){l.setVisible(E,!l.isVisible(E));M();null!=b&&b(E)});M()})(l.getChildAt(l.root,p));return k};
-Graph.prototype.replacePlaceholders=function(b,d,k,l){l=[];if(null!=d){for(var B=0;match=this.placeholderPattern.exec(d);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>B&&"%"==d.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
-null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(d.substring(B,match.index)+(null!=E?E:p));B=match.index+p.length}}l.push(d.substring(B))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var d=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&d.push(l)}this.setSelectionCells(d)}else this.clearSelection()};
-Graph.prototype.selectCellForEvent=function(b,d){mxEvent.isShiftDown(d)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(b,d){var k=!1;if(this.isTableCell(b)&&this.isTableCell(d)){var l=this.model.getParent(b),B=this.model.getParent(l),p=this.model.getParent(d);if(B==this.model.getParent(p)){b=l.getIndex(b);l=B.getIndex(l);var E=p.getIndex(d),M=B.getIndex(p);p=Math.max(l,M);d=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(B,l);for(var S=d;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
+Graph.prototype.replacePlaceholders=function(b,e,k,l){l=[];if(null!=e){for(var C=0;match=this.placeholderPattern.exec(e);){var p=match[0];if(2<p.length&&"%label%"!=p&&"%tooltip%"!=p){var E=null;if(match.index>C&&"%"==e.charAt(match.index-1))E=p.substring(1);else{var M=p.substring(1,p.length-1);if("id"==M)E=b.id;else if(0>M.indexOf("{"))for(var S=b;null==E&&null!=S;)null!=S.value&&"object"==typeof S.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=S.getAttribute(M+"_"+Graph.diagramLanguage)),
+null==E&&(E=S.hasAttribute(M)?null!=S.getAttribute(M)?S.getAttribute(M):"":null)),S=this.model.getParent(S);null==E&&(E=this.getGlobalVariable(M));null==E&&null!=k&&(E=k[M])}l.push(e.substring(C,match.index)+(null!=E?E:p));C=match.index+p.length}}l.push(e.substring(C))}return l.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var l=this.model.getCell(b[k].id);null!=l&&e.push(l)}this.setSelectionCells(e)}else this.clearSelection()};
+Graph.prototype.selectCellForEvent=function(b,e){mxEvent.isShiftDown(e)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),b)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
+Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&this.isTableCell(e)){var l=this.model.getParent(b),C=this.model.getParent(l),p=this.model.getParent(e);if(C==this.model.getParent(p)){b=l.getIndex(b);l=C.getIndex(l);var E=p.getIndex(e),M=C.getIndex(p);p=Math.max(l,M);e=Math.min(b,E);b=Math.max(b,E);E=[];for(l=Math.min(l,M);l<=p;l++){M=this.model.getChildAt(C,l);for(var S=e;S<=b;S++)E.push(this.model.getChildAt(M,S))}0<E.length&&(1<E.length||1<this.getSelectionCount()||
!this.isCellSelected(E[0]))&&(this.setSelectionCells(E),k=!0)}}return k};
-Graph.prototype.snapCellsToGrid=function(b,d){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],B=this.getCellGeometry(l);if(null!=B){B=B.clone();if(this.getModel().isVertex(l))B.x=Math.round(B.x/d)*d,B.y=Math.round(B.y/d)*d,B.width=Math.round(B.width/d)*d,B.height=Math.round(B.height/d)*d;else if(this.getModel().isEdge(l)&&null!=B.points)for(var p=0;p<B.points.length;p++)B.points[p].x=Math.round(B.points[p].x/d)*d,B.points[p].y=Math.round(B.points[p].y/d)*d;this.getModel().setGeometry(l,
-B)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,d,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(d)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
-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 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 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(" ")};
-Graph.prototype.convertValueToString=function(b){var d=this.model.getValue(b);if(null!=d&&"object"==typeof d){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){d=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(d)?null!=l.getAttribute(d)?l.getAttribute(d):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=d.getAttribute("label_"+Graph.diagramLanguage)),
-null==k&&(k=d.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
-Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,d){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
-Graph.prototype.updateHorizontalStyle=function(b,d){if(null!=b&&null!=d&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(d[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return d};
-Graph.prototype.replaceDefaultColors=function(b,d){if(null!=d){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(d,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_IMAGE_BACKGROUND,
-b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(d,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(d,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return d};Graph.prototype.replaceDefaultColor=function(b,d,k,l){null!=b&&"default"==b[d]&&null!=k&&(b[d]=this.getDefaultColor(b,d,k,l))};Graph.prototype.getDefaultColor=function(b,d,k,l){d="default"+d.charAt(0).toUpperCase()+d.substring(1);"invert"==b[d]&&(k=l);return k};
-Graph.prototype.updateAlternateBounds=function(b,d,k){if(null!=b&&null!=d&&null!=this.layoutManager&&null!=d.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?d.alternateBounds.height=0:d.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,d){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(d.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,d,k,l,B){d=null!=d?d:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
-null==Q?null!=B&&this.isMoveCellsEvent(B,E)&&this.moveSiblings(E,K,S,H):null!=B&&mxEvent.isAltDown(B)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
-Graph.prototype.moveSiblings=function(b,d,k,l){this.model.beginUpdate();try{var B=this.getCellsBeyond(b.x,b.y,d,!0,!0);for(d=0;d<B.length;d++)if(B[d]!=b.cell){var p=this.view.getState(B[d]),E=this.getCellGeometry(B[d]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(B[d],E))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(b,d,k,l){if(null!=this.layoutManager&&null!=d&&d.constructor==mxStackLayout&&!d.resizeLast){this.model.beginUpdate();try{for(var B=d.horizontal;null!=b&&null!=d&&d.constructor==mxStackLayout&&d.horizontal==B&&!d.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),d.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
-p));b=this.model.getParent(b);d=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var d=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=d.container:"1"==d.container};Graph.prototype.isCellConnectable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.connectable?"0"!=d.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
-Graph.prototype.isLabelMovable=function(b){var d=this.getCurrentCellStyle(b);return null!=d.movableLabel?"0"!=d.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,d,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(b,d,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var d=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(d,mxConstants.STYLE_RESIZABLE,"1")&&("1"==d.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=d.collapsible||!this.isContainer(b)&&"1"==d.collapsible))};
-Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,d){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
+Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var l=b[k],C=this.getCellGeometry(l);if(null!=C){C=C.clone();if(this.getModel().isVertex(l))C.x=Math.round(C.x/e)*e,C.y=Math.round(C.y/e)*e,C.width=Math.round(C.width/e)*e,C.height=Math.round(C.height/e)*e;else if(this.getModel().isEdge(l)&&null!=C.points)for(var p=0;p<C.points.length;p++)C.points[p].x=Math.round(C.points[p].x/e)*e,C.points[p].y=Math.round(C.points[p].y/e)*e;this.getModel().setGeometry(l,
+C)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
+Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
+Graph.prototype.connectVertex=function(b,e,k,l,C,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);e==mxConstants.DIRECTION_NORTH?(K.x+=H.geometry.width/2,K.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(K.x+=H.geometry.width/2,K.y+=H.geometry.height+k):(K.x=e==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 d=this.view.translate;H=d.x*k;d=d.y*k;null!=Q&&this.model.isVertex(Q.cell)&&(H=Q.x,d=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,d+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 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 x=this.view.getState(p[v]);null==Q||null==x||mxUtils.intersects(Q,x)||(g=p[v])}}var B=
+!mxEvent.isShiftDown(l)||mxEvent.isControlDown(l)||C;B&&("1"!=urlParams.sketch||C)&&(e==mxConstants.DIRECTION_NORTH?K.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=b.geometry.height/2:K.x=e==mxConstants.DIRECTION_WEST?K.x-b.geometry.width/2:K.x+b.geometry.width/2);var I=[],D=g;g=f;C=mxUtils.bind(this,function(N){if(null==E||null!=N||null==g&&S){this.model.beginUpdate();try{if(null==D&&B){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 ia=this.getCellGeometry(D);null!=ia&&(null!=N&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?K.y-=ia.height/2:e==mxConstants.DIRECTION_SOUTH?K.y+=ia.height/2:K.x=e==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):B&&!S&&this.addCells([D],this.getDefaultParent(),null,null,null,!0)}var ka=mxEvent.isControlDown(l)&&
+mxEvent.isShiftDown(l)&&B||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&&e==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||!B||null==g&&S)return C(D);E(H+K.x*k,d+K.y*k,C)};
+Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],l,C=0;C<b.length;C++)if(l=b[C],this.model.isVertex(l)||this.model.isEdge(l))this.isHtmlLabel(l)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(l)),l=mxUtils.extractTextWithWhitespace([e])):l=this.getLabel(l),l=mxUtils.trim(l.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<l.length&&k.push(l);return k.join(" ")};
+Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var l=b;null==k&&null!=l;)null!=l.value&&"object"==typeof l.value&&(k=l.hasAttribute(e)?null!=l.getAttribute(e)?l.getAttribute(e):"":null),l=this.model.getParent(l)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
+null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
+Graph.prototype.getLinkTargetForCell=function(b){return null!=b.value&&"object"==typeof b.value?b.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(b,e){return this.updateHorizontalStyle(b,this.replaceDefaultColors(b,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
+Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=this.layoutManager){var k=this.model.getParent(b);this.model.isVertex(k)&&this.isCellCollapsed(b)&&(b=this.layoutManager.getLayout(k),null!=b&&b.constructor==mxStackLayout&&(e[mxConstants.STYLE_HORIZONTAL]=!b.horizontal))}return e};
+Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_GRADIENTCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,
+b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,k,b);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b,k);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b,k)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k,l){null!=b&&"default"==b[e]&&null!=k&&(b[e]=this.getDefaultColor(b,e,k,l))};Graph.prototype.getDefaultColor=function(b,e,k,l){e="default"+e.charAt(0).toUpperCase()+e.substring(1);"invert"==b[e]&&(k=l);return k};
+Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var l=this.layoutManager.getLayout(this.model.getParent(b));null!=l&&l.constructor==mxStackLayout&&(l.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
+Graph.prototype.foldCells=function(b,e,k,l,C){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var p=0;p<k.length;p++){var E=this.view.getState(k[p]),M=this.getCellGeometry(k[p]);if(null!=E&&null!=M){var S=Math.round(M.width-E.width/this.view.scale),H=Math.round(M.height-E.height/this.view.scale);if(0!=H||0!=S){var K=this.model.getParent(k[p]),Q=this.layoutManager.getLayout(K);
+null==Q?null!=C&&this.isMoveCellsEvent(C,E)&&this.moveSiblings(E,K,S,H):null!=C&&mxEvent.isAltDown(C)||Q.constructor!=mxStackLayout||Q.resizeLast||this.resizeParentStacks(K,Q,S,H)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.moveSiblings=function(b,e,k,l){this.model.beginUpdate();try{var C=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<C.length;e++)if(C[e]!=b.cell){var p=this.view.getState(C[e]),E=this.getCellGeometry(C[e]);null!=p&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(p.x-b.x)/b.width))),Math.round(l*Math.max(0,Math.min(1,(p.y-b.y)/b.height)))),this.model.setGeometry(C[e],E))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(b,e,k,l){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var C=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==C&&!e.resizeLast;){var p=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=p&&(p=p.clone(),e.horizontal?p.width+=k+Math.min(0,E.width/this.view.scale-p.width):p.height+=l+Math.min(0,E.height/this.view.scale-p.height),this.model.setGeometry(b,
+p));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.isLabelMovable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.movableLabel?"0"!=e.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(b){b=b||this.getDefaultParent();this.isCellLocked(b)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(b,e,k){k=k||this.getDefaultParent();this.isCellLocked(k)||mxGraph.prototype.selectCells.apply(this,arguments)};
+Graph.prototype.getSwimlaneAt=function(b,e,k){var l=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(l)&&(l=null);return l};Graph.prototype.isCellFoldable=function(b){var e=this.getCurrentCellStyle(b);return this.foldingEnabled&&"0"!=mxUtils.getValue(e,mxConstants.STYLE_RESIZABLE,"1")&&("1"==e.treeFolding||!this.isCellLocked(b)&&(this.isContainer(b)&&"0"!=e.collapsible||!this.isContainer(b)&&"1"==e.collapsible))};
+Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(b,e){b=Math.max(.01,Math.min(this.view.scale*b,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(b,d){d=null!=d?d:10;var k=this.container.clientWidth-d,l=this.container.clientHeight-d,B=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(B);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*B-Math.max((l-b.height*B)/2+d/2,0);this.container.scrollLeft=(b.x+p.x)*B-Math.max((k-b.width*B)/2+d/2,0)}};
-Graph.prototype.getTooltipForCell=function(b){var d="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),d=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var B=0;B<b.length;B++)(Graph.translateDiagram&&
-"label"==b[B].nodeName||0>mxUtils.indexOf(k,b[B].nodeName))&&0<b[B].nodeValue.length&&l.push({name:b[B].nodeName,value:b[B].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(B=0;B<l.length;B++)"link"==l[B].name&&this.isCustomLink(l[B].value)||(d+=("link"!=l[B].name?"<b>"+mxUtils.htmlEntities(l[B].name)+":</b> ":"")+mxUtils.htmlEntities(l[B].value)+"\n");0<d.length&&(d=d.substring(0,d.length-1),mxClient.IS_SVG&&(d='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
-d+"</div>"))}}return d};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var d=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(d);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
-Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,d){return Graph.compress(b,d)};
-Graph.prototype.decompress=function(b,d){return Graph.decompress(b,d)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
+Graph.prototype.fitWindow=function(b,e){e=null!=e?e:10;var k=this.container.clientWidth-e,l=this.container.clientHeight-e,C=Math.floor(20*Math.min(k/b.width,l/b.height))/20;this.zoomTo(C);if(mxUtils.hasScrollbars(this.container)){var p=this.view.translate;this.container.scrollTop=(b.y+p.y)*C-Math.max((l-b.height*C)/2+e/2,0);this.container.scrollLeft=(b.x+p.x)*C-Math.max((k-b.width*C)/2+e/2,0)}};
+Graph.prototype.getTooltipForCell=function(b){var e="";if(mxUtils.isNode(b.value)){var k=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=b.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==k&&(k=b.value.getAttribute("tooltip"));if(null!=k)null!=k&&this.isReplacePlaceholders(b)&&(k=this.replacePlaceholders(b,k)),e=Graph.sanitizeHtml(k);else{k=this.builtInProperties;b=b.value.attributes;var l=[];this.isEnabled()&&(k.push("linkTarget"),k.push("link"));for(var C=0;C<b.length;C++)(Graph.translateDiagram&&
+"label"==b[C].nodeName||0>mxUtils.indexOf(k,b[C].nodeName))&&0<b[C].nodeValue.length&&l.push({name:b[C].nodeName,value:b[C].nodeValue});l.sort(function(p,E){return p.name<E.name?-1:p.name>E.name?1:0});for(C=0;C<l.length;C++)"link"==l[C].name&&this.isCustomLink(l[C].value)||(e+=("link"!=l[C].name?"<b>"+mxUtils.htmlEntities(l[C].name)+":</b> ":"")+mxUtils.htmlEntities(l[C].value)+"\n");0<e.length&&(e=e.substring(0,e.length-1),mxClient.IS_SVG&&(e='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+
+e+"</div>"))}}return e};Graph.prototype.getFlowAnimationStyle=function(){var b=document.getElementsByTagName("head")[0];if(null!=b&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var e=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(e);b.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
+Graph.prototype.getFlowAnimationStyleCss=function(b){return"."+b+" {\nanimation: "+b+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+b+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(b){return Graph.stringToBytes(b)};Graph.prototype.bytesToString=function(b){return Graph.bytesToString(b)};Graph.prototype.compressNode=function(b){return Graph.compressNode(b)};Graph.prototype.compress=function(b,e){return Graph.compress(b,e)};
+Graph.prototype.decompress=function(b,e){return Graph.decompress(b,e)};Graph.prototype.zapGremlins=function(b){return Graph.zapGremlins(b)};HoverIcons=function(b){mxEventSource.call(this);this.graph=b;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
HoverIcons.prototype.cssCursor="copy";HoverIcons.prototype.checkCollisions=!0;HoverIcons.prototype.arrowFill="#29b6f2";HoverIcons.prototype.triangleUp=mxClient.IS_SVG?Graph.createSvgImage(18,28,'<path d="m 6 26 L 12 26 L 12 12 L 18 12 L 9 1 L 1 12 L 6 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-up.png",26,14);
HoverIcons.prototype.triangleRight=mxClient.IS_SVG?Graph.createSvgImage(26,18,'<path d="m 1 6 L 14 6 L 14 1 L 26 9 L 14 18 L 14 12 L 1 12 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-right.png",14,26);HoverIcons.prototype.triangleDown=mxClient.IS_SVG?Graph.createSvgImage(18,26,'<path d="m 6 1 L 6 14 L 1 14 L 9 26 L 18 14 L 12 14 L 12 1 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-down.png",26,14);
HoverIcons.prototype.triangleLeft=mxClient.IS_SVG?Graph.createSvgImage(28,18,'<path d="m 1 9 L 12 1 L 12 6 L 26 6 L 26 12 L 12 12 L 12 18 z" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/triangle-left.png",14,26);HoverIcons.prototype.roundDrop=mxClient.IS_SVG?Graph.createSvgImage(26,26,'<circle cx="13" cy="13" r="12" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>'):new mxImage(IMAGE_PATH+"/round-drop.png",26,26);
@@ -2433,216 +2437,216 @@ IMAGE_PATH+"/refresh.png",38,38);HoverIcons.prototype.tolerance=mxClient.IS_TOUC
HoverIcons.prototype.init=function(){this.arrowUp=this.createArrow(this.triangleUp,mxResources.get("plusTooltip"),mxConstants.DIRECTION_NORTH);this.arrowRight=this.createArrow(this.triangleRight,mxResources.get("plusTooltip"),mxConstants.DIRECTION_EAST);this.arrowDown=this.createArrow(this.triangleDown,mxResources.get("plusTooltip"),mxConstants.DIRECTION_SOUTH);this.arrowLeft=this.createArrow(this.triangleLeft,mxResources.get("plusTooltip"),mxConstants.DIRECTION_WEST);this.elts=[this.arrowUp,this.arrowRight,
this.arrowDown,this.arrowLeft];this.resetHandler=mxUtils.bind(this,function(){this.reset()});this.repaintHandler=mxUtils.bind(this,function(){this.repaint()});this.graph.selectionModel.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.model.addListener(mxEvent.CHANGE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.repaintHandler);this.graph.view.addListener(mxEvent.SCALE,this.repaintHandler);
this.graph.view.addListener(mxEvent.DOWN,this.repaintHandler);this.graph.view.addListener(mxEvent.UP,this.repaintHandler);this.graph.addListener(mxEvent.ROOT,this.repaintHandler);this.graph.addListener(mxEvent.ESCAPE,this.resetHandler);mxEvent.addListener(this.graph.container,"scroll",this.resetHandler);this.graph.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.mouseDownPoint=null}));mxEvent.addListener(this.graph.container,"mouseleave",mxUtils.bind(this,function(k){null!=k.relatedTarget&&
-mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var d=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
-l){d=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(d=!0)}),mouseUp:mxUtils.bind(this,
-function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!d&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
-this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();d=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,d){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
-HoverIcons.prototype.createArrow=function(b,d,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=d&&l.setAttribute("title",d);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(B){null==this.currentState||this.isResetEvent(B)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(B),mxEvent.getClientY(B)),this.drag(B,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(B))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
-"arrow",l,"direction",k,"event",B)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(B){mxEvent.isMouseEvent(B)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",B));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
-HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var d=0;d<this.elts.length;d++)null!=this.elts[d]&&b(this.elts[d])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
-HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(d){d.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
-HoverIcons.prototype.drag=function(b,d,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,d,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=d&&d.setHandlesVisible(!1),d=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=d&&"orthogonalEdgeStyle"===
-mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),d.cell.style=mxUtils.setStyle(d.cell.style,"sourcePortConstraint",b),d.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,d,k){return this.graph.view.getState(this.graph.getCellAt(d,k))};
-HoverIcons.prototype.click=function(b,d,k){var l=k.getEvent(),B=k.getGraphX(),p=k.getGraphY();B=this.getStateAt(b,B,p);null==B||!this.graph.model.isEdge(B.cell)||this.graph.isCloneEvent(l)||B.getVisibleTerminalState(!0)!=b&&B.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,d,k):(this.graph.setSelectionCell(B.cell),this.reset());k.consume()};
-HoverIcons.prototype.execute=function(b,d,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,d,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
+mxEvent.getSource(k)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(k){this.reset()}));var b=this.graph.click;this.graph.click=mxUtils.bind(this,function(k){b.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(k.getEvent())||this.graph.model.isVertex(k.getCell())||this.reset()});var e=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(k,
+l){e=!1;k=l.getEvent();this.isResetEvent(k)?this.reset():this.isActive()||(l=this.getState(l.getState()),null==l&&mxEvent.isTouchEvent(k)||this.update(l));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(k,l){k=l.getEvent();this.isResetEvent(k)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(k)||this.update(this.getState(l.getState()),l.getGraphX(),l.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(e=!0)}),mouseUp:mxUtils.bind(this,
+function(k,l){k=l.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(k),mxEvent.getClientY(k));this.isResetEvent(k)?this.reset():this.isActive()&&!e&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),l):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(l.getGraphX(),l.getGraphY())))):mxEvent.isTouchEvent(k)||null!=
+this.bbox&&mxUtils.contains(this.bbox,l.getGraphX(),l.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(k)||this.reset();e=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(b,e){return mxEvent.isAltDown(b)||null==this.activeArrow&&mxEvent.isShiftDown(b)||mxEvent.isPopupTrigger(b)&&!this.graph.isCloneEvent(b)};
+HoverIcons.prototype.createArrow=function(b,e,k){var l=null;l=mxUtils.createImage(b.src);l.style.width=b.width+"px";l.style.height=b.height+"px";l.style.padding=this.tolerance+"px";null!=e&&l.setAttribute("title",e);l.style.position="absolute";l.style.cursor=this.cssCursor;mxEvent.addGestureListeners(l,mxUtils.bind(this,function(C){null==this.currentState||this.isResetEvent(C)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(C),mxEvent.getClientY(C)),this.drag(C,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=l,this.setDisplay("none"),mxEvent.consume(C))}));mxEvent.redirectMouseEvents(l,this.graph,this.currentState);mxEvent.addListener(l,"mouseenter",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&(null!=this.activeArrow&&this.activeArrow!=l&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(l,100),this.activeArrow=l,this.fireEvent(new mxEventObject("focus",
+"arrow",l,"direction",k,"event",C)))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(C){mxEvent.isMouseEvent(C)&&this.fireEvent(new mxEventObject("blur","arrow",l,"direction",k,"event",C));this.graph.isMouseDown||this.resetActiveArrow()}));return l};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+HoverIcons.prototype.getDirection=function(){var b=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?b=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?b=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(b=mxConstants.DIRECTION_WEST);return b};HoverIcons.prototype.visitNodes=function(b){for(var e=0;e<this.elts.length;e++)null!=this.elts[e]&&b(this.elts[e])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(b){null!=b.parentNode&&b.parentNode.removeChild(b)})};
+HoverIcons.prototype.setDisplay=function(b){this.visitNodes(function(e){e.style.display=b})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
+HoverIcons.prototype.drag=function(b,e,k){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,e,k),this.graph.isMouseTrigger=mxEvent.isMouseEvent(b),this.graph.isMouseDown=!0,e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=e&&e.setHandlesVisible(!1),e=this.graph.connectionHandler.edgeState,null!=b&&mxEvent.isShiftDown(b)&&mxEvent.isControlDown(b)&&null!=e&&"orthogonalEdgeStyle"===
+mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)&&(b=this.getDirection(),e.cell.style=mxUtils.setStyle(e.cell.style,"sourcePortConstraint",b),e.style.sourcePortConstraint=b))};HoverIcons.prototype.getStateAt=function(b,e,k){return this.graph.view.getState(this.graph.getCellAt(e,k))};
+HoverIcons.prototype.click=function(b,e,k){var l=k.getEvent(),C=k.getGraphX(),p=k.getGraphY();C=this.getStateAt(b,C,p);null==C||!this.graph.model.isEdge(C.cell)||this.graph.isCloneEvent(l)||C.getVisibleTerminalState(!0)!=b&&C.getVisibleTerminalState(!1)!=b?null!=b&&this.execute(b,e,k):(this.graph.setSelectionCell(C.cell),this.reset());k.consume()};
+HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
-var d=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(d=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=d&&(b.x-=d.horizontalOffset/2,b.y-=d.verticalOffset/2,b.width+=d.horizontalOffset,b.height+=d.verticalOffset,null!=d.rotationShape&&null!=d.rotationShape.node&&"hidden"!=d.rotationShape.node.style.visibility&&"none"!=d.rotationShape.node.style.display&&null!=d.rotationShape.boundingBox&&
-(k=d.rotationShape.boundingBox));d=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});d(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
-this.triangleUp.height-this.tolerance));d(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));d(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));d(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){d=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),B=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=d&&d==l&&l==B&&B==b&&(b=B=l=d=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
-this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(d,this.arrowRight);E(l,this.arrowLeft);E(B,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(M,S,H){if(null!=k){var K=new mxRectangle(S,H,M.clientWidth,M.clientHeight);mxUtils.intersects(K,k)&&(M==this.arrowUp?H-=K.y+K.height-k.y:M==this.arrowRight?S+=k.x+k.width-K.x:M==this.arrowDown?H+=k.y+k.height-K.y:M==this.arrowLeft&&(S-=K.x+K.width-k.x))}M.style.left=S+"px";M.style.top=H+"px";mxUtils.setOpacity(M,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
+var l=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),C=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==l&&l==C&&C==b&&(b=C=l=e=null);var p=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(M,S){var H=this.graph.model.isVertex(M)&&this.graph.getCellGeometry(M);null==M||this.graph.model.isAncestor(M,
+this.currentState.cell)||this.graph.isSwimlane(M)||!(null==H||null==p||H.height<3*p.height&&H.width<3*p.width)?S.style.visibility="visible":S.style.visibility="hidden"});E(e,this.arrowRight);E(l,this.arrowLeft);E(C,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
-HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(d){null!=d.parentNode&&(d=new mxRectangle(d.offsetLeft,d.offsetTop,d.offsetWidth,d.offsetHeight),null==b?b=d:b.add(d))});return b};
-HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var d=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(d)&&this.graph.isCellConnectable(d)&&(b=d)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
-HoverIcons.prototype.update=function(b,d,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
-window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,d,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,d,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
-b||null==this.bbox||null==d||null==k||!mxUtils.contains(this.bbox,d,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,d,k,l,B){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(d),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*B);b.insert(E)}return b};
-Graph.prototype.createTable=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
-null,null!=B?B:"",0,0,d*k,b*l+(null!=B?p:0),null!=E?E:"shape=table;startSize="+(null!=B?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,d*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),d,k,0),b,0,l)};
-Graph.prototype.setTableValues=function(b,d,k){for(var l=this.model.getChildCells(b,!0),B=0;B<l.length;B++)if(null!=k&&(l[B].value=k[B]),null!=d)for(var p=this.model.getChildCells(l[B],!0),E=0;E<p.length;E++)null!=d[B][E]&&(p[E].value=d[B][E]);return b};
-Graph.prototype.createCrossFunctionalSwimlane=function(b,d,k,l,B,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";B=this.createVertex(null,null,null!=B?B:"",0,0,d*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==B?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(B),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);B.geometry.width+=p;B.geometry.height+=p;E=this.createVertex(null,
-null,"",0,p,d*k+p,l,E);B.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),d,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(B,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),d,k,0),b-1,0,l)):B};
-Graph.prototype.visitTableCells=function(b,d){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var B=0;B<l.length;B++){for(var p=this.getActualStartSize(l[B],!0),E=this.model.getChildCells(l[B],!0),M=this.getCellStyle(l[B],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),e={cell:E[K],rospan:1,colspan:1,row:B,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;e.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+p.y));e.actual=e;null!=k&&null!=k[K]&&1<k[K].rowspan?(e.rowspan=k[K].rowspan-1,e.colspan=k[K].colspan,e.actual=k[K].actual):null!=S&&1<S.colspan?(e.rowspan=S.rowspan,e.colspan=S.colspan-1,e.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(e.rowspan=parseInt(S.rowspan||1),e.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;d(e,E.length,
-l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(e);S=e}k=H}};Graph.prototype.getTableLines=function(b,d,k){var l=[],B=[];(d||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){d&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==B[p.col]&&(B[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&B[p.col].push(null),B[p.col].push(p.point))}));return l.concat(B)};
+HoverIcons.prototype.computeBoundingBox=function(){var b=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(e){null!=e.parentNode&&(e=new mxRectangle(e.offsetLeft,e.offsetTop,e.offsetWidth,e.offsetHeight),null==b?b=e:b.add(e))});return b};
+HoverIcons.prototype.getState=function(b){if(null!=b)if(b=b.cell,this.graph.getModel().contains(b)){if(this.graph.getModel().isVertex(b)&&!this.graph.isCellConnectable(b)){var e=this.graph.getModel().getParent(b);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(b=e)}if(this.graph.isCellLocked(b)||this.graph.model.isEdge(b))b=null;b=this.graph.view.getState(b);null!=b&&null==b.style&&(b=null)}else b=null;return b};
+HoverIcons.prototype.update=function(b,e,k){if(!this.graph.connectionArrowsEnabled||null!=this.graph.freehand&&this.graph.freehand.isDrawing()||null!=b&&"0"==mxUtils.getValue(b.style,"allowArrows","1"))this.reset();else{null!=b&&null!=b.cell.geometry&&b.cell.geometry.relative&&this.graph.model.isEdge(b.cell.parent)&&(b=null);var l=null;this.prev!=b||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=b,l=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=b&&(this.updateThread=
+window.setTimeout(mxUtils.bind(this,function(){this.isActive()||this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=b,this.update(b,e,k))}),this.updateDelay+10))):null!=this.startTime&&(l=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=b&&l<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,e,k)?this.reset(!1):(null!=this.currentState||l>this.activationDelay)&&this.currentState!=b&&(l>this.updateDelay&&null!=
+b||null==this.bbox||null==e||null==k||!mxUtils.contains(this.bbox,e,k))&&(null!=b&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(b),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=b&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
+HoverIcons.prototype.setCurrentState=function(b){"eastwest"!=b.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=b};Graph.prototype.createParent=function(b,e,k,l,C){b=this.cloneCell(b);for(var p=0;p<k;p++){var E=this.cloneCell(e),M=this.getCellGeometry(E);null!=M&&(M.x+=p*l,M.y+=p*C);b.insert(E)}return b};
+Graph.prototype.createTable=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:60;l=null!=l?l:40;p=null!=p?p:30;M=null!=M?M:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";S=null!=S?S:"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;overflow=hidden;fillColor=none;top=0;left=0;bottom=0;right=0;pointerEvents=1;";return this.createParent(this.createVertex(null,
+null,null!=C?C:"",0,0,e*k,b*l+(null!=C?p:0),null!=E?E:"shape=table;startSize="+(null!=C?p:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,e*k,l,M),this.createVertex(null,null,"",0,0,k,l,S),e,k,0),b,0,l)};
+Graph.prototype.setTableValues=function(b,e,k){for(var l=this.model.getChildCells(b,!0),C=0;C<l.length;C++)if(null!=k&&(l[C].value=k[C]),null!=e)for(var p=this.model.getChildCells(l[C],!0),E=0;E<p.length;E++)null!=e[C][E]&&(p[E].value=e[C][E]);return b};
+Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,l,C,p,E,M,S){k=null!=k?k:120;l=null!=l?l:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";M=null!=M?M:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+S=null!=S?S:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";C=this.createVertex(null,null,null!=C?C:"",0,0,e*k,b*l,null!=p?p:"shape=table;childLayout=tableLayout;"+(null==C?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");p=mxUtils.getValue(this.getCellStyle(C),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);C.geometry.width+=p;C.geometry.height+=p;E=this.createVertex(null,
+null,"",0,p,e*k+p,l,E);C.insert(this.createParent(E,this.createVertex(null,null,"",p,0,k,l,M),e,k,0));return 1<b?(E.geometry.y=l+p,this.createParent(C,this.createParent(E,this.createVertex(null,null,"",p,0,k,l,S),e,k,0),b-1,0,l)):C};
+Graph.prototype.visitTableCells=function(b,e){var k=null,l=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var C=0;C<l.length;C++){for(var p=this.getActualStartSize(l[C],!0),E=this.model.getChildCells(l[C],!0),M=this.getCellStyle(l[C],!0),S=null,H=[],K=0;K<E.length;K++){var Q=this.getCellGeometry(E[K]),d={cell:E[K],rospan:1,colspan:1,row:C,col:K,geo:Q};Q=null!=Q.alternateBounds?Q.alternateBounds:Q;d.point=new mxPoint(Q.width+(null!=S?S.point.x:b.x+p.x),Q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+p.y));d.actual=d;null!=k&&null!=k[K]&&1<k[K].rowspan?(d.rowspan=k[K].rowspan-1,d.colspan=k[K].colspan,d.actual=k[K].actual):null!=S&&1<S.colspan?(d.rowspan=S.rowspan,d.colspan=S.colspan-1,d.actual=S.actual):(S=this.getCurrentCellStyle(E[K],!0),null!=S&&(d.rowspan=parseInt(S.rowspan||1),d.colspan=parseInt(S.colspan||1)));S=1==mxUtils.getValue(M,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(d,E.length,
+l.length,b.x+(S?p.x:0),b.y+(S?p.y:0));H.push(d);S=d}k=H}};Graph.prototype.getTableLines=function(b,e,k){var l=[],C=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(p,E,M,S,H){e&&p.row<M-1&&(null==l[p.row]&&(l[p.row]=[new mxPoint(S,p.point.y)]),1<p.rowspan&&l[p.row].push(null),l[p.row].push(p.point));k&&p.col<E-1&&(null==C[p.col]&&(C[p.col]=[new mxPoint(p.point.x,H)]),1<p.colspan&&C[p.col].push(null),C[p.col].push(p.point))}));return l.concat(C)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,d,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var B=this.getCellGeometry(b);if(null!=B){B=B.clone();B.height+=d;l.setGeometry(b,B);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=d,H.height-=d,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=d,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,d,k){k=null!=k?k:!1;var l=this.getModel(),B=l.getParent(b),p=l.getParent(B),E=l.getChildCells(B,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){B=S[H];E=l.getChildCells(B,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=d,null!=Q.alternateBounds&&(Q.alternateBounds.width+=d),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
-Q.x+=d,k||(Q.width-=d,null!=Q.alternateBounds&&(Q.alternateBounds.width-=d)),l.setGeometry(K,Q)))}if(M||k){var e=this.getCellGeometry(p);null!=e&&(e=e.clone(),e.width+=d,l.setGeometry(p,e))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,d){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var B=this.graph.getCellGeometry(b[l]);null!=B&&(k+=d?B.width:B.height)}return k};
-TableLayout.prototype.getRowLayout=function(b,d){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);d=d-l.x-l.width;var B=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*d/b,B.push(Math.round(l)))}return B};
-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),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],
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var l=this.getModel();l.beginUpdate();try{var C=this.getCellGeometry(b);if(null!=C){C=C.clone();C.height+=e;l.setGeometry(b,C);var p=l.getParent(b),E=l.getChildCells(p,!0);if(!k){var M=mxUtils.indexOf(E,b);if(M<E.length-1){var S=E[M+1],H=this.getCellGeometry(S);null!=H&&(H=H.clone(),H.y+=e,H.height-=e,l.setGeometry(S,H))}}var K=this.getCellGeometry(p);null!=K&&(k||(k=b==E[E.length-1]),k&&(K=K.clone(),K.height+=e,l.setGeometry(p,K)))}}finally{l.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var l=this.getModel(),C=l.getParent(b),p=l.getParent(C),E=l.getChildCells(C,!0);b=mxUtils.indexOf(E,b);var M=b==E.length-1;l.beginUpdate();try{for(var S=l.getChildCells(p,!0),H=0;H<S.length;H++){C=S[H];E=l.getChildCells(C,!0);var K=E[b],Q=this.getCellGeometry(K);null!=Q&&(Q=Q.clone(),Q.width+=e,null!=Q.alternateBounds&&(Q.alternateBounds.width+=e),l.setGeometry(K,Q));b<E.length-1&&(K=E[b+1],Q=this.getCellGeometry(K),null!=Q&&(Q=Q.clone(),
+Q.x+=e,k||(Q.width-=e,null!=Q.alternateBounds&&(Q.alternateBounds.width-=e)),l.setGeometry(K,Q)))}if(M||k){var d=this.getCellGeometry(p);null!=d&&(d=d.clone(),d.width+=e,l.setGeometry(p,d))}null!=this.layoutManager&&this.layoutManager.executeLayout(p)}finally{l.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,l=0;l<b.length;l++)if(!this.isVertexIgnored(b[l])){var C=this.graph.getCellGeometry(b[l]);null!=C&&(k+=e?C.width:C.height)}return k};
+TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),l=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-l.x-l.width;var C=[];l=l.x;for(var p=0;p<k.length;p++){var E=this.graph.getCellGeometry(k[p]);null!=E&&(l+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,C.push(Math.round(l)))}return C};
+TableLayout.prototype.layoutRow=function(b,e,k,l){var C=this.graph.getModel(),p=C.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,M=0;null!=e&&(e=e.slice(),e.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!=e?(H.x=e[S],H.width=e[S+1]-H.x,S==p.length-1&&S<e.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),C.setGeometry(p[S],H))}return M};
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),l=this.graph.getCellStyle(b),C="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-e.y-e.height,H=k.width-e.x-e.width,K=E.getChildCells(b,!0),Q=0;Q<K.length;Q++)E.setVisible(K[Q],!0);var d=this.getSize(K,!1);if(0<S&&0<H&&0<
+K.length&&0<d){if(C){var f=this.graph.getCellGeometry(K[K.length-1]);null!=f&&(f=f.clone(),f.height=S-d+f.height,E.setGeometry(K[K.length-1],f))}var g=p?null:this.getRowLayout(K[0],H),v=[],x=e.y;for(Q=0;Q<K.length;Q++)f=this.graph.getCellGeometry(K[Q]),null!=f&&(f=f.clone(),f.x=e.x,f.width=H,f.y=Math.round(x),x=C||l?x+f.height:x+f.height/d*S,f.height=Math.round(x)-f.y,E.setGeometry(K[Q],f)),M=Math.max(M,this.layoutRow(K[Q],g,f.height,H,v));l&&S<d&&(k=k.clone(),k.height=x+e.height,E.setGeometry(b,
+k));p&&H<M+Graph.minTableColumnWidth&&(k=k.clone(),k.width=M+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(B){E.setVisible(B.cell,B.actual.cell==B.cell);if(B.actual.cell!=B.cell){if(B.actual.row==B.row){var I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo;B.actual.geo.width+=I.width}B.actual.col==B.col&&(I=null!=B.geo.alternateBounds?B.geo.alternateBounds:B.geo,B.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,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)}})();
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(K,Q){Q=null!=Q?Q:!0;var d=this.getState(K);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=e.apply(this,
+arguments);null!=d&&Q&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};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 C=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(K){C.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 d=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;d=!1;f=[];for(var x=0;x<Q.length-1;x++){for(var B=Q[x+1],I=Q[x],D=[],N=Q[x+2];x<Q.length-2&&mxUtils.ptSegDistSq(I.x,I.y,N.x,N.y,B.x,B.y)<1*this.scale*this.scale;)B=N,x++,N=Q[x+2];d=g(0,I.x,I.y)||d;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,B.x,B.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-B.x)>v||Math.abs(N.y-B.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++)d=g(1,D[ia].x,D[ia].y)||d}N=Q[Q.length-1];d=g(0,N.x,N.y)||d}K.routedPoints=f;return d}return!1};var p=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(K,Q,d){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"),x=!0,B=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!=B&&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-B.x,ka.y-B.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=B.x-ka.x,ca=B.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,d,f,!1,null,x),D=0>Math.round(N.x)||0==Math.round(N.x)&&0>=Math.round(N.y)?1:-1,x=!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),x=!0),D=[ia],ja=!0))}else N=null;ja||(D.push(ka),B=ka)}this.addPoints(K,D,d,f,!1,null,x);K.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(K,Q,d,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,d,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,d,f),v=this.graph.isOrthogonal(K),x=mxUtils.toRadians(Number(Q.style[mxConstants.STYLE_ROTATION]||"0")),B=new mxPoint(Q.getCenterX(),
+Q.getCenterY());if(0!=x){var I=Math.cos(-x),D=Math.sin(-x);g=mxUtils.getRotatedPoint(g,I,D,B)}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==x&&v,I);0!=x&&(I=Math.cos(x),D=Math.sin(x),g=mxUtils.getRotatedPoint(g,I,D,B));K.setAbsoluteTerminalPoint(this.snapToAnchorPoint(K,Q,d,f,g),f)}};mxGraphView.prototype.snapToAnchorPoint=function(K,Q,
+d,f,g){if(null!=Q&&null!=K){K=this.graph.getAllConnectionConstraints(Q);f=d=null;if(null!=K)for(var v=0;v<K.length;v++){var x=this.graph.getConnectionPoint(Q,K[v]);if(null!=x){var B=(x.x-g.x)*(x.x-g.x)+(x.y-g.y)*(x.y-g.y);if(null==f||B<f)d=x,f=B}}null!=d&&(g=d)}return g};var S=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(K,Q,d){var f=S.apply(this,arguments);"1"==K.getAttribute("placeholders")&&null!=d.state&&(f=d.state.view.graph.replacePlaceholders(d.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 d=Q.substring(8,Q.length-1),f=mxUtils.parseXml(Graph.decompress(d));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,
-null);else if(".js"==B.toLowerCase().substring(B.length-3,B.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(B);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,d,B,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);d=mxStencilRegistry.stencils[b]}}return d};
-mxStencilRegistry.getBasenameForStencil=function(b){var d=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){d=b[1];for(var k=2;k<b.length-1;k++)d+="/"+b[k]}return d};
-mxStencilRegistry.loadStencilSet=function(b,d,k,l){var B=mxStencilRegistry.packages[b];if(null!=k&&k||null==B){var p=!1;if(null==B)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,d,p))}));return}B=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=B;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=B&&null!=
-B.documentElement&&mxStencilRegistry.parseStencilSet(B.documentElement,d,p)}};mxStencilRegistry.loadStencil=function(b,d){if(null!=d)mxUtils.get(b,mxUtils.bind(this,function(k){d(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var d=0;d<b.length;d++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[d]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(b,d,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,d,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var B="";b=b.getAttribute("name");for(null!=b&&(B=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){B=B.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(B+p.toLowerCase(),new mxStencil(l));if(null!=d){var E=l.getAttribute("w"),
-M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);d(B,p,b,E,M)}}l=l.nextSibling}}};
-"undefined"!==typeof mxVertexHandler&&function(){function b(){var x=document.createElement("div");x.className="geHint";x.style.whiteSpace="nowrap";x.style.position="absolute";return x}function d(x,O){switch(O){case mxConstants.POINTS:return x;case mxConstants.MILLIMETERS:return(x/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(x/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(x/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
+mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var l=0;l<e.length;l++){var C=e[l];if(!mxStencilRegistry.filesLoaded[C])if(mxStencilRegistry.filesLoaded[C]=!0,".xml"==C.toLowerCase().substring(C.length-4,C.length))mxStencilRegistry.loadStencilSet(C,
+null);else if(".js"==C.toLowerCase().substring(C.length-3,C.length))try{if(mxStencilRegistry.allowEval){var p=mxUtils.load(C);null!=p&&200<=p.getStatus()&&299>=p.getStatus()&&eval.call(window,p.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,C,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
+mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
+mxStencilRegistry.loadStencilSet=function(b,e,k,l){var C=mxStencilRegistry.packages[b];if(null!=k&&k||null==C){var p=!1;if(null==C)try{if(l){mxStencilRegistry.loadStencil(b,mxUtils.bind(this,function(E){null!=E&&null!=E.documentElement&&(mxStencilRegistry.packages[b]=E,p=!0,mxStencilRegistry.parseStencilSet(E.documentElement,e,p))}));return}C=mxStencilRegistry.loadStencil(b);mxStencilRegistry.packages[b]=C;p=!0}catch(E){null!=window.console&&console.log("error in loadStencilSet:",b,E)}null!=C&&null!=
+C.documentElement&&mxStencilRegistry.parseStencilSet(C.documentElement,e,p)}};mxStencilRegistry.loadStencil=function(b,e){if(null!=e)mxUtils.get(b,mxUtils.bind(this,function(k){e(200<=k.getStatus()&&299>=k.getStatus()?k.getXml():null)}));else return mxUtils.load(b).getXml()};mxStencilRegistry.parseStencilSets=function(b){for(var e=0;e<b.length;e++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(b[e]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(b,e,k){if("stencils"==b.nodeName)for(var l=b.firstChild;null!=l;)"shapes"==l.nodeName&&mxStencilRegistry.parseStencilSet(l,e,k),l=l.nextSibling;else{k=null!=k?k:!0;l=b.firstChild;var C="";b=b.getAttribute("name");for(null!=b&&(C=b+".");null!=l;){if(l.nodeType==mxConstants.NODETYPE_ELEMENT&&(b=l.getAttribute("name"),null!=b)){C=C.toLowerCase();var p=b.replace(/ /g,"_");k&&mxStencilRegistry.addStencil(C+p.toLowerCase(),new mxStencil(l));if(null!=e){var E=l.getAttribute("w"),
+M=l.getAttribute("h");E=null==E?80:parseInt(E,10);M=null==M?80:parseInt(M,10);e(C,p,b,E,M)}}l=l.nextSibling}}};
+"undefined"!==typeof mxVertexHandler&&function(){function b(){var y=document.createElement("div");y.className="geHint";y.style.whiteSpace="nowrap";y.style.position="absolute";return y}function e(y,O){switch(O){case mxConstants.POINTS:return y;case mxConstants.MILLIMETERS:return(y/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(y/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(y/mxConstants.PIXELS_PER_INCH).toFixed(2)}}mxConstants.HANDLE_FILLCOLOR="#29b6f2";
mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR="#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=5;mxEdgeHandler.prototype.snapToTerminals=
-!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(x){return!mxEvent.isAltDown(x)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(x){return k.apply(this,arguments)||this.graph.isTableRow(x)||this.graph.isTableCell(x)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(x){return l.apply(this,arguments)||
-this.graph.isEdgeIgnored(x)};var B=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(x){return this.graph.isCloneEvent(x)!=B.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var x=new mxEllipse(null,this.highlightColor,this.highlightColor,0);x.opacity=mxConstants.HIGHLIGHT_OPACITY;return x};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(x){x=this.graph.createCurrentEdgeStyle();x=this.graph.createEdge(null,null,null,null,null,x);x=new mxCellState(this.graph.view,x,this.graph.getCellStyle(x));for(var O in this.graph.currentEdgeStyle)x.style[O]=this.graph.currentEdgeStyle[O];x.style=this.graph.postProcessCellStyle(x.cell,x.style);return x};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var x=p.apply(this,arguments);x.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-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 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 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!=
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var l=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return l.apply(this,arguments)||
+this.graph.isEdgeIgnored(y)};var C=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=C.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
+function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var O in this.graph.currentEdgeStyle)y.style[O]=this.graph.currentEdgeStyle[O];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var p=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=p.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),O=y.getCell;y.getCell=mxUtils.bind(this,function(P){var X=O.apply(this,arguments);this.error=null;return X});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var y="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]]&&(y+=O[P]+"="+this.currentEdgeStyle[O[P]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,O){O=null!=O?O:{};for(var P=0;P<y.length;P++){var X=y[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(y,O,P){P=null!=P?P:{};for(var X in y){var ba=O[X];null==P[ba]&&(P[ba]=y[X].getId()||"")}return P};Graph.prototype.importGraphModel=function(y,O,P,X){O=null!=O?O:0;P=null!=P?P:0;var ba=new mxCodec(y.ownerDocument),W=new mxGraphModel;ba.decode(y,W);y=[];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&&(y=y.concat(va));else{var va=W.getChildren(ta[0]);null!=va&&(y=this.moveCells(va,O,P,!1,this.getDefaultParent()),ea[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(ba,qa,ea),this.updateCustomLinks(ea,y),X)){this.isGridEnabled()&&
+(O=this.snap(O),P=this.snap(P));var Ea=this.getBoundingBoxFromGeometry(y,!0);null!=Ea&&this.moveCells(y,O-Ea.x,P-Ea.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var O={},P=this.cloneCells(y,null,O),X=new mxDictionary,ba=0;ba<y.length;ba++)X.put(y[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(y[ba]);if(null!=qa){var va=this.getCellGeometry(P[ba]);null!=
+va&&va.relative&&!this.model.isEdge(y[ba])&&null==X.get(this.model.getParent(y[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(y)),P);return W.encode(ea)};Graph.prototype.isSwimlane=function(y,O){var P=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(P=this.getCurrentCellStyle(y,O)[mxConstants.STYLE_SHAPE]);return P==
+mxConstants.SHAPE_SWIMLANE||"table"==P||"tableRow"==P};var M=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var O=this.model.getParent(y);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(y,O,P,X,ba,W,ea,ta){null==ta&&(ta=this.model.getParent(y),this.isTable(ta)||this.isTableRow(ta))&&(ta=this.getCellAt(W,ea,null,
+!0,!1));P=null;this.model.beginUpdate();try{P=S.apply(this,[y,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(y,!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,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);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,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),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(y,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(y&&null==X&&0<W.length||null!=ba&&y&&W.length>ba||!y&&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+(y?1:-1),W.length):0,this.setSelectionCell(W[ba]))}};Graph.prototype.swapShapes=function(y,O,P,X,ba,W,ea){O=!1;if(!X&&null!=ba&&1==y.length&&(X=this.view.getState(ba),P=this.view.getState(y[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(y[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(y[0],X)}finally{this.model.endUpdate()}O=!0}return O};var K=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,O,P,X,ba,W,ea){if(this.swapShapes(y,O,P,X,ba,W,ea))return y;ea=null!=ea?ea:{};if(this.isTable(ba)){for(var ta=[],qa=0;qa<y.length;qa++)this.isTable(y[qa])?ta=ta.concat(this.model.getChildCells(y[qa],!0).reverse()):ta.push(y[qa]);y=ta}this.model.beginUpdate();try{ta=[];for(qa=0;qa<y.length;qa++)if(null!=ba&&this.isTableRow(y[qa])){var va=this.model.getParent(y[qa]),
+Ea=this.getCellGeometry(y[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){y[qa]=X?this.cloneCell(y[qa]):y[qa];var Sa=this.model.getChildCells(y[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(y[qa],Pa))}else if(0>Fa)for(Ka=0;Ka>Fa;Ka--)this.model.remove(Sa[Sa.length+Ka-1]);Sa=this.model.getChildCells(y[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(y)),cb)}finally{this.model.endUpdate()}return cb};var Q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,O){var P=[];this.model.beginUpdate();try{for(var X=0;X<y.length;X++)if(this.isTableCell(y[X])){var ba=this.model.getParent(y[X]),W=this.model.getParent(ba);1==this.model.getChildCount(ba)&&1==this.model.getChildCount(W)?
+0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(P,W)&&P.push(W):this.labelChanged(y[X],"")}else{if(this.isTableRow(y[X])&&(W=this.model.getParent(y[X]),0>mxUtils.indexOf(y,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(y,ea[qa])&&ta++;ta==ea.length&&P.push(W)}P.push(y[X])}P=Q.apply(this,[P,O])}finally{this.model.endUpdate()}return P};Graph.prototype.updateCustomLinks=function(y,O,P){P=null!=P?P:new Graph;for(var X=0;X<O.length;X++)null!=
+O[X]&&P.updateCustomLinksForCell(y,O[X],P)};Graph.prototype.updateCustomLinksForCell=function(y,O){this.doUpdateCustomLinksForCell(y,O);for(var P=this.model.getChildCount(O),X=0;X<P;X++)this.updateCustomLinksForCell(y,this.model.getChildAt(O,X))};Graph.prototype.doUpdateCustomLinksForCell=function(y,O){};Graph.prototype.getAllConnectionConstraints=function(y,O){if(null!=y){O=mxUtils.getValue(y.style,"points",null);if(null!=O){y=[];try{var P=JSON.parse(O);for(O=0;O<P.length;O++){var X=P[O];y.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 y}if(null!=y.shape&&null!=y.shape.bounds){X=y.shape.direction;O=y.shape.bounds;var ba=y.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=y.shape.getConstraints(y.style,P,O);if(null!=O)return O;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};
+Graph.prototype.flipEdge=function(y){if(null!=y){var O=this.getCurrentCellStyle(y);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,[y])}};Graph.prototype.isValidRoot=function(y){for(var O=this.model.getChildCount(y),P=0,X=0;X<O;X++){var ba=this.model.getChildAt(y,X);this.model.isVertex(ba)&&(ba=this.getCellGeometry(ba),null==ba||ba.relative||
+P++)}return 0<P||this.isContainer(y)};Graph.prototype.isValidDropTarget=function(y,O,P){for(var X=this.getCurrentCellStyle(y),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(y))&&"0"!=mxUtils.getValue(X,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&
+!this.isTableRow(y)&&(!this.isTable(y)||W||ba))&&!this.isCellLocked(y)};Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var O=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(O&&null!=y&&null!=this.layoutManager){var P=this.model.getParent(y);null!=P&&(P=this.layoutManager.getLayout(P),null!=P&&P.constructor==mxStackLayout&&(O=!1))}return O};Graph.prototype.getPreferredSizeForCell=
+function(y){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(y,O){var P=this.getModel(),X=[];P.beginUpdate();try{for(var ba=0;ba<y.length;ba++){var W=y[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"),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 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,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 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,
+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(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=
+y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;y=y.nextSibling}return!1};var d=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var O=y.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)}d.apply(this,arguments);y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var O=0;O<y.length;O++){var P=this.view.getState(y[O]);null!=P&&null!=P.shape&&null!=P.shape.stencil&&this.stencilHasPlaceholders(P.shape.stencil)?this.removeStateForCell(y[O]):
+this.isReplacePlaceholders(y[O])&&this.view.invalidate(y[O],!1,!1)}};Graph.prototype.replaceElement=function(y,O){O=y.ownerDocument.createElement(null!=O?O:"span");for(var P=Array.prototype.slice.call(y.attributes);attr=P.pop();)O.setAttribute(attr.nodeName,attr.nodeValue);O.innerHTML=y.innerHTML;y.parentNode.replaceChild(O,y)};Graph.prototype.processElements=function(y,O){if(null!=y){y=y.getElementsByTagName("*");for(var P=0;P<y.length;P++)O(y[P])}};Graph.prototype.updateLabelElements=function(y,
+O,P){y=null!=y?y:this.getSelectionCells();for(var X=document.createElement("div"),ba=0;ba<y.length;ba++)if(this.isHtmlLabel(y[ba])){var W=this.convertValueToString(y[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(y[ba],X.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,O,P){O=Graph.zapGremlins(O);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&
+null!=y.getAttribute("placeholder"))for(var X=y.getAttribute("placeholder"),ba=y;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=y.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(y){if(null!=y){for(var O=new mxDictionary,P=0;P<y.length;P++)O.put(y[P],!0);var X=[];for(P=0;P<y.length;P++){var ba=this.model.getParent(y[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&&y.push(ba.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var O=[],P=0;P<y.length;P++)this.isCellDeletable(y[P])&&this.isTransparentState(this.view.getState(y[P]))&&O.push(y[P]);y=O;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,O){this.setAttributeForCell(y,"link",O)};Graph.prototype.setTooltipForCell=function(y,
+O){var P="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(P="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,P,O)};Graph.prototype.getAttributeForCell=function(y,O,P){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(O):null;return null!=y?y:P};Graph.prototype.setAttributeForCell=function(y,O,P){if(null!=y.value&&"object"==typeof y.value)var X=y.value.cloneNode(!0);else X=mxUtils.createXmlDocument().createElement("UserObject"),
+X.setAttribute("label",y.value||"");null!=P?X.setAttribute(O,P):X.removeAttribute(O);this.model.setValue(y,X)};var f=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,O,P,X){this.getModel();if(mxEvent.isAltDown(O))return null;for(var ba=0;ba<y.length;ba++){var W=this.model.getParent(y[ba]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(y,W))return null}W=f.apply(this,arguments);var ea=!0;for(ba=0;ba<y.length&&ea;ba++)ea=ea&&this.isTableRow(y[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(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,O){this.isEnabled()&&(O=this.insertTextForEvent(y,O),mxGraph.prototype.dblClick.call(this,y,O))};Graph.prototype.insertTextForEvent=function(y,O){var P=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=
+y&&!this.model.isVertex(O)){var X=this.model.isEdge(O)?this.view.getState(O):null,ba=mxEvent.getSource(y);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(y)))||(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 y=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+y),this.snap(P+y))};Graph.prototype.getFreeInsertPoint=function(){var y=
+this.view,O=this.getGraphBounds(),P=this.getInsertPoint(),X=this.snap(Math.round(Math.max(P.x,O.x/y.scale-y.translate.x+(0==O.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(P.y,(O.y+O.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(X,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y: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-
+y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,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 ba=this.view.getRelativePoint(P,y,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((y-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(y/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(y,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!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(ea,y,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,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!=
+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(y,O){y=null!=y?y:this.getSelectionCells();O=null!=O?O:!0;for(var P=0;P<y.length;P++)this.isTableCell(y[P])&&
+(y[P]=this.model.getParent(y[P]));y=this.model.getTopmostCells(y);var X=this.getModel(),ba=this.gridSize,W=[];X.beginUpdate();try{var ea={},ta=this.createCellLookup(y),qa=this.cloneCells(y,!1,ea,!0);for(P=0;P<y.length;P++){var va=X.getParent(y[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(y[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(y,O,P){if(null!=y&&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,y);y=this.cellEditor.textarea.getElementsByTagName("img");
+if(y.length==ba.length+1)for(W=y.length-1;0<=W;W--)if(0==W||y[W]!=ba[W-1]){y[W].setAttribute("width",O);y[W].setAttribute("height",P);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.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(y));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(y))};Graph.prototype.isCellResizable=function(y){var O=mxGraph.prototype.isCellResizable.apply(this,arguments),P=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(O||"0"!=mxUtils.getValue(P,mxConstants.STYLE_RESIZABLE,
+"1")&&"wrap"==P[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,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=y?qa.getCenterX():qa.getCenterY();ba=null!=ba?Math.max(ba,va):va;W=null!=W?Math.min(W,va):va;P&&(ea+=y?qa.width:qa.height);X.push(qa)}}if(2<X.length){X.sort(function(Qa,Fa){return y?Qa.x-Fa.x:Qa.y-Fa.y});
+P&&(ea-=y?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-(y?qa.x:qa.y);ba=ba/va-(y?qa.x:qa.y);this.getModel().beginUpdate();try{var Ea=(ba-W-ea)/(X.length-1),Ca=W+(P?y?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(),y?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+=y?X[ta].width:X[ta].height)}}finally{this.getModel().endUpdate()}}}return O};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(O,P){return this.getLinkForCell(O.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var O=
+null;null!=y&&0<y.length&&(y=JSON.parse(y),O=new mxImage(y.src,y.width,y.height));return O};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,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;
+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),y),$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)?
+arguments)}else return rb.apply(this,arguments)};var mb=this.backgroundImage;if(null!=mb){y=Ka/O;var vb=this.view.translate;Ma=new mxRectangle((mb.x+vb.x)*y,(mb.y+vb.y)*y,mb.width*y,mb.height*y);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,
+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(y,O){if("0"!=urlParams["svg-warning"]&&0<O.getElementsByTagName("foreignObject").length){var P=y.createElement("switch"),X=y.createElement("g");X.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ba=y.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"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);
+P.appendChild(X);ba.appendChild(y);P.appendChild(ba);O.appendChild(P)}};Graph.prototype.updateSvgLinks=function(y,O,P){y=y.getElementsByTagName("a");for(var X=0;X<y.length;X++)if(null==y[X].getAttribute("target")){var ba=y[X].getAttribute("href");null==ba&&(ba=y[X].getAttribute("xlink:href"));null!=ba&&(null!=O&&/^https?:\/\//.test(ba)?y[X].setAttribute("target",O):P&&this.isCustomLink(ba)&&y[X].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);
+y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var O=window.getSelection();O.getRangeAt&&O.rangeCount&&(y=O.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;
+null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,O,P){for(;null!=y&&y.nodeName!=O;){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,O,P){for(;null!=y&&!(0<=mxUtils.indexOf(O,y.nodeName));){if(y==P)return null;y=y.parentNode}return y};Graph.prototype.selectNode=
+function(y){var O=null;if(window.getSelection){if(O=window.getSelection(),O.getRangeAt&&O.rangeCount){var P=document.createRange();P.selectNode(y);O.removeAllRanges();O.addRange(P)}}else(O=document.selection)&&"Control"!=O.type&&(y=O.createRange(),y.collapse(!0),P=O.createRange(),P.setEndPoint("StartToStart",y),P.select())};Graph.prototype.flipEdgePoints=function(y,O,P){var X=this.getCellGeometry(y);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(y,X)}};Graph.prototype.flipChildren=function(y,O,P){this.model.beginUpdate();try{for(var X=this.model.getChildCount(y),ba=0;ba<X;ba++){var W=this.model.getChildAt(y,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(y,O){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var P=[],X=0;X<y.length;X++)if(this.model.isEdge(y[X])){var ba=this.view.getState(y[X]);null!=ba&&this.flipEdgePoints(y[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(y[X]);null!=W&&this.flipChildren(y[X],
+O,O?W.getCenterX()-W.x:W.getCenterY()-W.y);P.push(y[X])}this.toggleCellStyles(O?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,P)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,O){var P=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var X=0;X<y.length;X++){var ba=this.model.getParent(y[X]);if(this.isTable(ba)){var W=this.getCellGeometry(y[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(y):null;this.removeCells(y,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(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=0;if(this.isTableCell(y)){var W=P.getParent(y);X=P.getParent(W);ba=mxUtils.indexOf(P.getChildCells(W,!0),y)}else this.isTableRow(y)?X=P.getParent(y):
+y=P.getChildCells(X,!0)[0],O||(ba=P.getChildCells(y,!0).length-1);var ea=P.getChildCells(X,!0),ta=Graph.minTableColumnWidth;for(y=0;y<ea.length;y++){var qa=P.getChildCells(ea[y],!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[y]);
+null!=Ca&&(Ea.height=Ca.height)}P.add(ea[y],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(y){var O=this.getModel();O.beginUpdate();try{var P=null;P="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:O.getParent(y);var X=O.getChildCells(P,!0);0==X.length?O.remove(P):(P==y&&(y=X[X.length-1]),O.remove(y))}finally{O.endUpdate()}};Graph.prototype.insertLane=function(y,O){var P=this.getModel();
+P.beginUpdate();try{var X=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){X=y;var ba=P.getChildCells(X,!0);y=ba[O?0:ba.length-1]}else X=P.getParent(y);var W=X.getIndex(y);y=P.cloneCell(y,!1);y.value=null;P.add(X,y,W+(O?0:1))}finally{P.endUpdate()}};Graph.prototype.insertTableRow=function(y,O){var P=this.getModel();P.beginUpdate();try{var X=y,ba=y;if(this.isTableCell(y))ba=P.getParent(y),X=P.getParent(ba);else if(this.isTableRow(y))X=P.getParent(y);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++){y=P.cloneCell(ea[W],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var va=this.getCellGeometry(y);null!=va&&(null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null),va.height=qa.height);ba.insert(y)}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(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(X=O.getParent(y));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(y)&&
+(ea=mxUtils.indexOf(W,y));for(X=y=0;X<ba.length;X++){var ta=O.getChildCells(ba[X],!0)[ea];O.remove(ta);var qa=this.getCellGeometry(ta);null!=qa&&(y=Math.max(y,qa.width))}var va=this.getCellGeometry(P);null!=va&&(va=va.clone(),va.width-=y,O.setGeometry(P,va))}}}finally{O.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var O=this.getModel();O.beginUpdate();try{var P=y,X=y;this.isTableCell(y)&&(y=X=O.getParent(y));this.isTableRow(y)&&(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);y=0;var W=this.getCellGeometry(X);null!=W&&(y=W.height);var ea=this.getCellGeometry(P);null!=ea&&(ea=ea.clone(),ea.height-=y,O.setGeometry(P,ea))}}finally{O.endUpdate()}};Graph.prototype.insertRow=function(y,O){for(var P=y.tBodies[0],X=P.rows[0].cells,ba=y=0;ba<X.length;ba++){var W=X[ba].getAttribute("colspan");y+=null!=W?parseInt(W):1}O=P.insertRow(O);for(ba=0;ba<y;ba++)mxUtils.br(O.insertCell(-1));return O.cells[0]};Graph.prototype.deleteRow=
+function(y,O){y.tBodies[0].deleteRow(O)};Graph.prototype.insertColumn=function(y,O){var P=y.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)}y=y.tBodies[0];for(P=0;P<y.rows.length;P++)X=y.rows[P].insertCell(O),mxUtils.br(X);return y.rows[0].cells[0<=O?O:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,O){if(0<=O){y=y.tBodies[0].rows;for(var P=0;P<y.length;P++)y[P].cells.length>O&&y[P].deleteCell(O)}};Graph.prototype.pasteHtmlAtCaret=
+function(y){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=y;y=document.createDocumentFragment();for(var X;X=P.firstChild;)lastNode=y.appendChild(X);O.insertNode(y)}}else(O=document.selection)&&"Control"!=O.type&&O.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,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}y=null!=y?y:"javascript:void(0);";if(null==O||0==O.length)O=this.isCustomLink(y)?this.getLinkTitle(y):y;var X=document.createElement("a");X.setAttribute("rel",this.linkRelation);X.setAttribute("href",this.getAbsoluteUrl(y));X.setAttribute("title",P(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&X.setAttribute("target",this.linkTarget);mxUtils.write(X,P(O,40));this.isCustomLink(y)&&mxEvent.addListener(X,"click",mxUtils.bind(this,function(ba){this.customLinkClicked(y);
+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 y=this.updateMouseEvent;this.updateMouseEvent=function(W){W=y.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!=
+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 y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y=
+"";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var O=this.textarea.ownerDocument.defaultView.getSelection(),P=O.getRangeAt(0),X="\t";if(null!=y)for(X="";0<y;)X+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(X));P.insertNode(y);P.setStartAfter(y);P.setEndAfter(y);O.removeAllRanges();
+O.addRange(P)};mxCellEditor.prototype.alignText=function(y,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(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=
+window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var O=[],P=0,X=y.rangeCount;P<X;++P)O.push(y.getRangeAt(P));return O}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var O=0,P=y.length;O<P;++O)sel.addRange(y[O])}else document.selection&&y.select&&y.select()}catch(X){}};var g=mxCellRenderer.prototype.initializeLabel;
+mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));g.apply(this,arguments)};var v=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,O){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?v.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=
+!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,O){y=this.graph.getStartEditingCell(y,O);x.apply(this,arguments);var P=this.graph.view.getState(y);this.textarea.className=null!=P&&1==P.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);P=this.graph.getModel().getParent(y);var X=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(P)&&null!=
+X&&X.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var B=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){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";
+ba.removeAttribute("cellspacing"),ba.removeAttribute("border"))):ba.parentNode.removeChild(ba)}B.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 y=this.graph.view.getState(this.editingCell);if(null!=y){var O=null!=y&&"0"!=mxUtils.getValue(y.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(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);O=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var X=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ba=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,ea=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&ea.push("underline");(mxUtils.getValue(y.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)));
+"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(y,
+O){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var P=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*P;this.bounds.height=60*P;var X=null!=y.text?y.text.margin:null;null==X&&(X=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.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)&&
+mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,O){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var P=this.graph.getEditingValue(y.cell,O);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(P=P.replace(/\n/g,"<br/>"));return P=this.graph.sanitizeHtml(P,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,
+"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var O=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return O="1"==mxUtils.getValue(y.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(y){this.codeViewMode&&this.toggleViewMode();D.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};
+var N=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,O){this.graph.getModel().beginUpdate();try{N.apply(this,arguments),""==O&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=O&&O!=mxConstants.NONE||
+!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getBorderColor=function(y){var O=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=O&&O!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,
+mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(O=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));O==mxConstants.NONE&&(O=null);return O};mxCellEditor.prototype.getMinimumSize=function(y){var O=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*O+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,O){return mxGraphHandlerIsValidDropTarget.apply(this,
+arguments)&&!mxEvent.isAltDown(O.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){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;y=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=e(y,P)+", "+e(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(y,O){G.apply(this,arguments);var P=this.graph.getCellStyle(y);
+if(null==P.childLayout){var X=this.graph.model.getParent(y),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 y(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)?y(X.getParent(X.getParent(ea))):this.graph.isTableRow(ea)&&y(X.getParent(ea));y(ea)}return ba};var ka=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var O=ka.apply(this,
+arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};var ja=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var O=ja.apply(this,arguments);O.stroke="#C0C0C0";O.strokewidth=1;return O};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-
+y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,O){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(O.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,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],
+mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||ra.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};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 y=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==y&&(y=[]);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*
+$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};y.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)||
+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};y.push(Fa)})(ba)}}return null!=y?y.reverse():null};var Y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(y){Y.apply(this,arguments);if(null!=this.moveHandles)for(var O=0;O<this.moveHandles.length;O++)this.moveHandles[O].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(O=0;O<this.cornerHandles.length;O++)this.cornerHandles[O].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=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<y.getChildCount(this.state.cell);O++)mxUtils.bind(this,function(P){if(null!=P&&y.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,
+this.moveHandles.push(X);this.graph.container.appendChild(X)}})(this.graph.view.getState(y.getChildAt(this.state.cell,O)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Z=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=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+
+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),y.x=this.sizers[0].bounds.width+O,y.y=this.sizers[0].bounds.height+O):y=Z.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){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{y=this.state.view.scale;var O=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),O)+" x "+e(this.roundLength(this.bounds.height/y),O)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
+y.y+y.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(y,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(y,O){q.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,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=
+e(ba,X)+", "+e(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(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.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"/>');
@@ -2652,78 +2656,78 @@ HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" f
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
-!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(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,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",
+!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.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(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var O=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(O)||mxEvent.isPopupTrigger(O)&&(null==y.getState()||mxEvent.isControlDown(O)||mxEvent.isShiftDown(O))};var F=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(y,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(y){var O=y.getEvent();return mxEvent.isLeftMouseButton(O)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(O)&&!mxEvent.isShiftDown(O))||this.usePopupTrigger&&mxEvent.isPopupTrigger(O)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,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=y=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(X=this.first.x,ba=this.first.y,y=(this.currentX-X)/this.graph.view.scale,W=(this.currentY-ba)/this.graph.view.scale,mxEvent.isAltDown(O.getEvent())||(y=this.graph.snap(y),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=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(y,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(y,O){if(!O.isConsumed()&&null!=this.first){var P=mxUtils.getScrollOrigin(this.graph.container);
+y=mxUtils.getOffset(this.graph.container);P.x-=y.x;P.y-=y.y;y=O.getX()+P.x;P=O.getY()+P.y;var X=this.first.x-y,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(y,P),this.isSpaceEvent(O)?(y=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=y-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 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),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();
+(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(y,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(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<U||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(y,O,P){O=null!=y&&0==y;var X=this.state.getVisibleTerminalState(O);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,X,O):null;P=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(O),y):null)?P?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&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(y,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(y){if(null!=y&&1==y.length){var O=this.graph.getModel(),P=O.getParent(y[0]),X=this.graph.getCellGeometry(y[0]);if(O.isEdge(P)&&null!=X&&X.relative&&(O=this.graph.view.getState(y[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 y=za.apply(this,arguments),O=[],P=0;P<y.length;P++)"1"!=mxUtils.getValue(y[P].style,"part","0")&&O.push(y[P]);return O};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var O=this.graph.getModel(),P=O.getParent(y.cell),X=this.graph.getCellGeometry(y.cell);return O.isEdge(P)&&null!=X&&X.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(O=y.text.unrotatedBoundingBox||
+y.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(y,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 y=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)&&y==mxConstants.NONE&&O==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
+var oa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,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(y,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 y=!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(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);
+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)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,O){try{if(null==y&&(null==O||0==O.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||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!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),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 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,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":"");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,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");
+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!=y||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 y=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,ba){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();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 y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+this.moveHandles[y].rowState.width-
+5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var O=this.cornerHandles,P=O[0].bounds.height/2;O[0].bounds.x=this.state.x-O[0].bounds.width/2+y;O[0].bounds.y=this.state.y-P+y;O[0].redraw();O[1].bounds.x=O[0].bounds.x+this.state.width-2*y;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*y;O[2].redraw();O[3].bounds.x=
+O[1].bounds.x;O[3].bounds.y=O[2].bounds.y;O[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].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&&(y=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",y),y=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(y.x+(y.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 y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&
+null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].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 y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(y.y+y.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,u){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=u?u:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function l(){mxCylinder.call(this)}function C(){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 d(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 x(){mxActor.call(this)}function B(){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 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)}
+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 y(){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,
+u,t));u=t}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.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)};e.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)}};e.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)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
+e);mxUtils.extend(k,e);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,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,
+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(C,
+mxCylinder);C.prototype.size=6;C.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",C);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;
+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(d,mxCylinder);d.prototype.size=
+15;d.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",d);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,
+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(x,mxActor);x.prototype.size=30;x.prototype.isRoundable=function(){return!0};x.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",x);mxUtils.extend(B,mxActor);B.prototype.size=.4;B.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()};B.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",B);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,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};d.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 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,
@@ -2787,8 +2791,8 @@ mxUtils.extend(Ia,mxActor);Ia.prototype.dx=20;Ia.prototype.dy=20;Ia.prototype.re
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,
+m,t),new mxPoint(n-m,z),new mxPoint(0,z)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("singleArrow",Ya);mxUtils.extend(y,mxActor);y.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",y);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,
@@ -2895,11 +2899,11 @@ Math.min(u.width,n.x-u.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(u
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))));
+"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",B.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(d.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]&&
+l.prototype.size,!1),card:ub(.5,x.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,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)),
@@ -2913,10 +2917,10 @@ Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))))
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,
+.5),!1));m>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};x.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,
+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};d.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,
@@ -2932,7 +2936,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
.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,
+.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)];B.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)];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,
@@ -2946,7 +2950,7 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Sa.prototype.constraint
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,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,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};y.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,
@@ -2954,18 +2958,18 @@ function(c,m,u){c=[];var n=Math.min(u,m),t=Math.max(0,Math.min(n,n*parseFloat(mx
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,
-g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,B=l.editor,p=B.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
+Actions.prototype.init=function(){function b(H){p.escape();H=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),H);null!=H&&p.setSelectionCells(H)}function e(){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,d,f){f.getModel().beginUpdate();try{var g=f.getCellGeometry(H);null!=g&&Q&&d&&(Q/=d,g=g.clone(),1<Q?g.height=g.width/Q:g.width=g.height*Q,f.getModel().setGeometry(H,
+g));f.setCellStyles(mxConstants.STYLE_CLIP_PATH,K,[H]);f.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[H])}finally{f.getModel().endUpdate()}}var l=this.editorUi,C=l.editor,p=C.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&p.isEnabled()};this.addAction("new...",function(){p.openLink(l.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";l.openFile()});this.addAction("smartFit",function(){p.popupMenuHandler.hideMenu();var H=p.view.scale,
K=p.view.translate.x,Q=p.view.translate.y;l.actions.get("resetView").funct();1E-5>Math.abs(H-p.view.scale)&&K==p.view.translate.x&&Q==p.view.translate.y&&l.actions.get(p.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){p.isEnabled()&&(p.isSelectionEmpty()?l.actions.get("smartFit").funct():p.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){l.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);B.graph.setSelectionCells(B.graph.importGraphModel(Q.documentElement))}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
+window.openFile.setConsumer(mxUtils.bind(this,function(H,K){try{var Q=mxUtils.parseXml(H);C.graph.setSelectionCells(C.graph.importGraphModel(Q.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}));l.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){l.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){l.saveFile(!0)},null,
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 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",
+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(d){if(null!=d){for(var f=!0,g=0;g<
+d.length&&f;g++)f=f&&p.model.isEdge(d[g]);var v=p.view.translate;g=p.view.scale;var x=v.x,B=v.y;v=null;if(1==d.length&&f){var I=p.getCellGeometry(d[0]);null!=I&&(v=I.getTerminalPoint(!0))}v=null!=v?v:p.getBoundingBoxFromGeometry(d,f);null!=v&&(f=Math.round(p.snap(p.popupMenuHandler.triggerX/g-x)),g=Math.round(p.snap(p.popupMenuHandler.triggerY/g-B)),p.cellsMoved(d,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(d){if(null!=d){p.getModel().beginUpdate();try{K(l.pasteXml(d,!0))}finally{p.getModel().endUpdate()}}else Q()}),H=!0)}catch(d){}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,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+
+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 x=d.getValue(g);v=g.cloneValue(v);v.removeAttribute("placeholders");null==x||isNaN(x.nodeType)||v.setAttribute("placeholders",x.getAttribute("placeholders"));null!=H&&mxEvent.isShiftDown(H)||v.setAttribute("label",p.convertValueToString(g));d.setValue(g,v)}H=null!=K?K:H;var d=p.getModel();if(p.isEnabled()&&!p.isSelectionEmpty()&&null!=l.copiedValue){d.beginUpdate();
+try{var f=p.getEditableCells(p.getSelectionCells());if(0==f.length)Q(d.getRoot(),l.copiedValue);else for(K=0;K<f.length;K++)Q(f[K],l.copiedValue)}finally{d.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(H,K){H=null!=K?K:H;null!=H&&mxEvent.isShiftDown(H)?e():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(){e()},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"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(H){H=p.getSelectionCell();p.isEnabled()&&null!=H&&p.addSelectionCells(p.getEdges(H))}));this.addAction("selectVertices",function(){p.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){p.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){p.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){p.clearSelection()},
@@ -2974,15 +2978,15 @@ Q,H);p.setCellStyles("connectable",Q,H)}finally{p.getModel().endUpdate()}}},null
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){p.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){p.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(H){p.orderCells(!1,null,!0)});this.addAction("sendBackward",function(H){p.orderCells(!0,null,!0)});this.addAction("group",function(){if(p.isEnabled()){var H=mxUtils.sortCells(p.getSelectionCells(),!0);1!=H.length||p.isTable(H[0])||p.isTableRow(H[0])?
(H=p.getCellsForGroup(H),1<H.length&&p.setSelectionCell(p.groupCells(null,0,H))):p.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(p.isEnabled()){var H=p.getEditableCells(p.getSelectionCells());p.model.beginUpdate();try{var K=p.ungroupCells();if(null!=H)for(var Q=0;Q<H.length;Q++)p.model.contains(H[Q])&&(0==p.model.getChildCount(H[Q])&&p.model.isVertex(H[Q])&&p.setCellStyles("container","0",[H[Q]]),K.push(H[Q]))}finally{p.model.endUpdate()}0<
K.length&&p.setSelectionCells(K)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(p.isEnabled()){var H=p.getSelectionCells();if(null!=H){for(var K=[],Q=0;Q<H.length;Q++)p.isTableRow(H[Q])||p.isTableCell(H[Q])||K.push(H[Q]);p.removeCellsFromParent(K)}}});this.addAction("edit",function(){p.isEnabled()&&p.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var H=p.getSelectionCell()||p.getModel().getRoot();l.showDataDialog(H)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(e){p.setTooltipForCell(H,
-e)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,e,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
-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(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();
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K="";if(mxUtils.isNode(H.value)){var Q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&H.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(Q=H.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==Q&&(Q=H.value.getAttribute("tooltip"));null!=Q&&(K=Q)}K=new TextareaDialog(l,mxResources.get("editTooltip")+":",K,function(d){p.setTooltipForCell(H,
+d)});l.showDialog(K.container,320,200,!0,!0);K.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var H=p.getLinkForCell(p.getSelectionCell());null!=H&&p.openLink(H)});this.addAction("editLink...",function(){var H=p.getSelectionCell();if(p.isEnabled()&&null!=H&&p.isCellEditable(H)){var K=p.getLinkForCell(H)||"";l.showLinkDialog(K,mxResources.get("apply"),function(Q,d,f){Q=mxUtils.trim(Q);p.setLinkForCell(H,0<Q.length?Q:null);p.setAttributeForCell(H,"linkTarget",f)},!0,p.getLinkTargetForCell(H))}},
+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 d=null,f=p.getLinkTitle(H);null!=K&&0<K.length&&(d=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!=d?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+d:"spacing=10;"));K.vertex=!0;d=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry([K],!0));K.geometry.x=d.x;K.geometry.y=d.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 d=H.getElementsByTagName("a"),
+f=0;f<d.length&&null==K;f++)d[f].textContent==H.textContent&&(K=d[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]&&
+p.getEditableCells(p.getSelectionCells()),Q=0;Q<K.length;Q++)if(state=p.getView().getState(K[Q]),null!=state){var d=mxUtils.getValue(state.style,"html","0");if("1"==d&&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"==
+d&&"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]&&
(K=null);p.setCellStyles(mxConstants.STYLE_WHITE_SPACE,K)});this.addAction("rotation",function(){var H="0",K=p.getView().getState(p.getSelectionCell());null!=K&&(H=K.style[mxConstants.STYLE_ROTATION]||H);H=new FilenameDialog(l,H,mxResources.get("apply"),function(Q){null!=Q&&0<Q.length&&p.setCellStyles(mxConstants.STYLE_ROTATION,Q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");l.showDialog(H.container,375,80,!0,!0);H.init()});this.addAction("resetView",function(){p.zoomTo(1);
l.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(H){p.isFastZoomEnabled()?p.lazyZoom(!0,!0,l.buttonZoomDelay):p.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(H){p.isFastZoomEnabled()?p.lazyZoom(!1,!0,l.buttonZoomDelay):p.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var H=p.isSelectionEmpty()?p.getGraphBounds():p.getBoundingBox(p.getSelectionCells()),K=p.view.translate,
Q=p.view.scale;H.x=H.x/Q-K.x;H.y=H.y/Q-K.y;H.width/=Q;H.height/=Q;null!=p.backgroundImage&&(H=mxRectangle.fromRectangle(H),H.add(new mxRectangle(0,0,p.backgroundImage.width,p.backgroundImage.height)));0==H.width||0==H.height?(p.zoomTo(1),l.resetScrollbars()):(K=Editor.fitWindowBorders,null!=K&&(H.x-=K.x,H.y-=K.y,H.width+=K.width+K.x,H.height+=K.height+K.y),p.fitWindow(H))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){p.pageVisible||this.get("pageView").funct();
@@ -2995,9 +2999,9 @@ M.setSelectedCallback(function(){return p.graphHandler.guidesEnabled});M.setEnab
M.setToggleAction(!0);M.setSelectedCallback(function(){return p.foldingEnabled});M.isEnabled=E;M=this.addAction("scrollbars",function(){l.setScrollbars(!l.hasScrollbars())});M.setToggleAction(!0);M.setSelectedCallback(function(){return p.scrollbars});M=this.addAction("pageView",mxUtils.bind(this,function(){l.setPageVisible(!p.pageVisible)}));M.setToggleAction(!0);M.setSelectedCallback(function(){return p.pageVisible});M=this.addAction("connectionArrows",function(){p.connectionArrowsEnabled=!p.connectionArrowsEnabled;
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)==
+"/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,d){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(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...",
+!1)}finally{p.getModel().endUpdate()}}},null,null,d)});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();
try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("dotted",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_DASHED,"1"),p.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),l.fireEvent(new mxEventObject("styleChanged",
@@ -3006,110 +3010,107 @@ this.addAction("rounded",function(){p.getModel().beginUpdate();try{p.setCellStyl
Q="1"==mxUtils.getValue(K,mxConstants.STYLE_ROUNDED,"0")?"0":"1";p.setCellStyles(mxConstants.STYLE_ROUNDED,Q);p.setCellStyles(mxConstants.STYLE_CURVED,null);l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[Q,"0"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}}});this.addAction("curved",function(){p.getModel().beginUpdate();try{p.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),p.setCellStyles(mxConstants.STYLE_CURVED,
"1"),l.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",p.getSelectionCells()))}finally{p.getModel().endUpdate()}});this.addAction("collapsible",function(){var H=p.view.getState(p.getSelectionCell()),K="1";null!=H&&null!=p.getFoldingImage(H)&&(K="0");p.setCellStyles("collapsible",K);l.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[K],"cells",p.getSelectionCells()))});this.addAction("editStyle...",
mxUtils.bind(this,function(){var H=p.getEditableCells(p.getSelectionCells());if(null!=H&&0<H.length){var K=p.getModel();K=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",K.getStyle(H[0])||"",function(Q){null!=Q&&p.setCellStyle(mxUtils.trim(Q),H)},null,null,400,220);this.editorUi.showDialog(K.container,420,300,!0,!0);K.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){p.isEnabled()&&!p.isSelectionEmpty()&&l.setDefaultStyle(p.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=B.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,e=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
-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",
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){p.isEnabled()&&l.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var H=p.getSelectionCell();if(null!=H&&p.getModel().isEdge(H)){var K=C.graph.selectionCellsHandler.getHandler(H);if(K instanceof mxEdgeHandler){var Q=p.view.translate,d=p.view.scale,f=Q.x;Q=Q.y;H=p.getModel().getParent(H);for(var g=p.getCellGeometry(H);p.getModel().isVertex(H)&&null!=g;)f+=g.x,Q+=g.y,H=
+p.getModel().getParent(H),g=p.getCellGeometry(H);f=Math.round(p.snap(p.popupMenuHandler.triggerX/d-f));d=Math.round(p.snap(p.popupMenuHandler.triggerY/d-Q));K.addPointAt(K.state,f,d)}}});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 d=
+0;d<Q.length;d++){var f=Q[d];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,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",
+Q="",d=null;null!=K&&(Q=K.style[mxConstants.STYLE_IMAGE]||Q,d=K.style[mxConstants.STYLE_CLIP_PATH]||d);var f=p.cellEditor.saveSelection();l.showImageDialog(H,Q,function(g,v,x,B,I,D){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(g,v,x);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,x,"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!=B&&k(N[0],B,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==B&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,
+null,N);if(null!=v&&null!=x)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=x,p.getModel().setGeometry(ja,ca))}null!=B&&k(ja,B,I,D,p)}}finally{p.getModel().endUpdate()}null!=G&&(p.setSelectionCells(G),p.scrollCellToVisible(G[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,d)}}).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],d=K[mxConstants.STYLE_SHAPE];Q&&"image"==d&&(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=
-p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,d,k,l,B){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,d,k,l,B))};Actions.prototype.put=function(b,d){return this.actions[b]=d};
-Actions.prototype.get=function(b){return this.actions[b]};function Action(b,d,k,l,B){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(d);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=B;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
-Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,d){mxEventSource.call(this);this.ui=b;this.setData(d||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
+p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=H){var K=new ConnectionPointsDialog(l,H);l.showDialog(K.container,350,450,!0,!1,function(){K.destroy()});K.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,l,C){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var p=mxResources.get(b)+"..."}else p=mxResources.get(b);return this.put(b,new Action(p,e,k,l,C))};Actions.prototype.put=function(b,e){return this.actions[b]=e};
+Actions.prototype.get=function(b){return this.actions[b]};function Action(b,e,k,l,C){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=l;this.shortcut=C;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile.prototype.shadowPages=null;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=3E5;DrawioFile.prototype.inConflictState=!1;DrawioFile.prototype.invalidChecksum=!1;DrawioFile.prototype.errorReportsEnabled=!1;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
-DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,d){this.savingFile?null!=d&&d({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,d,k)}),d):this.updateFile(b,d)};
-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()),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(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){}};
-DrawioFile.prototype.reloadFile=function(b,d){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),d);else{var l=this.ui.editor.graph,B=l.getSelectionCells(),p=l.getViewState(),E=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,B);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
-k()}catch(l){null!=d&&d(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,d,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=d&&d()}),k)};
-DrawioFile.prototype.copyFile=function(b,d){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var d=!0;if(null!=b)for(var k=0;k<b.length&&d;k++)d=d&&mxUtils.isEmptyObject(b[k]);return d};
-DrawioFile.prototype.patch=function(b,d,k){if(null!=b){var l=this.ui.editor.undoManager,B=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,d,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=B,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
-(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",d,"undoable",k)}return b};
-DrawioFile.prototype.save=function(b,d,k,l,B,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",B,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!B&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=d&&d();else if(null!=k)k({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var d=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=d&&(d.viewState=this.ui.editor.graph.getViewState(),d.needsUpdate=!0)}d=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return d};
-DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,d,k){};
-DrawioFile.prototype.saveFile=function(b,d,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
-DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,d,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,d,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
+DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
+DrawioFile.prototype.updateFile=function(b,e,k,l){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(C){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[C]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=C?this.mergeFile(C,b,e,l):this.reloadFile(b,
+e))}catch(p){null!=e&&e(p)}}),e))};
+DrawioFile.prototype.mergeFile=function(b,e,k,l){var C=!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 d=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"+d+"\nPatched Shadow:\n"+f,null,"mergeFile",K,Q,b.getCurrentRevisionId());return}if(null!=this.sync){var x=this.sync.patchRealtime(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==x||mxUtils.isEmptyObject(x)||M.push(x)}this.patch(M,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw C=!1,Error(mxResources.get("notADiagramFile"));
+this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(D){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(D);try{if(C)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,D);else{var B=this.getCurrentUser(),I=null!=B?B.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),I,D)}}catch(N){}}};
+DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var l=0;l<b.length;l++){var C=e.encode(new mxGraphModel(b[l].root));"1"!=urlParams.dev&&(C=this.ui.anonymizeNode(C,!0));C.setAttribute("id",b[l].getId());b[l].viewState&&this.ui.editor.graph.saveViewState(b[l].viewState,C,!0);k.appendChild(C)}return mxUtils.getPrettyXml(k)};
+DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
+DrawioFile.prototype.checksumError=function(b,e,k,l,C,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!=e)for(var S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);var H=mxUtils.bind(this,function(v){var x=this.compressReportData(JSON.stringify(e,null,2));v=null==v?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(v.data)),
+25E3);this.sendErrorReport("Checksum Error in "+C+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+x+(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",d=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",f=JSON.stringify(e).length,g=null;if(null!=e&&this.constructor==DriveFile&&400>f){for(S=0;S<e.length;S++)this.ui.anonymizePatch(e[S]);
+g=JSON.stringify(e);g=null!=g&&250>g.length?Graph.compress(g):null}this.getLatestVersion(mxUtils.bind(this,function(v){try{var x=null!=g?"Report":"Error",B=this.ui.getHashValueForPages(v.getShadowPages());EditorUi.logError("Checksum "+x+" in "+C+" "+d,null,this.getMode()+"."+this.getId(),"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+(null!=g?"-json_"+g:"")+"-size_"+this.getSize()+(null!=p?"-expected_"+p:"")+(null!=E?"-current_"+E:"")+(null!=M?
+"-rev_"+this.ui.hashValue(M):"")+(null!=B?"-latest_"+B:"")+(null!=v?"-latestRev_"+this.ui.hashValue(v.getCurrentRevisionId()):""));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+d,action:C,label:"user_"+Q+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+f+"-patches_"+e.length+"-size_"+this.getSize()})}catch(I){}}),b)}}catch(v){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,l){try{var C=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!=e?"\n\n"+e:
+"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+C+"\n\nData:\n"+p,l)}catch(d){}};
+DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var l=this.ui.editor.graph,C=l.getSelectionCells(),p=l.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,p,C);null!=this.backupPatch&&this.patch([this.backupPatch]);var M=this.ui.getCurrentFile();null!=M&&(M.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
+k()}catch(l){null!=e&&e(l)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(l){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(l.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(l.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
+DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var l=this.ui.editor.undoManager,C=l.history.slice(),p=l.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var M=this.changeListenerEnabled;this.changeListenerEnabled=k;var S=E.foldingEnabled,H=E.mathEnabled,K=E.cellRenderer.redraw;E.cellRenderer.redraw=function(Q){Q.view.graph.isEditing(Q.cell)&&(Q.view.graph.scrollCellToVisible(Q.cell),Q.view.graph.cellEditor.resize());K.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=K;this.changeListenerEnabled=M;k||(l.history=C,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)H!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(S!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
+DrawioFile.prototype.save=function(b,e,k,l,C,p){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",l,"overwrite",C,"manual",p,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!C&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
+DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,e,k){};
+DrawioFile.prototype.saveFile=function(b,e,k,l){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
+DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,e,k){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,e,k){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.isChromelessView()||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(b){this.data=b;EditorUi.debug("DrawioFile.setData",[this],"data",[b])};DrawioFile.prototype.getData=function(){return this.data};
-DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var d=function(k){for(var l=0;null!=k&&l<k.length;l++){var B=k[l];null!=B.id&&0==B.id.indexOf("extFont_")&&B.parentNode.removeChild(B)}};d(document.querySelectorAll("head > style[id]"));d(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
+DrawioFile.prototype.open=function(){this.stats.opened++;var b=this.getData();if(null!=b){var e=function(k){for(var l=0;null!=k&&l<k.length;l++){var C=k[l];null!=C.id&&0==C.id.indexOf("extFont_")&&C.parentNode.removeChild(C)}};e(document.querySelectorAll("head > style[id]"));e(document.querySelectorAll("head > link[id]"));this.ui.setFileData(b);this.isModified()||this.setShadowPages(this.ui.clonePages(this.ui.pages))}this.installListeners();this.isSyncSupported()&&this.startSync()};
DrawioFile.prototype.isSyncSupported=function(){return!1};DrawioFile.prototype.isRealtime=function(){return null!=this.ownPages};DrawioFile.prototype.isRealtimeSupported=function(){return!1};DrawioFile.prototype.isRealtimeEnabled=function(){return Editor.enableRealtime&&"0"!=urlParams["fast-sync"]};DrawioFile.prototype.setRealtimeEnabled=function(){};DrawioFile.prototype.isRealtimeOptional=function(){return!1};
-DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,d){b(null)};
-DrawioFile.prototype.loadDescriptor=function(b,d){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,d){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),d)};DrawioFile.prototype.patchDescriptor=function(b,d){this.setDescriptorEtag(b,this.getDescriptorEtag(d));this.descriptorChanged()};
+DrawioFile.prototype.getRealtimeState=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getState():3};DrawioFile.prototype.getRealtimeError=function(){return null!=this.sync&&null!=this.sync.p2pCollab?this.sync.p2pCollab.getLastError():null};DrawioFile.prototype.isOptimisticSync=function(){return!1};DrawioFile.prototype.isRevisionHistorySupported=function(){return!1};DrawioFile.prototype.getRevisions=function(b,e){b(null)};
+DrawioFile.prototype.loadDescriptor=function(b,e){b(null)};DrawioFile.prototype.loadPatchDescriptor=function(b,e){this.loadDescriptor(mxUtils.bind(this,function(k){b(k)}),e)};DrawioFile.prototype.patchDescriptor=function(b,e){this.setDescriptorEtag(b,this.getDescriptorEtag(e));this.descriptorChanged()};
DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC&&"fast"!=DrawioFile.SYNC||"1"==urlParams.stealth||"1"!=urlParams.rt&&this.ui.editor.chromeless&&!this.ui.editor.editable||(null==this.sync&&(this.sync=new DrawioFileSync(this)),this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.ui.fireEvent(new mxEventObject("realtimeStateChanged"))})),this.sync.start())};DrawioFile.prototype.isConflict=function(){return!1};
-DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,d){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,d){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
+DrawioFile.prototype.getChannelId=function(){return Graph.compress(this.getHash()).replace(/[\/ +]/g,"_")};DrawioFile.prototype.getChannelKey=function(b){return null};DrawioFile.prototype.getCurrentUser=function(){return null};DrawioFile.prototype.getLatestVersion=function(b,e){b(null)};DrawioFile.prototype.getLatestVersionId=function(b,e){b(-1)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};
DrawioFile.prototype.setCurrentRevisionId=function(b){this.setDescriptorRevisionId(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.getPullingInterval=function(){return 1E4};DrawioFile.prototype.setCurrentEtag=function(b){this.setDescriptorEtag(this.getDescriptor(),b)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
-DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,d){this.setDescriptorEtag(b,d)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,d){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
-DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,d){b=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
+DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(b,e){this.setDescriptorEtag(b,e)};DrawioFile.prototype.getDescriptorRevisionId=function(b){return this.getDescriptorEtag(b)};DrawioFile.prototype.setDescriptorEtag=function(b,e){};DrawioFile.prototype.getDescriptorEtag=function(b){return null};DrawioFile.prototype.getDescriptorSecret=function(b){return null};
+DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(b,e){b=null!=e?e.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=b&&b.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
-DrawioFile.prototype.addAllSavedStatus=function(b){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+b+'">'+b+"</div>"),b=this.ui.statusContainer.getElementsByTagName("div"),0<b.length&&this.isRevisionHistorySupported()&&(b[0].style.cursor="pointer",b[0].style.textDecoration="underline",mxEvent.addListener(b[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
-DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(d){this.removeDraft()}};
+DrawioFile.prototype.addAllSavedStatus=function(b){if(null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this){b=null!=b?b:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey));var e=this.isRevisionHistorySupported()?'data-action="revisionHistory" ':"";this.ui.editor.setStatus("<div "+e+'title="'+b+'">'+b+"</div>")}};
+DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=null!=this.usedDraftId?this.usedDraftId:Editor.guid());var b={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),fileObject:this.fileObject,aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(b));EditorUi.debug("DrawioFile.saveDraft",[this],"draftId",this.draftId,[b])}catch(e){this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(EditorUi.debug("DrawioFile.removeDraft",[this],"draftId",this.draftId),this.ui.removeDatabaseItem(".draft_"+this.draftId),this.usedDraftId=this.draftId,this.draftId=null)}catch(b){}};
-DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var d=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>");d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length&&(d[0].style.cursor="pointer",mxEvent.addListener(d[0],
-"click",mxUtils.bind(this,function(){this.ui.showError(mxResources.get("unsavedChanges"),mxUtils.htmlEntities(b.message))})))}else{d=this.getErrorMessage(b);if(null==d&&null!=this.lastSaved){var k=this.ui.timeSince(new Date(this.lastSaved));null!=k&&(d=mxResources.get("lastSaved",[k]))}null!=d&&60<d.length&&(d=d.substring(0,60)+"...");d=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":"");this.ui.editor.setStatus('<div title="'+
-d+'" class="geStatusAlertOrange">'+d+' <img src="'+Editor.saveImage+'"/></div>');d=this.ui.statusContainer.getElementsByTagName("div");null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(){this.ui.actions.get(null!=this.ui.mode&&this.isEditable()?"save":"saveAs").funct()}))):(d=mxUtils.htmlEntities(mxResources.get("unsavedChanges")),this.ui.editor.setStatus('<div title="'+d+'" class="geStatusAlert">'+d+" ("+mxUtils.htmlEntities(b.message)+")</div>"));
-EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
-0))}};
-DrawioFile.prototype.addConflictStatus=function(b,d){this.invalidChecksum&&null==d&&(d=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=d&&""!=d?" ("+mxUtils.htmlEntities(d)+")":""));this.ui.spinner.stop();this.clearAutosave();d=null!=this.ui.statusContainer?this.ui.statusContainer.getElementsByTagName("div"):null;null!=d&&0<d.length?(d[0].style.cursor="pointer",mxEvent.addListener(d[0],"click",mxUtils.bind(this,function(k){"IMG"!=mxEvent.getSource(k).nodeName&&
-b()}))):this.ui.alert(mxUtils.htmlEntities(mxResources.get("fileChangedSync")),b)};DrawioFile.prototype.setConflictStatus=function(b){this.ui.editor.setStatus('<div title="'+b+'" class="geStatusAlert">'+b+' <a href="https://www.diagrams.net/doc/faq/synchronize" title="'+mxResources.get("help")+'" target="_blank"><img src="'+Editor.helpImage+'"/></a></div>')};
-DrawioFile.prototype.showRefreshDialog=function(b,d,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,d)})):(this.addConflictStatus(mxUtils.bind(this,function(){this.showRefreshDialog(b,d)}),k),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
-d)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,d)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
-DrawioFile.prototype.showCopyDialog=function(b,d,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,d)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
-DrawioFile.prototype.showConflictDialog=function(b,d){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),d,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
-DrawioFile.prototype.redirectToNewApp=function(b,d){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=d&&(l+=" ("+d+")");d=mxUtils.bind(this,function(){var B=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
-k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),B,mxResources.get("cancel"),mxResources.get("discardChanges")):B()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),d,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,d,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
-d)}};
+DrawioFile.prototype.addUnsavedStatus=function(b){if(!this.inConflictState&&null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this)if(b instanceof Error&&null!=b.message&&""!=b.message){var e=mxUtils.htmlEntities(mxResources.get("unsavedChanges"));this.ui.editor.setStatus('<div title="'+e+'" data-title="'+mxUtils.htmlEntities(mxResources.get("unsavedChanges"))+'" data-message="'+mxUtils.htmlEntities(b.message)+'" class="geStatusAlert">'+e+" ("+mxUtils.htmlEntities(b.message)+")</div>")}else e=
+this.getErrorMessage(b),null==e&&null!=this.lastSaved&&(b=this.ui.timeSince(new Date(this.lastSaved)),null!=b&&(e=mxResources.get("lastSaved",[b]))),null!=e&&60<e.length&&(e=e.substring(0,60)+"..."),e=mxUtils.htmlEntities(mxResources.get("unsavedChangesClickHereToSave"))+(null!=e&&""!=e?" ("+mxUtils.htmlEntities(e)+")":""),b='data-action="'+(null!=this.ui.mode&&this.isEditable()?"save":"saveAs")+'"',this.ui.editor.setStatus("<div "+b+' title="'+e+'" class="geStatusAlertOrange">'+e+' <img src="'+Editor.saveImage+
+'"/></div>'),EditorUi.enableDrafts&&(null==this.getMode()||EditorUi.isElectronApp)&&(this.lastDraftSave=this.lastDraftSave||Date.now(),null!=this.saveDraftThread&&(window.clearTimeout(this.saveDraftThread),this.saveDraftThread=null,Date.now()-this.lastDraftSave>Math.max(2*EditorUi.draftSaveDelay,3E4)&&(this.lastDraftSave=Date.now(),this.saveDraft())),this.saveDraftThread=window.setTimeout(mxUtils.bind(this,function(){this.lastDraftSave=Date.now();this.saveDraftThread=null;this.saveDraft()}),EditorUi.draftSaveDelay||
+0))};DrawioFile.prototype.addConflictStatus=function(b,e){this.invalidChecksum&&null==b&&(b=mxResources.get("checksum"));this.setConflictStatus(mxUtils.htmlEntities(mxResources.get("fileChangedSync"))+(null!=b&&""!=b?" ("+mxUtils.htmlEntities(b)+")":""),e);this.ui.spinner.stop();this.clearAutosave()};
+DrawioFile.prototype.setConflictStatus=function(b,e){this.ui.editor.setStatus('<div title="'+b+'" '+(null!=e?'data-action="statusFunction"':"")+' class="geStatusAlert">'+b+'<img data-link="https://www.diagrams.net/doc/faq/synchronize" src="'+Editor.helpImage+'" style="cursor:help;"/></div>',e)};
+DrawioFile.prototype.showRefreshDialog=function(b,e,k){null==k&&(k=mxResources.get("checksum"));this.ui.editor.isChromelessView()&&!this.ui.editor.editable?this.ui.alert(mxResources.get("fileChangedSync"),mxUtils.bind(this,function(){this.reloadFile(b,e)})):(this.addConflictStatus(k,mxUtils.bind(this,function(){this.showRefreshDialog(b,e)})),this.ui.showError(mxResources.get("warning")+" ("+k+")",mxResources.get("fileChangedSyncDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,
+e)}),null,mxResources.get("merge"),mxUtils.bind(this,function(){this.reloadFile(b,e)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,130))};
+DrawioFile.prototype.showCopyDialog=function(b,e,k){this.invalidChecksum=this.inConflictState=!1;this.addUnsavedStatus();this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedOverwriteDialog"),mxResources.get("makeCopy"),mxUtils.bind(this,function(){this.copyFile(b,e)}),null,mxResources.get("overwrite"),k,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog()}),380,150)};
+DrawioFile.prototype.showConflictDialog=function(b,e){this.ui.showError(mxResources.get("externalChanges"),mxResources.get("fileChangedSyncDialog"),mxResources.get("overwrite"),b,null,mxResources.get("merge"),e,mxResources.get("cancel"),mxUtils.bind(this,function(){this.ui.hideDialog();this.handleFileError(null,!1)}),380,130)};
+DrawioFile.prototype.redirectToNewApp=function(b,e){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var k=window.location.protocol+"//"+window.location.host+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#"+this.getHash(),l=mxResources.get("redirectToNewApp");null!=e&&(l+=" ("+e+")");e=mxUtils.bind(this,function(){var C=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==k?window.location.reload():window.location.href=
+k});null==b&&this.isModified()?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.redirectDialogShowing=!1}),C,mxResources.get("cancel"),mxResources.get("discardChanges")):C()});null!=b?this.isModified()?this.ui.confirm(l,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):this.ui.confirm(l,e,mxUtils.bind(this,function(){this.redirectDialogShowing=!1;b()})):this.ui.alert(mxResources.get("redirectToNewApp"),
+e)}};
DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(EditorUi.debug("DrawioFile.handleFileSuccess",[this],"saved",b,"modified",this.isModified()),this.isModified()?this.fileChanged():b?(this.isTrashed()?this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey))+" ("+mxUtils.htmlEntities(mxResources.get("fileMovedToTrash"))+")"):this.addAllSavedStatus(),null!=this.sync&&(this.sync.resetUpdateStatusThread(),this.sync.remoteFileChanged&&(this.sync.remoteFileChanged=
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
-DrawioFile.prototype.handleFileError=function(b,d){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,d):(this.isModified()&&this.addUnsavedStatus(b),d?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
+DrawioFile.prototype.handleFileError=function(b,e){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,e):(this.isModified()&&this.addUnsavedStatus(b),e?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,d){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),B=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,B):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):d?this.showConflictDialog(B,p):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
-this.synchronizeFile(k,l)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var d=null!=b?null!=b.error?b.error.message:b.message:null;null==d&&null!=b&&b.code==App.ERROR_TIMEOUT&&(d=mxResources.get("timeout"));return d};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
-DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(d){this.ui.stopSanityCheck();
-null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(d){this.handleFileError(d)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
-DrawioFile.prototype.createSecret=function(b){var d=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(d):this.sync.createToken(d,mxUtils.bind(this,function(k){b(d,k)}),mxUtils.bind(this,function(){b(d)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
-DrawioFile.prototype.fileSaved=function(b,d,k,l,B){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,d,k,l,B)}catch(S){this.invalidChecksum=this.inConflictState=
+DrawioFile.prototype.handleConflictError=function(b,e){var k=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),l=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),C=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,k,l,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),p=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,k,l,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),l)});"none"==DrawioFile.SYNC?this.showCopyDialog(k,l,C):this.invalidChecksum?this.showRefreshDialog(k,l,this.getErrorMessage(b)):e?this.showConflictDialog(C,p):this.addConflictStatus(this.getErrorMessage(b),mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
+this.synchronizeFile(k,l)}))};DrawioFile.prototype.getErrorMessage=function(b){var e=null!=b?null!=b.error?b.error.message:b.message:null;null==e&&null!=b&&b.code==App.ERROR_TIMEOUT&&(e=mxResources.get("timeout"));return e};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
+DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(e){this.ui.stopSanityCheck();
+null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
+DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(e):this.sync.createToken(e,mxUtils.bind(this,function(k){b(e,k)}),mxUtils.bind(this,function(){b(e)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
+DrawioFile.prototype.fileSaved=function(b,e,k,l,C){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var p=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(p),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=k&&k()):this.sync.fileSaved(p,e,k,l,C)}catch(S){this.invalidChecksum=this.inConflictState=
!0;this.descriptorChanged();null!=l&&l(S);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,S);else{var E=this.getCurrentUser(),M=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),M,S)}}catch(H){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
-DrawioFile.prototype.autosave=function(b,d,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<d?b:0;this.clearAutosave();var B=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==B&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
-p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",B,"delay",b,"saving",this.savingFile);this.autosaveThread=B};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+DrawioFile.prototype.autosave=function(b,e,k,l){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var C=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==C&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
+p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=k&&k(E)}),mxUtils.bind(this,function(E){null!=l&&l(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=k&&k(null)}catch(E){null!=l&&l(E)}}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",C,"delay",b,"saving",this.savingFile);this.autosaveThread=C};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
-DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,d){if(null!=b&&null!=d){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=d.lastIndexOf(".");return b===(0<k?d.substring(k):"")}return b==d};
+DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,e){if(null!=b&&null!=e){var k=b.lastIndexOf(".");b=0<k?b.substring(k):"";k=e.lastIndexOf(".");return b===(0<k?e.substring(k):"")}return b==e};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
-DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,d){b([])};DrawioFile.prototype.addComment=function(b,d,k){d(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,d){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,d)};LocalFile=function(b,d,k,l,B,p){DrawioFile.call(this,b,d);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=B;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
-LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,d,k){this.saveAs(this.title,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.saveAs=function(b,d,k){this.saveFile(b,!1,d,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
-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 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,
-fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},
-{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",
-gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",
-gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},
-{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
+DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,l,C,p){DrawioFile.call(this,b,e);this.title=k;this.mode=l?null:App.MODE_DEVICE;this.fileHandle=C;this.desc=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
+LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
+LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
+LocalFile.prototype.saveFile=function(b,e,k,l,C){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;C||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(d){this.savingFile=!1;null!=l&&l({error:d})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(d){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?d.write(p?this.ui.base64ToBlob(H,"image/png"):H).then(mxUtils.bind(this,function(){d.close().then(mxUtils.bind(this,
+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(x){K(x)}}),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?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(H){S(H)}),l,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):S(E)};
+LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};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.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},
+{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},
+{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},
+commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},
+commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",
+fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}];Editor.logoImage="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMTkgMTJ2N0g1di03SDN2N2MwIDEuMS45IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0ydi03aC0yem0tNiAuNjdsMi41OS0yLjU4TDE3IDExLjVsLTUgNS01LTUgMS40MS0xLjQxTDExIDEyLjY3VjNoMnoiLz48L3N2Zz4=";Editor.globeImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTEuOTkgMkM2LjQ3IDIgMiA2LjQ4IDIgMTJzNC40NyAxMCA5Ljk5IDEwQzE3LjUyIDIyIDIyIDE3LjUyIDIyIDEyUzE3LjUyIDIgMTEuOTkgMnptNi45MyA2aC0yLjk1Yy0uMzItMS4yNS0uNzgtMi40NS0xLjM4LTMuNTYgMS44NC42MyAzLjM3IDEuOTEgNC4zMyAzLjU2ek0xMiA0LjA0Yy44MyAxLjIgMS40OCAyLjUzIDEuOTEgMy45NmgtMy44MmMuNDMtMS40MyAxLjA4LTIuNzYgMS45MS0zLjk2ek00LjI2IDE0QzQuMSAxMy4zNiA0IDEyLjY5IDQgMTJzLjEtMS4zNi4yNi0yaDMuMzhjLS4wOC42Ni0uMTQgMS4zMi0uMTQgMiAwIC42OC4wNiAxLjM0LjE0IDJINC4yNnptLjgyIDJoMi45NWMuMzIgMS4yNS43OCAyLjQ1IDEuMzggMy41Ni0xLjg0LS42My0zLjM3LTEuOS00LjMzLTMuNTZ6bTIuOTUtOEg1LjA4Yy45Ni0xLjY2IDIuNDktMi45MyA0LjMzLTMuNTZDOC44MSA1LjU1IDguMzUgNi43NSA4LjAzIDh6TTEyIDE5Ljk2Yy0uODMtMS4yLTEuNDgtMi41My0xLjkxLTMuOTZoMy44MmMtLjQzIDEuNDMtMS4wOCAyLjc2LTEuOTEgMy45NnpNMTQuMzQgMTRIOS42NmMtLjA5LS42Ni0uMTYtMS4zMi0uMTYtMiAwLS42OC4wNy0xLjM1LjE2LTJoNC42OGMuMDkuNjUuMTYgMS4zMi4xNiAyIDAgLjY4LS4wNyAxLjM0LS4xNiAyem0uMjUgNS41NmMuNi0xLjExIDEuMDYtMi4zMSAxLjM4LTMuNTZoMi45NWMtLjk2IDEuNjUtMi40OSAyLjkzLTQuMzMgMy41NnpNMTYuMzYgMTRjLjA4LS42Ni4xNC0xLjMyLjE0LTIgMC0uNjgtLjA2LTEuMzQtLjE0LTJoMy4zOGMuMTYuNjQuMjYgMS4zMS4yNiAycy0uMSAxLjM2LS4yNiAyaC0zLjM4eiIvPjwvc3ZnPg==";
Editor.commentImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMjEuOTkgNGMwLTEuMS0uODktMi0xLjk5LTJINGMtMS4xIDAtMiAuOS0yIDJ2MTJjMCAxLjEuOSAyIDIgMmgxNGw0IDQtLjAxLTE4ek0xOCAxNEg2di0yaDEydjJ6bTAtM0g2VjloMTJ2MnptMC0zSDZWNmgxMnYyeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=";Editor.userImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgMTJjMi4yMSAwIDQtMS43OSA0LTRzLTEuNzktNC00LTQtNCAxLjc5LTQgNCAxLjc5IDQgNCA0em0wIDJjLTIuNjcgMC04IDEuMzQtOCA0djJoMTZ2LTJjMC0yLjY2LTUuMzMtNC04LTR6Ii8+PC9zdmc+";
Editor.shareImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTggMTYuMDhjLS43NiAwLTEuNDQuMy0xLjk2Ljc3TDguOTEgMTIuN2MuMDUtLjIzLjA5LS40Ni4wOS0uN3MtLjA0LS40Ny0uMDktLjdsNy4wNS00LjExYy41NC41IDEuMjUuODEgMi4wNC44MSAxLjY2IDAgMy0xLjM0IDMtM3MtMS4zNC0zLTMtMy0zIDEuMzQtMyAzYzAgLjI0LjA0LjQ3LjA5LjdMOC4wNCA5LjgxQzcuNSA5LjMxIDYuNzkgOSA2IDljLTEuNjYgMC0zIDEuMzQtMyAzczEuMzQgMyAzIDNjLjc5IDAgMS41LS4zMSAyLjA0LS44MWw3LjEyIDQuMTZjLS4wNS4yMS0uMDguNDMtLjA4LjY1IDAgMS42MSAxLjMxIDIuOTIgMi45MiAyLjkyIDEuNjEgMCAyLjkyLTEuMzEgMi45Mi0yLjkycy0xLjMxLTIuOTItMi45Mi0yLjkyeiIvPjwvc3ZnPg==";
@@ -3127,31 +3128,31 @@ Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP/////
Editor.smallPlusImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=";
Editor.hiResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERERBQUFBQUFFRUVAQEBCQkJAQEA6OjpDQ0NKSkpBQUFBQUFERERERERBQUFCQkJCQkJCQkJJSUlBQUFCQkJDQ0NDQ0NCQkJDQ0NBQUFBQUFCQkJBQUFCQkJCQkJDQ0NCQkJHR0dBQUFCQkJCQkJAQEBCQkJDQ0NAQEBERERCQkIk1hS2AAAAKnRSTlMAAjj96BL7PgQFRwfu3TYazKuVjRXl1V1DPCn1uLGjnWNVIgy9hU40eGqPkM38AAACG0lEQVRYw+2X63KbMBCFzwZblgGDceN74muatpLe//m6MHV3gHGFAv2RjM94MAbxzdnVsQbBDKwH8AH8MDAyafzjqYeyOG04XE7RS8nIRDXg6BlT+rA0nmtAPh+NQRDxIASIMG44rAMrGunBgHwy3uUldxggIStGKp2f+DQc2O4h4eQsX3O2IFB/oEbsjOKbStnjAEA+zJ0ylZTbgvoDn8xNyn6Dbj5Kd4GsNpABa6duQPfSdEj88TgMAhKuCWjAkgmFXPLnsD0pWd3OFGdrMugQII/eOMPEiGOzqPMIeWrcSoMCg71W1pXBPvCP+gS/OdXqQ3uW23+93XGWLl/OaBb805bNcBPoEIcVJsnHzcxpZH86u5KZ9gDby5dQCcnKqdbke4ItI4Tzd7IW9hZQt4EO6GG9b9sYuuK9Wwn8TIr2xKbF2+3Nhr+qxChJ/AI6pIfCu4z4Zowp4ZUNihz79vewzctnHDwTvQO/hCdFBzrUGDOPn2Y/F8YKT4oOATLvlhOznzmBSdFBJWtc58y7r+UVFOCQczy3wpN6pegDqHtsCPTGvH9JuTO0Dyg8icldYPk+RB6g8Aofj4m2EKBvtTmUPD9xDd1pPcSReV2U5iD/ik2yrngtvvqBfPzOvKiDTKTsCdoHZJ7pLLffgTwlJ5vJdtJV2/jiAYaLvLGhMAEDO5QcDg2M/jOw/8Zn+K3ZwJvHT7ZffgC/NvA3zcybTeIfE4EAAAAASUVORK5CYII=";
Editor.loResImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==";Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==";
-Editor.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker=
-"0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=
-null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(q,
-F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",
-dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
-"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==
-mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",
-defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},
-{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",
-dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",
-dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
-0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},
-isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",
-dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",
-defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",
-defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},
-{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},
-{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,
-isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",
-type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",
-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.facebookImage=IMAGE_PATH+"/facebook.png";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.enableSimpleTheme="1"==urlParams["live-ui"];
+Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;Editor.enableExportUrl=!0;Editor.enableRealtime=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=
+null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(q){q.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"enumerate","0")}},{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(q,F){return"1"!=mxUtils.getValue(q.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",
+type:"float",min:0,defVal:1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"comic","0")||"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?
+"1":"0")&&0<q.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(q,F){return"1"==
+mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",
+type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")&&0<q.vertices.length}},
+{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(q,F){return"1"==mxUtils.getValue(q.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},
+{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(q){return"orthogonalEdgeStyle"==
+mxUtils.getValue(q.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",
+dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",
+dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(q,
+F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTableCell(q.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:
+null);return"1"==mxUtils.getValue(q,"resizeLastRow","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(q,F){q=F.editorUi.editor.graph.getCellStyle(1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null);return"1"==mxUtils.getValue(q,"resizeLast","0")},isVisible:function(q,F){F=F.editorUi.editor.graph;return 1==q.vertices.length&&
+0==q.edges.length&&F.isTable(q.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",
+defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},
+{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(q,F){return F.editorUi.editor.graph.isCellConnectable(0<q.vertices.length&&0==q.edges.length?q.vertices[0]:null)},isVisible:function(q,F){return 0<q.vertices.length&&0==q.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",
+dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",
+dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(q,F){q=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;
+return null!=q&&(F.isSwimlane(q)||0<F.model.getChildCount(q))},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(q,F){var T=1==q.vertices.length&&0==q.edges.length?q.vertices[0]:null;F=F.editorUi.editor.graph;return null!=T&&(F.isContainer(T)&&"0"!=q.style.collapsible||!F.isContainer(T)&&"1"==q.style.collapsible)},isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length}},{name:"recursiveResize",
+dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(q,F){return 1==q.vertices.length&&0==q.edges.length&&!F.editorUi.editor.graph.isSwimlane(q.vertices[0])&&null==mxUtils.getValue(q.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(q,F){F=F.editorUi.editor.graph.model;return 0<q.vertices.length?F.isVertex(F.getParent(q.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",
+defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(q,F){q=0<q.vertices.length?F.editorUi.editor.graph.getCellGeometry(q.vertices[0]):null;return null!=q&&!q.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",
+type:"bool",defVal:!1},{name:"resizable",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 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=
@@ -3190,101 +3191,103 @@ new mxRectangle(0,0,F,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultP
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 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&&(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 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 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(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,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 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,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",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-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 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);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(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=);";
+"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.updateStatusInterval=1E4;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.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&&(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 e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(q,F){q=null!=q?q:!0;var T=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&T.setAttribute("style",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 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(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,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 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 y=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);y()}catch($a){null!=U&&U($a)}};Qa.onerror=function(Fa){null!=U&&U(Fa)};Qa.src=ta}else y()}catch(Fa){null!=U&&U(Fa)}});ab.onerror=function(y){null!=U&&U(y)};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(y){null!=
+U&&U(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(wa,y),this.loadFonts(Ya)}catch(O){null!=U&&U(O)}}))}catch(y){null!=U&&U(y)}}),T,ua)}catch(wa){null!=U&&U(wa)}};Editor.crcTable=[];for(var C=0;256>C;C++)for(var p=C,E=0;8>E;E++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[C]=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,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 d=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(q){q=d.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",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
+defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",
+min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",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 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 y=ya.dependentProps,O=[],P=[];for(La=0;La<y.length;La++){var X=T.style[y[La]];P.push(F[y[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);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(Na){var Ia=mxUtils.button("",mxUtils.bind(this,function(Ya){aa.getModel().beginUpdate();try{for(var y=T.getSelectionState().cells,O=0;O<y.length;O++){for(var P=aa.getModel().getStyle(y[O]),X=0;X<da.length;X++)P=mxUtils.removeStylename(P,da[X]);var ba=aa.getModel().isVertex(y[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(y[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(y[O])&&(P=mxUtils.setStyle(P,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ba,mxConstants.STYLE_FONTCOLOR,null))));aa.getModel().setStyle(y[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,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",
@@ -3296,14 +3299,14 @@ T();return q};Graph.getFontUrl=function(q,F){q=Graph.customFontElements[q.toLowe
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 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=
+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 x=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(q,F){return Graph.processFontStyle(x.apply(this,arguments))};var B=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(q,
+F,T,aa,U,da,fa,na,sa,za,ua){B.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"),y=document.createElement("td");y.style.align="center";y.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%)";y.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(y);y=document.createElement("td");
+y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.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);y.appendChild(a);mxEvent.addListener(y,"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(y);if(fa.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==La){y.style.align="center";y.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)});y.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)});y.appendChild(P)}Ya.appendChild(y)}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());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";
@@ -3311,8 +3314,8 @@ Aa.style.left="10px";fa.isEnabled()&&(Aa.appendChild(ua),Aa.appendChild(Ba),sa.a
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,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=
+"#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="",y="",O=0;O<Ia.length;O++){var P=
+Ia[O].name,X=Ia[O].url;Graph.isCssFontUrl(X)?Ya+="@import url("+X+");\n":y+='@font-face {\nfont-family: "'+P+'";\nsrc: url("'+X+'");\n}\n'}ab.appendChild(wa.createTextNode(Ya+y));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,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=
@@ -3372,590 +3375,594 @@ fa.appendChild(F);var oa=Ba.cloneNode(!0);fa.appendChild(oa);mxEvent.addListener
!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 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);
+ab=wa.cloneNode(!0),Ya=document.createElement("td"),y=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";y.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(y);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.4.0";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 ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,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(e,k,l){l.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.4.2";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,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;";
+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(d,f,g,v,x,B,I){B=null!=B?B:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var D=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";x=null!=x?x:Error(d);(new Image).src=D+"/log?severity="+B+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=v?":colno:"+
+encodeURIComponent(v):"")+(null!=x&&null!=x.stack?"&stack="+encodeURIComponent(x.stack):"")}}catch(N){}try{I||null==window.console||console.error(B,d,f,g,v,x)}catch(N){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);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!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
+d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.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 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 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 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,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)||
-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,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,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"),
+!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 d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(x){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var x=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=x&&6<x.length}catch(B){}};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(x){}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(x){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
+EditorUi.prototype.createSpinner=function(d,f,g){var v=null==d||null==f;g=null!=g?g:24;var x=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}),B=x.spin;x.spin=function(D,N){var G=!1;this.active||(B.call(this,D),this.active=!0,null!=N&&(v&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=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,d)+"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),x.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=x.stop;x.stop=function(){I.call(this);this.active=!1;null!=x.status&&null!=x.status.parentNode&&x.status.parentNode.removeChild(x.status);x.status=null};x.pause=function(){return function(){}};
+return x};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(v){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,v=this.editor.graph,x=this;f.getFunction=function(B){if(v.isSelectionEmpty()&&null!=x.pages&&0<x.pages.length){var I=x.getSelectedPageIndex();if(mxEvent.isShiftDown(B)){if(37==B.keyCode)return function(){0<I&&x.movePage(I,I-1)};if(38==B.keyCode)return function(){0<I&&x.movePage(I,0)};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,
+I+1)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.movePage(I,x.pages.length-1)}}else if(mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)){if(37==B.keyCode)return function(){0<I&&x.selectNextPage(!1)};if(38==B.keyCode)return function(){0<I&&x.selectPage(x.pages[0])};if(39==B.keyCode)return function(){I<x.pages.length-1&&x.selectNextPage(!0)};if(40==B.keyCode)return function(){I<x.pages.length-1&&x.selectPage(x.pages[x.pages.length-1])}}}return!(65<=B.keyCode&&90>=B.keyCode)||
+v.isSelectionEmpty()||mxEvent.isAltDown(B)||mxEvent.isShiftDown(B)||mxEvent.isControlDown(B)||mxClient.IS_MAC&&mxEvent.isMetaDown(B)?g.apply(this,arguments):null}}return f};var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var v=d.lastIndexOf("&lt;/mxfile&gt;");v>g&&(f=d.substring(g,v+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,
+""))}else{var x=mxUtils.parseXml(d),B=this.editor.extractGraphModel(x.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=B?mxUtils.getXml(B):""}}catch(I){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);
+d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,v=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<v.length||1==v.length&&v[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=v.length-1;0<=x;x--){var B=this.updatePageRoot(new DiagramPage(v[x]));null==B.getName()&&
+B.setName(mxResources.get("pageWithNumber",[x+1]));f.model.execute(new ChangePage(this,B,0==x?B:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);
+if(null!=g)for(x=0;x<g.length;x++)f.model.execute(new ChangePage(this,g[x],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,f,g,v,x,B,I,D,N,G,ia){f=null!=f?f:this.editor.graph;x=null!=x?x:!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==d)return"";var ca=d;if("mxfile"!=ca.nodeName.toLowerCase()){if(ia){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());
+pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));ca=Graph.compress(pa);if(Graph.decompress(ca)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,ca)}ca=d.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));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,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 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,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 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,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"));
-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 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 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);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),
+Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&ca.setAttribute("type",d),1<ca.getElementsByTagName("diagram").length&&null!=this.pages&&ca.setAttribute("pages",this.pages.length));ia=ia?mxUtils.getPrettyXml(ca):mxUtils.getXml(ca);if(!B&&!x&&(I||null!=g&&/(\.html)$/i.test(g.getTitle())))ia=this.getHtml2(mxUtils.getXml(ca),f,null!=g?g.getTitle():null,ja,ka);else if(B||!x&&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(d,f,g,v){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var x=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=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)));x.appendChild(N)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(x)),x=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var B=this.pages[f],I=B.node;if(B!=this.currentPage)if(B.needsUpdate){var D=new mxCodec(mxUtils.createXmlDocument());D=D.encode(new mxGraphModel(B.root));this.editor.graph.saveViewState(B.viewState,
+D,null,v);EditorUi.removeChildNodes(I);mxUtils.setTextContent(I,Graph.compressNode(D));delete B.needsUpdate}else v&&(this.updatePageRoot(B),null!=B.viewState.backgroundImage&&(null!=B.viewState.backgroundImage.originalSrc?B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.originalSrc,B):Graph.isPageLink(B.viewState.backgroundImage.src)&&(B.viewState.backgroundImage=this.createImageForPageLink(B.viewState.backgroundImage.src,B))),null!=B.viewState.backgroundImage&&
+null!=B.viewState.backgroundImage.originalSrc&&(D=new mxCodec(mxUtils.createXmlDocument()),D=D.encode(new mxGraphModel(B.root)),this.editor.graph.saveViewState(B.viewState,D,null,v),I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(D))));d(I)}return x};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],v=0;v<d.length;v++){var x=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(x)?g.push(x):isNaN(parseInt(x))?x.toLowerCase()!=x?g.push(String.fromCharCode(65+Math.round(25*
+Math.random()))):x.toUpperCase()!=x?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(x)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));
+d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(B){d[EditorUi.DIFF_INSERT][f].data=B.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var v in d[EditorUi.DIFF_UPDATE]){var x=d[EditorUi.DIFF_UPDATE][v];null!=x.name&&(x.name=this.anonymizeString(x.name));null!=x.cells&&(f=mxUtils.bind(this,function(B){var I=x.cells[B];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 x.cells[B]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(x.cells)&&delete x.cells);mxUtils.isEmptyObject(x)&&delete d[EditorUi.DIFF_UPDATE][v]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&
+d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.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 d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?
+f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?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(d,f,g,v,x,B,I,
+D,N,G,ia){x=null!=x?x:!0;B=null!=B?B:!1;var ka=this.editor.graph;if(f||!d&&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(x,B,G,ia);N=null!=N?N:this.getCurrentFile();d=this.createFileData(I,ka,N,window.location.href,d,f,g,v,x,D,G);ka!=this.editor.graph&&ka.container.parentNode.removeChild(ka.container);return d};EditorUi.prototype.getHtml=
+function(d,f,g,v,x,B){B=null!=B?B:!0;var I=null,D=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){I=B?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var N=f.view.scale;B=Math.floor(I.x/N-f.view.translate.x);N=Math.floor(I.y/N-f.view.translate.y);I=f.background;null==x&&(f=this.getBasenames().join(";"),0<f.length&&(D=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",B);d.setAttribute("y0",N)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize",
+"0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=v&&d.setAttribute("edit",v));null!=x&&(x=x.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?
+"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\n":"")+"</head>\n<body"+(null==x&&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==x?'<script type="text/javascript" src="'+D+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+
+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,v,x){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=x&&(x=x.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));
+return(null==x?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=x?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==x?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=x?'<meta http-equiv="refresh" content="0;URL=\''+x+"'\"/>\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(d))+'"></div>\n'+(null==x?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+x+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:
+null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var v=0;v<d.length;v++)null==
+d[v].getAttribute("id")&&d[v].setAttribute("id",v),f=new DiagramPage(d[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 x=urlParams["layer-ids"].split(" ");f={};for(v=0;v<x.length;v++)f[x[v]]=!0;var B=this.editor.graph.getModel(),I=B.getChildren(B.root);for(v=0;v<I.length;v++){var D=I[v];B.setVisible(D,f[D.id]||!1)}}catch(N){}};EditorUi.prototype.getBaseFilename=function(d){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(".")));!d&&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(d,f,g,v,x,B,I,D,N,G,ia,ka){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var ja=this.getBaseFilename("remoteSvg"==d?!1:!x),ca=ja+("xml"==d||"pdf"==d&&ia?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,x,null,null,null,f);this.saveData(ca,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,ja),this.saveData(ca,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,
+mxResources.get("export"))){if("xmlpng"==d)ca=ja+".png";else if("jpeg"==d)ca=ja+".jpg";else if("remoteSvg"==d){ca=ja+".svg";d="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,d,mxUtils.bind(this,function(T,aa){try{var U=this.editor.graph.pageVisible;0==B&&(this.editor.graph.pageVisible=B);var da=this.createDownloadRequest(T,
+d,v,aa,I,x,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"==d){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(d,f,g,v,x,B,I,D,N,G,ia,ka,ja){var ca=this.editor.graph,pa=ca.getGraphBounds();g=this.getFileData(!0,null,null,
+null,g,0==B?!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==B&&(L="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(B=0;B<this.pages.length;B++)if(this.pages[B]==this.currentPage){ra="&from="+B;break}B=ca.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!x?
+x||null!=B&&B!=mxConstants.NONE||(B="#ffffff"):B=mxConstants.NONE;x={globalVars:ca.getExportVariables()};N&&(x.grid={size:ca.gridSize,steps:ca.view.gridSteps,color:ca.view.gridColor});Graph.translateDiagram&&(x.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+ra+L+"&bg="+(null!=B?B:mxConstants.NONE)+"&base64="+v+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(x))+(null!=I?
+"&scale="+I:"")+(null!=D?"&border="+D:"")+(ka&&isFinite(ka)?"&w="+ka:"")+(ja&&isFinite(ja)?"&h="+ja:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var v=window.location.hash,x=mxUtils.bind(this,function(I){var D=null!=d.data?d.data:"";null!=I&&0<I.length&&(0<D.length&&(D+="\n"),D+=I);I=new LocalFile(this,"csv"!=d.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"==d.format&&this.importCsv(D,mxUtils.bind(this,function(ja){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var N=null!=d.interval?parseInt(d.interval):6E4,G=null,ia=mxUtils.bind(this,function(){var ja=this.currentPage;mxUtils.post(d.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!=d.url&&0<d.url.length){var B=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(B,mxUtils.bind(this,function(I){x(I)}),
+mxUtils.bind(this,function(I){null!=g&&g(I)}))}else x("")};EditorUi.prototype.updateDiagram=function(d){function f(Y){var Z=new mxCellOverlay(Y.image||x.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!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var x=this.editor.graph,B=x.getModel();B.beginUpdate();var I=null;try{for(d=d.firstChild;null!=
+d;){if("update"==d.nodeName){var D=B.getCell(d.getAttribute("id"));if(null!=D){try{var N=d.getAttribute("value");if(null!=N){var G=mxUtils.parseXml(N).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))B.setValue(D,G);else for(var ia=G.attributes,ka=0;ka<ia.length;ka++)x.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=d.getAttribute("style");null!=ja&&x.model.setStyle(D,
+ja)}catch(Y){null!=window.console&&console.log("Error in style for "+D.id+": "+Y)}try{var ca=d.getAttribute("icon");if(null!=ca){var pa=0<ca.length?JSON.parse(ca):null;null!=pa&&pa.append||x.removeCellOverlays(D);null!=pa&&x.addCellOverlay(D,f(pa))}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}try{var ra=d.getAttribute("geometry");if(null!=ra){ra=JSON.parse(ra);var L=x.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])}x.model.setGeometry(D,L)}}}catch(Y){null!=window.console&&console.log("Error in icon for "+D.id+": "+Y)}}}else if("model"==d.nodeName){for(var R=d.firstChild;null!=R&&R.nodeType!=mxConstants.NODETYPE_ELEMENT;)R=R.nextSibling;null!=R&&(new mxCodec(d.firstChild)).decode(R,B)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(x.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))x.view.translate=
+new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(I=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{B.endUpdate()}null!=I&&this.chromelessResize&&this.chromelessResize(!0,I)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=g.lastIndexOf(".");0<=v&&(d=g.substring(v),g=g.substring(0,v));if(f){f=g;var x=new Date;
+g=x.getFullYear();v=x.getMonth()+1;var B=x.getDate(),I=x.getHours(),D=x.getMinutes();x=x.getSeconds();g=f+(" "+(g+"-"+v+"-"+B+"-"+I+"-"+D+"-"+x))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,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 x=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!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),
+null!=d.backupPatch&&d.patch([d.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"));
+v=!0;if(!this.isOffline()&&null!=d.getMode()){var B="1"==urlParams.sketch?"sketch":uiTheme;if(null==B)B="default";else if("sketch"==B||"min"==B)B+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+B})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
+d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(I){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(I){}}catch(I){this.fileLoadedError=I;if(null!=d)try{d.close()}catch(D){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+I.message,label:"stack_"+I.stack})}catch(D){}d=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)||x():x()});f?d():this.handleError(I,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else x();return v};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,v=new mxGraphModel,x=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var B=0;B<d.length;B++){this.updatePageRoot(d[B]);var I=
+d[B].node.cloneNode(!1);I.removeAttribute("name");v.root=d[B].root;var D=x.encode(v);this.editor.graph.saveViewState(d[B].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(d,f,g){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var x=0;x<d.attributes.length;x++){var B=d.attributes[x].name,I=null!=f?f(d,B,d.attributes[x].value,!0):d.attributes[x].value;null!=I&&(v^=this.hashValue(B,
+f,g)+this.hashValue(I,f,g))}}if(null!=d.childNodes)for(x=0;x<d.childNodes.length;x++)v=(v<<5)-v+this.hashValue(d.childNodes[x],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(x=0;x<d.length;x++)f=(f<<5)-f+d.charCodeAt(x)<<0;v^=f}return v};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,v,x,B,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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
+return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
+if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var v=g.previousSibling;f.insertBefore(g,d);f.insertBefore(v,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,v,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var B=null,I=mxUtils.bind(this,function(R,Y){0==R.length&&d.isEditable()?
+(null==B&&(B=document.createElement("div"),B.className="geDropTarget",mxUtils.write(B,mxResources.get("dragElementsHere"))),Y.appendChild(B)):this.addLibraryEntries(R,Y)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),g,null!=v?v:!0,mxUtils.bind(this,function(R){I(f,R)}));this.repositionLibrary(x);var N=D.parentNode.previousSibling;v=N.getAttribute("title");
+null!=v&&0<v.length&&".scratchpad"!=d.title&&N.setAttribute("title",this.getLibraryStorageHint(d)+"\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"!=d.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(d)});null!=ka?this.confirm(mxResources.get("allChangesLost"),null,Y,mxResources.get("cancel"),mxResources.get("discardChanges")):Y();mxEvent.consume(R)}}));
+if(d.isEditable()){var ja=this.editor.graph,ca=null,pa=mxUtils.bind(this,function(R){this.showLibraryDialog(d.getTitle(),D,f,d,d.getMode());mxEvent.consume(R)}),ra=mxUtils.bind(this,function(R){d.setModified(!0);d.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(d.getTitle(),f,d,d.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(d.getTitle(),f,d,d.getMode(),d.constructor==
+LocalLibrary,!0,function(){null==ka||d.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);ra(Z);null!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=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,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,
+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!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=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&&
+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!=B&&null!=B.parentNode&&0<f.length&&(B.parentNode.removeChild(B),B=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=
+G.firstChild);mxEvent.addListener(v,"click",V);this.isOffline()||".scratchpad"!=d.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(d,f){for(var g=0;g<d.length;g++){var v=d[g],x=v.data;if(null!=x){x=this.convertDataUri(x);var B="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(B+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(B+"image="+x,v.w,v.h,"",v.title||"",!1,null,!0))}else null!=v.xml&&(x=this.stringToCells(Graph.decompress(v.xml)),0<x.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(x,
+v.w,v.h,v.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.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,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");
+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(d,f,g,v,x,B,I){d=new ImageDialog(this,d,f,g,v,x,B,I);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?
+200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,v){v||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,v,x){d=new LibraryDialog(this,d,f,g,v,x);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(B){B&&null==this.getCurrentFile()&&
+"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){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 d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.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(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,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,
+mxEvent.consume(v)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,v,x,B,I){var D=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{I?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"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!=x?x:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+
+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ka=null!=x?null:null!=B?B: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!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.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(d,f,g,v,x)}),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,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(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}),
+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=B=null;null!=N&&null!=N.helpLink?(B=mxResources.get("help"),ja=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(N.helpLink)})):null!=N&&null!=N.ownerEmail&&(B=mxResources.get("contactOwner"),I+=mxUtils.htmlEntities(" ("+B+": "+N.ownerEmail+")"),ja=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(N.ownerEmail))}));this.showError(f,I,G,g,ia,null,null,B,ja,null,null,null,v?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,
+!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,v,x,B){var I=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){I();null!=f&&f()},function(){I();null!=g&&g()},v,x,null,null,null,null,D);this.showDialog(d.container,340,46+D,!0,B);d.init()};EditorUi.prototype.showBanner=function(d,f,g,v){var x=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&
+null!=mxSettings.settings["close"+d])){var B=document.createElement("div");B.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(B.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(B.style,"transition","all 1s ease");B.className="geBtn gePrimaryBtn";
+x=document.createElement("img");x.setAttribute("src",IMAGE_PATH+"/logo.png");x.setAttribute("border","0");x.setAttribute("align","absmiddle");x.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";B.appendChild(x);x=document.createElement("img");x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));x.setAttribute("border","0");x.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
+B.appendChild(x);mxUtils.write(B,f);document.body.appendChild(B);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);
+B.style.paddingBottom="30px";B.appendChild(f)}var N=mxUtils.bind(this,function(){null!=B.parentNode&&(B.parentNode.removeChild(B),this.bannerShowing=!1,I.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(x,"click",mxUtils.bind(this,function(ia){mxEvent.consume(ia);N()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(B.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){N()}),1E3)});mxEvent.addListener(B,"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(B.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,3E4);x=!0}return x};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,v){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,v,x){var B="jpeg"==g?"jpg":g;v=this.getBaseFilename(v)+(null!=f?".drawio":"")+"."+B;d=this.createImageDataUri(d,
+f,g,x);this.saveData(v,B,d.substring(d.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(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
+!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,v,x,B){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=B?B:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),
+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+":",d):this.openInNewWindow(d,g,v);else{var I=document.createElement("a");B=(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]+)\./);B=65==(D?parseInt(D[2],10):
+!1)?!1:B}if(B||this.isOffline()){I.href=URL.createObjectURL(v?this.base64ToBlob(d,g):new Blob([d],{type:g}));B?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(d,f,g,v,x).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,v,x,B){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
+g?"&mime="+g:"")+(null!=x?"&format="+x:"")+(null!=B?"&base64="+B:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(v?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,v=Math.ceil(g/1024),x=Array(v),B=0;B<v;++B){for(var I=1024*B,D=Math.min(I+1024,g),N=Array(D-I),G=0;I<D;++G,++I)N[G]=d[I].charCodeAt(0);x[B]=new Uint8Array(N)}return new Blob(x,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,v,x,B,I,D){B=null!=B?B:!1;I=null!=I?I:"vsdx"!=
+x&&(!mxClient.IS_IOS||!navigator.standalone);x=this.getServiceCount(B);isLocalStorage&&x++;var N=4>=x?2:6<x?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(d,g,v);else if(null!=g&&"text/html"==g.substring(0,9)){var ka=new EmbedDialog(this,d);this.showDialog(ka.container,450,240,!0,!0);ka.init()}else{var ja=window.open("about:blank");null==ja?mxUtils.popup(d,!0):(ja.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),ja.document.close())}else ia==App.MODE_DEVICE||"download"==ia?this.doSaveLocalFile(d,G,g,v,null,D):null!=G&&0<G.length&&this.pickFolder(ia,mxUtils.bind(this,function(ca){try{this.exportFile(d,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,B,I,null,1<x,N,d,g,v);B=this.isServices(x)?x>N?390:280:160;this.showDialog(f.container,420,B,!0,!0);f.init()};
+EditorUi.prototype.openInNewWindow=function(d,f,g){var v=window.open("about:blank");null==v||null==v.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||g?(d=g?d:btoa(unescape(encodeURIComponent(d))),v.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):v.document.write("<html>"+d+"</html>"):v.document.write("<html><pre>"+mxUtils.htmlEntities(d,!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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(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);
+mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var x=f.getBoundingClientRect();this.tagsDialog.style.left=x.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";x=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=x.zIndex;document.body.appendChild(this.tagsDialog);
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(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",
+"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=d(mxUtils.bind(this,function(v){var x=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",x);null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)x.apply(this);else{this.exportDialog=document.createElement("div");var B=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=B.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";B=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=B.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(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,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 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"));
+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);x.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",x);document.body.appendChild(this.exportDialog)}mxEvent.consume(v)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,v,x){this.isLocalFileSave()?this.saveLocalFile(g,d,v,x,f):this.saveRequest(d,f,mxUtils.bind(this,function(B,I){return this.createEchoRequest(g,B,v,x,f,I)}),g,x,v)};EditorUi.prototype.saveRequest=function(d,f,g,v,x,B,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;d=new CreateDialog(this,d,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){B=null!=B?B:"pdf"==f?"application/pdf":"image/"+f;if(null!=v)try{this.exportFile(v,G,B,!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,B,!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,B,x);D=this.isServices(D)?4<D?390:280:160;this.showDialog(d.container,420,D,!0,!0);d.init()};EditorUi.prototype.isServices=
+function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,v,x,B){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,v,x,B,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,d,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()+(x?".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();x&&Z.setAttribute("content",this.getFileData(!0,null,null,null,g,N,null,null,null,!1));ca(Graph.xmlDeclaration+"\n"+(x?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(Z))});this.editor.graph.mathEnabled&&this.editor.addMathCss(L);var Y=mxUtils.bind(this,function(Z){B?(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(d,f,g,v,x,B,I){return this.addCheckbox(d,g,v,x,B,I,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,v,x,B,I,D){B=null!=B?B:!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");B&&(d.appendChild(N),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",I),d.appendChild(g),x||mxUtils.br(d));return N};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var v=this.getCurrentFile(),x="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(x=window.location.href);var B=document.createElement("select");B.style.maxWidth=
+"200px";B.style.width="auto";B.style.marginLeft="8px";B.style.marginRight="10px";B.className="geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));B.appendChild(v);v=document.createElement("option");v.setAttribute("value","custom");mxUtils.write(v,mxResources.get("custom")+"...");B.appendChild(v);d.appendChild(B);mxEvent.addListener(B,"change",mxUtils.bind(this,function(){if("custom"==B.value){var I=new FilenameDialog(this,x,mxResources.get("ok"),
+function(D){null!=D?x=D:B.value="blank"},mxResources.get("url"),null,null,null,null,function(){B.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)?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===B.value?"_blank":x:null},getEditInput:function(){return g},getEditSelect:function(){return B}}};EditorUi.prototype.addLinkSection=
+function(d,f){function g(){var D=document.createElement("div");D.style.width="100%";D.style.height="100%";D.style.boxSizing="border-box";null!=B&&B!=mxConstants.NONE?(D.style.border="1px solid black",D.style.backgroundColor=B):(D.style.backgroundPosition="center center",D.style.backgroundRepeat="no-repeat",D.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");I.innerText="";I.appendChild(D)}mxUtils.write(d,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 x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","blank");mxUtils.write(x,mxResources.get("openInNewWindow"));v.appendChild(x);x=document.createElement("option");x.setAttribute("value","self");mxUtils.write(x,mxResources.get("openInThisWindow"));v.appendChild(x);
+f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(f));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var B="#0000ff",I=null;I=mxUtils.button("",mxUtils.bind(this,function(D){this.pickColor(B||"none",function(N){B=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";d.appendChild(I);mxUtils.br(d);return{getColor:function(){return B},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,v,x,B,I){I=null!=I?I:[];v&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||I.push("lightbox=1"),"auto"!=d&&I.push("target="+d),null!=f&&f!=mxConstants.NONE&&
+I.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=x&&0<x.length&&I.push("edit="+encodeURIComponent(x)),B&&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(d,f,g,v,x,B,I,D,N,G){N=this.createUrlParameters(d,f,g,v,x,B,N);d=this.getCurrentFile();f=!0;null!=I?g="#U"+encodeURIComponent(I):(d=this.getCurrentFile(),
+D||null==d||d.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="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&N.push("title="+encodeURIComponent(d.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(d,f,g,v,x,B,I,D,N,G,ia,ka){this.getBasenames();var ja={};""!=x&&x!=mxConstants.NONE&&(ja.highlight=x);"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!=d?ja.url=d:ja.xml=this.getFileData(!0,null,null,null,null,!I);f='<div class="mxgraph" style="'+(B?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ja))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ka(f,'<script type="text/javascript" src="'+(0<d.length?
+("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"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(d,f,g,v){var x=document.createElement("div");x.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("html"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+x.appendChild(B);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");B=D.cloneNode(!0);B.setAttribute("value","copy");I.appendChild(B);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 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;";
+B.setAttribute("checked","checked");null==g&&D.setAttribute("disabled","disabled");x.appendChild(I);var ia=this.addLinkSection(x),ka=this.addCheckbox(x,mxResources.get("zoom"),!0,null,!0);mxUtils.write(x,":");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%";x.appendChild(ja);var ca=this.addCheckbox(x,mxResources.get("fit"),!0);I=null!=this.pages&&1<this.pages.length;
+var pa=pa=this.addCheckbox(x,mxResources.get("allPages"),I,!I),ra=this.addCheckbox(x,mxResources.get("layers"),!0),L=this.addCheckbox(x,mxResources.get("tags"),!0),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),R=null;I=380;if(EditorUi.enableHtmlEditOption){R=this.addEditButton(x,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")})}d=new CustomDialog(this,x,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,d,f);this.showDialog(d.container,340,I,!0,!0);B.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,v,x,B,I,D){var N=document.createElement("div");N.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,
+d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";N.appendChild(G);var ia=this.getCurrentFile();d=0;if(null==ia||ia.constructor!=window.DriveFile||f)I=null!=I?I:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=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==
-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()),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",
+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)d+=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,B);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,!B),V=this.addEditButton(N,L),R=V.getEditInput();B&&(R.style.marginLeft=L.style.marginLeft,L.style.display="none",d-=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(){x(pa.getTarget(),pa.getColor(),null==
+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+d,!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(d,f,g,v,x){var B=document.createElement("div");B.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:"+(x?"10":"4")+"px";B.appendChild(I);if(x){mxUtils.write(B,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%";B.appendChild(D);mxUtils.write(B,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";B.appendChild(N);mxUtils.br(B)}var G=this.addCheckbox(B,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ia=v?null:this.addCheckbox(B,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);I=this.editor.graph;var ka=v?null:this.addCheckbox(B,mxResources.get("transparentBackground"),I.background==mxConstants.NONE||null==I.background);null!=ka&&
+(ka.style.marginBottom="16px");d=new CustomDialog(this,B,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,d,f);this.showDialog(d.container,300,(x?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,v,x,B,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,d);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 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")),
+"8px";d=["selectionOnly","diagram","page"];var R={};for(ja=0;ja<d.length;ja++)if(!ia.isSelectionEmpty()||"selectionOnly"!=d[ja]){var Y=document.createElement("option");mxUtils.write(Y,mxResources.get(d[ja]));Y.setAttribute("value",d[ja]);V.appendChild(Y);R[d[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)})):B&&(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",
+"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";B=document.createElement("option");B.setAttribute("value","none");mxUtils.write(B,mxResources.get("noChange"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","embedFonts");mxUtils.write(B,
+mxResources.get("embedFonts"));U.appendChild(B);B=document.createElement("option");B.setAttribute("value","lblToSvg");mxUtils.write(B,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(B);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,!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=
+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;x(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(d,f,g,v,x){var B=document.createElement("div");B.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";B.appendChild(D)}var N=this.addCheckbox(B,mxResources.get("fit"),
+!0),G=this.addCheckbox(B,mxResources.get("shadow"),I.shadowVisible&&v,!v),ia=this.addCheckbox(B,g),ka=this.addCheckbox(B,mxResources.get("lightbox"),!0),ja=this.addEditButton(B,ka),ca=ja.getEditInput(),pa=1<I.model.getChildCount(I.model.getRoot()),ra=this.addCheckbox(B,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,B,mxUtils.bind(this,function(){d(N.checked,G.checked,ia.checked,ka.checked,ja.getLink(),ra.checked)}),null,mxResources.get("embed"),x);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,v,x,B,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:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ra+="cursor:pointer;");d&&(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 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(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 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"==
+EditorUi.prototype.createEmbedSvg=function(d,f,g,v,x,B,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"+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}})(this);\"",ja+="cursor:pointer;");d&&(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:"")+(x?"&edit=_blank":"")+(B?"&layers=1":"")+"');}}})(this);"),ja+="cursor:pointer;"),d&&(d=parseInt(D.getAttribute("width")),x=parseInt(D.getAttribute("height")),D.setAttribute("viewBox","-0.5 -0.5 "+d+" "+x),ja+="max-width:100%;max-height:"+x+"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(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){g=v[0];var x=f.getGlobalVariable;f.getGlobalVariable=function(B){return"page"==B?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==B?1:x.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}v=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(B){}finally{this.editor.graph=v}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(f=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(g=v))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,v,x){try{var B=this.editor.graph,I=null!=B.themes&&"darkTheme"==B.defaultThemeName,D=null;if(null!=g&&0<g.length)B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet()),document.body.appendChild(B.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),B),D=g;else if(I||null!=this.pages&&this.currentPage!=this.pages[0]){B=this.createTemporaryGraph(I?B.getDefaultStylesheet():B.getStylesheet());var N=B.getGlobalVariable;B.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?B.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&B.setBackgroundImage(G.viewState.backgroundImage);B.getGlobalVariable=function(ia){return"page"==ia?G.getName():"pagenumber"==ia?1:N.apply(this,
+arguments)};document.body.appendChild(B.container);B.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));d(ka.substring(ka.lastIndexOf(",")+1));B!=this.editor.graph&&B.container.parentNode.removeChild(B.container)}catch(ja){null!=f&&f(ja)}}),null,null,null,mxUtils.bind(this,function(ia){null!=
+f&&f(ia)}),null,null,v,null,B.shadowVisible,null,B,x,null,null,null,"diagram",null)}catch(ia){null!=f&&f(ia)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,v,x,B,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);B=f.getSvg(I,G,ia,null,null,B,null,null,null,f.shadowVisible||ka,null,ja,"diagram");(f.shadowVisible||ka)&&f.addSvgShadow(B,null,null,0==ia);null!=d&&B.setAttribute("content",d);null!=g&&B.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!=x&&x(pa);return pa});f.mathEnabled&&this.editor.addMathCss(B);if(null!=x)this.embedFonts(B,mxUtils.bind(this,function(pa){D?this.editor.convertImages(pa,mxUtils.bind(this,function(ra){ca(ra)})):ca(pa)}));else return ca(B)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(v){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,v,x,B,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,x?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,d||1,f,v,null,null,B,I,G,ka,ja)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,v,x,B,I){f=null!=
+f?f:0;g=null!=g?g:0;var D=[];try{var N=this.editor.graph;if(null!=d&&0<d.length){N.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};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&&!B){if(ia=Editor.parseDiagramNode(ka[0]),null!=this.currentPage&&(d[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){B=[];var ca=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[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]));d[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));B.push(ra)}this.updatePageLinks(d,B)}}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(d,D[ca]);var V=N.parseBackgroundImage(ia.getAttribute("backgroundImage"));if(null!=V&&null!=V.originalSrc){this.updateBackgroundPageLink(d,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(x)throw Y;this.handleError(Y)}return D};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc=
+"data:page/id,"+g)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=function(d,f){var g=document.createElement("div"),v=this.editor.graph,x=v.getLinkForCell(f);null!=x&&v.setLinkForCell(f,this.updatePageLink(d,x));if(v.isHtmlLabel(f)){g.innerHTML=v.sanitizeHtml(v.getLabel(f));for(var B=g.getElementsByTagName("a"),I=!1,D=0;D<B.length;D++)x=B[D].getAttribute("href"),null!=x&&(B[D].setAttribute("href",this.updatePageLink(d,x)),I=!0);I&&v.labelChanged(f,g.innerHTML)}for(D=0;D<v.model.getChildCount(f);D++)this.updatePageLinksForCell(d,
+v.model.getChildAt(f,D))};EditorUi.prototype.updatePageLink=function(d,f){if(Graph.isPageLink(f)){var g=d[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 x=0;x<v.actions.length;x++){var B=v.actions[x];if(null!=B.open&&Graph.isPageLink(B.open)){var I=B.open.substring(B.open.indexOf(",")+1);g=d[I];null!=g?B.open="data:page/id,"+g:null==this.getPageById(I)&&delete B.open}}f=
+"data:action/json,"+JSON.stringify(v)}}catch(D){}return f};EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,v,x){v=null!=v?v:d.name;g=null!=g?g:mxUtils.bind(this,function(I){this.handleError(I)});var B=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",d,v);var ia=new XMLHttpRequest;ia.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":
+""));ia.responseType="blob";this.addRemoteServiceSecurityCheck(ia);null!=x&&ia.setRequestHeader("x-convert-custom",x);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(d,f,g,v)}catch(ka){g(ka)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?B():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",B))};EditorUi.prototype.importGraphML=
+function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(x){this.handleError(x)});var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(x){g(x)}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(d){var f=mxUtils.bind(this,
+function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||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(d,
+f,g){var v=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var x=JSON.parse(d);f(LucidImporter.importState(x));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var B=[(new Date).toISOString(),"convertLucidChart",x];null!=x.state&&B.push(JSON.parse(x.state));if(null!=x.svgThumbs)for(var I=0;I<x.svgThumbs.length;I++)B.push(Editor.createSvgDataUri(x.svgThumbs[I]));null!=
+x.thumb&&B.push(x.thumb);console.log.apply(console,B)}}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(d,f,g,v){var x=this,B=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(),d,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(x.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)?B():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",B):mxscript("js/extensions.min.js",B))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,v){function x(D,N,G){c1=D>>2;c2=(D&3)<<4|N>>4;c3=(N&15)<<2|G>>6;c4=G&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(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+x(D.charCodeAt(i),D.charCodeAt(i+1),0):i+1==D.length?r+x(D.charCodeAt(i),0,0):r+x(D.charCodeAt(i),D.charCodeAt(i+1),D.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!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 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 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 v=Editor.useLocalStorage;Editor.useLocalStorage=!e}window.openFile=
+I.onerror=function(D){v(D)};I.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var v=this.editor.graph,x=null;v.getModel().beginUpdate();try{x=v.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(x,!0)}finally{v.getModel().endUpdate()}return x};EditorUi.prototype.insertTextAt=function(d,f,g,v,x,B,I,D){B=null!=B?B:!0;I=null!=I?I:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.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:"==d.substring(0,5)||!this.isOffline()&&(x||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var N=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=
+G&&0<G.length)return this.importXml(G,f,g,B,!0,D)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,f,g,B,!0,D);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var ia=this.importXml(G,f,g,B,!0,D);if(0<ia.length)return ia}catch(ja){}this.loadImage(d,
+mxUtils.bind(this,function(ja){if("data:"==d.substring(0,5))this.resizeImage(ja,d,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="+d+";"))}}),mxUtils.bind(this,function(){var ja=null;N.getModel().beginUpdate();try{ja=N.insertVertex(N.getDefaultParent(),null,d,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{d=
+Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,B,null,D);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,function(ja){this.editor.graph.setSelectionCells(this.importXml(ja,f,g,B,null,D))}),mxUtils.bind(this,function(ja){this.handleError(ja)}));else{N=this.editor.graph;x=null;N.getModel().beginUpdate();try{x=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",[x]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");x.value=d;N.updateCellSize(x);if(0<this.maxTextWidth&&x.geometry.width>this.maxTextWidth){var ka=N.getPreferredSizeForCell(x,this.maxTextWidth);x.geometry.width=ka.width;x.geometry.height=ka.height}Graph.isLink(x.value)&&N.setLinkForCell(x,x.value);x.geometry.width+=N.gridSize;x.geometry.height+=
+N.gridSize}finally{N.getModel().endUpdate()}return[x]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};
+EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&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 v=Editor.useLocalStorage;Editor.useLocalStorage=!d}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=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;";
+function(){window.openFile=null});if(!f){var x=this.dialog,B=x.close;this.dialog.close=mxUtils.bind(this,function(I){Editor.useLocalStorage=v;B.apply(x,arguments);I&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(d,f,g){var v=this,x=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(B){if(mxUtils.isEmptyObject(B.files))g();else{var I=0,D,N=!1;B.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,d.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())}),d.name):g()}):N||g()}},function(B){g(B)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?x():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",x))};EditorUi.prototype.importFile=function(d,f,g,v,x,B,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(d),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=d.indexOf(";"),0<N&&(d=d.substring(0,N)+d.substring(d.indexOf(",",N+1))),G&&f.isGridEnabled()&&(g=f.snap(g),v=f.snap(v)),ca=[f.insertVertex(null,null,"",g,v,x,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";")])):/(\.*<graphml )/.test(d)?(ja=!0,this.importGraphML(d,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(d,I)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ja=!0,x=mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&299>=ra.status?pa(ra.responseText):null!=D&&(D(null),this.showError(mxResources.get("error"),413==
+ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,x,I):this.parseFile(N,x,I)):0==d.indexOf("PK")&&null!=N?(ja=!0,this.importZipFile(N,pa,mxUtils.bind(this,function(){ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G);D(ca)}))):/(\.v(sd|dx))($|\?)/i.test(I)||/(\.vs(s|x))($|\?)/i.test(I)||(ca=this.insertTextAt(this.validateFileData(d),g,v,!0,null,G,null,null!=ka?mxEvent.isControlDown(ka):null));ja||null==D||D(ca);return ca};EditorUi.prototype.importFiles=
+function(d,f,g,v,x,B,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!=d)for(var L=ia||this.resampleThreshold,V=0;V<d.length;V++)if("image/svg"!==d[V].type.substring(0,9)&&"image/"===d[V].type.substring(0,6)&&d[V].size>L){ra=!0;break}var R=mxUtils.bind(this,function(){var Y=this.editor.graph,Z=Y.gridSize;x=null!=x?x: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==d.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}});B=null!=B?B:mxUtils.bind(this,function(U){Y.setSelectionCells(U)});if(this.spinner.spin(document.body,
+mxResources.get("loading")))for(var la=d.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()}}B(fa)}}),aa=0;aa<la;aa++)mxUtils.bind(this,function(U){var da=d[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=x(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 y=new Image;y.onload=mxUtils.bind(this,function(){Oa=Math.max(1,y.width);Na=Math.max(1,y.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]])});y.src=Editor.createSvgDataUri(mxUtils.getXml(La))}return Ya}}}catch(O){}return null})):T(U,mxUtils.bind(this,function(){return x(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 x(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 x(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,x(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)?x(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<d.length;V++)ra.push(d[V]);d=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(d,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,x=function(B,I){if(B||f)mxSettings.setResizeImages(B?I:null),mxSettings.save();g();d(I)};null==v||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(B){x(B,
+!0)},function(B){x(B,!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):x(!1,v)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,f,g)});v.readAsText(d)};EditorUi.prototype.parseFileData=
+function(d,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(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(x){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,v,x,B,
+I){x=null!=x?x:this.maxImageSize;var D=Math.max(1,d.width),N=Math.max(1,d.height);if(v&&this.isResampleImageSize(null!=I?I:f.length,B))try{var G=Math.max(D/x,N/x);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(d,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(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,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=d}catch(x){if(null!=g)g(x);else throw x;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var C=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 d=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(d,mxResources.get("plantUml")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(Z,Y.format,function(la,q,F){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==Y.format)f.labelChanged(L,
+"<pre>"+la+"</pre>"),f.updateCellSize(L,!0);else{f.setCellStyles("image",d.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){d.handleError(la)})},null,null,400,220);d.showDialog(V.container,420,300,!0,!0);V.init()};f.cellEditor.editMermaidData=function(L,V,R){var Y=JSON.parse(R);V=new TextareaDialog(d,
+mxResources.get("mermaid")+":",Y.data,function(Z){null!=Z&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(Z,Y.config,function(la,q,F){d.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){d.handleError(la)})},null,null,400,220);d.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")?d.showDataDialog(L):g.apply(this,arguments)}}catch(Z){d.handleError(Z)}};
+f.getLinkTitle=function(L){return d.getLinkTitle(L)};f.customLinkClicked=function(L){var V=!1;try{d.handleCustomLink(L),V=!0}catch(R){d.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 x=f.setBackgroundImage;f.setBackgroundImage=function(L){null!=L&&null!=L.originalSrc&&(L=d.createImageForPageLink(L.originalSrc,d.currentPage,this));x.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 B=f.getBackgroundImageObject;f.getBackgroundImageObject=function(L,V){var R=B.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=d.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=d.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)};C.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){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(L,"delete - cut copy copyAsImage - duplicate".split(" "),null,R)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=
+d.pages&&1<d.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=d.getCurrentFile();null!=V&&(L.filename=V.getTitle());L.pagecount=null!=d.pages?d.pages.length:1;L.page=null!=d.currentPage?d.currentPage.getName():"";L.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return L};var ka=f.getGlobalVariable;f.getGlobalVariable=function(L){var V=
+d.getCurrentFile();return"filename"==L&&null!=V?V.getTitle():"page"==L&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==L?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==L?null!=d.pages?d.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=d.defaultFilename,V=d.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 d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,v=!1,x=0;x<g.types.length;x++)if("text/"===g.types[x].substring(0,5)){v=!0;break}if(!v){var B=g.items;for(index in B){var I=
+B[index];if("file"===I.kind){if(d.isEditing())this.importFiles([I.getAsFile()],0,0,this.maxImageSize,function(N,G,ia,ka,ja,ca){d.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 d(){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(B){var I=mxEvent.getSource(B);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==I.nodeName||"TEXTAREA"==I.nodeName||224!=B.keyCode&&(mxClient.IS_MAC||17!=B.keyCode)&&(!mxClient.IS_MAC||91!=B.keyCode&&93!=B.keyCode)||v||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",B=f.container.scrollLeft,I=f.container.scrollTop,f.container.appendChild(g),v=!0,g.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=B,f.container.scrollTop=I)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(B){var I=B.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(B){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(B){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g,!0),d()}catch(I){this.handleError(I)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(B){if(f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=B.clipboardData&&this.pasteCells(B,g,!0,!0),!mxEvent.isConsumed(B))){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(B,g,!1,!0)}),0)}}),!0);var x=this.isSelectionAllowed;this.isSelectionAllowed=
+function(B){return mxEvent.getSource(B)==g?!0:x.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(d,f){mxSettings.setUi(d);(f=this.doSetCurrentTheme(d)||f)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.doSetCurrentTheme=function(d,f){function g(ka){return""==ka||"dark"==ka||"kennedy"==ka||null==ka}var v=Editor.currentTheme;d=g(d)?"default":d;v=g(v)?"default":v;var x="simple"==v&&"default"==d||"default"==v&&"simple"==d;if(x&&!this.themeSwitching){Editor.currentTheme=
+d;this.themeSwitching=!0;var B=this.editor.graph.view.translate,I=B.x,D=B.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"==d?(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"==d&&(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(d);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+(B.x-I)*ka;this.editor.graph.container.scrollTop=ia+N.y+(B.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 x};EditorUi.prototype.installStatusMinimizer=function(d){d=null!=d?d:this.statusContainer.parentNode;var f=!1;mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(){""!=this.editor.getStatus()&&(this.statusContainer.style.display="inline-block")}));mxEvent.addListener(d,"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 x=this.getCurrentFile();x=null!=x?x.savingStatusKey:DrawioFile.prototype.savingStatusKey;v==mxResources.get(x)+"..."&&(this.statusContainer.innerHTML='<div><img title="'+mxUtils.htmlEntities(mxResources.get(x))+
+'..."src="'+Editor.tailSpin+'"></div>',f=!0)}this.statusContainer.style.display="none";v=26>d.clientWidth;d.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(d){"default"==d&&(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(d);this.switchCssForTheme(d);this.createWrapperForTheme(d);
+this.createPickerMenuForTheme(d);this.createMainMenuForTheme(d);this.createMenubarForTheme(d);this.createFooterMenuForTheme(d);this.sidebarContainer.style.display="";"simple"==d&&(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=
+"63px",this.sidebarContainer.style.width="100%");null!=this.format&&(d="default"==d||"atlas"==d,this.format.showCloseButton!=d&&(this.format.showCloseButton=d,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(d){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"!=d);"simple"==d?(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(d){"simple"==d?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(d){"simple"==d?(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(d){"simple"==d&&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(d){if("simple"==d&&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;";d=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;";
+d.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,x=this.getPageIndex(this.currentPage);x=null!=x?x+1:1;var B=this.currentPage.getId();f.setAttribute("title",this.currentPage.getName()+" ("+x+"/"+v+")"+(null!=B?" ["+B+"]":""))}});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();d.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;";
+d.appendChild(g);mxUtils.bind(this,function(v){mxEvent.addListener(v,"click",mxUtils.bind(this,function(B){mxEvent.isAltDown(B)?(this.hideCurrentMenu(),this.actions.get("customZoom").funct(),mxEvent.consume(B)):mxEvent.isShiftDown(B)&&(this.hideCurrentMenu(),this.actions.get("smartFit").funct(),mxEvent.consume(B))}));var x=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,x);this.editor.addListener("resetGraphView",
+x);this.editor.addListener("pageSelected",x)})(g);d.appendChild(this.createMenuItem("zoomIn",Editor.plusImage));this.sketchWrapperElt.appendChild(this.sketchFooterMenuElt)}};EditorUi.prototype.createPickerMenuForTheme=function(d){if("simple"==d&&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;max-height:100%;width:48px;z-index:1;box-sizing:border-box;transform:translate(0, -50%);top:50%;user-select:none;";
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=
+!0);v.style.paddingLeft="12px";v.style.backgroundSize="";v.style.width="26px";v.style.height="30px";v.style.opacity="0.7";var x=this.createMenu("insert",Editor.shapesImage);x.style.backgroundSize="";x.style.marginBottom="4px";x.style.display="block";x.style.width="30px";x.style.height="30px";x.style.padding="4px";x.style.opacity="0.7";var B=!1,I=mxUtils.bind(this,function(){f.innerText="";if(!B){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(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="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: '+
+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(x)}"1"!=urlParams.embedInline&&f.appendChild(g)});mxEvent.addListener(g,"click",mxUtils.bind(this,function(){B?(mxUtils.setPrefixedStyle(f.style,"transform","translate(0, -50%)"),f.style.padding="8px 6px 4px",f.style.width="48px",f.style.top="50%",f.style.bottom="",f.style.height="",
+g.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",g.setAttribute("title","Minimize"),g.style.width="100%",g.style.height="14px",B=!1,I()):(f.innerText="",f.appendChild(g),mxUtils.setPrefixedStyle(f.style,"transform","translate(0, 0)"),f.style.width="auto",f.style.bottom="12px",f.style.padding="0px",f.style.top="",g.style.backgroundImage="url("+Editor.plusImage+")",g.setAttribute("title",mxResources.get("insert")),g.style.width="24px",g.style.height="24px",B=!0)}));this.addListener("darkModeChanged",
+I);this.addListener("sketchModeChanged",I);I();this.sketchWrapperElt.appendChild(this.sketchPickerMenuElt)}};EditorUi.prototype.createMenubarForTheme=function(d){"simple"==d?(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),d=mxUtils.bind(this,function(){var f=58>this.sketchPickerMenuElt.offsetTop-this.sketchPickerMenuElt.offsetHeight/2;this.sketchMainMenuElt.style.left=f?"70px":"10px";this.sketchMenubarElt.style.maxWidth=f?"calc(100% - 230px)":"calc(100% - 170px)"}),d(),mxEvent.addListener(window,"resize",d)),null!=this.statusContainer&&(this.statusContainer.style.flexShrink="1",this.sketchMenubarElt.appendChild(this.statusContainer)),null!=this.userElement&&
+(this.userElement.style.flexShrink="0",this.userElement.style.top="",this.sketchMenubarElt.appendChild(this.userElement)),d=this.menubar.langIcon,null!=d&&(d.style.position="",d.style.height="21px",d.style.width="21px",d.style.flexShrink="0",this.sketchMenubarElt.appendChild(d)),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)),d=this.menubar.langIcon,null!=d&&(d.style.position="absolute",d.style.height="18px",d.style.width="18px",d.style.flexShrink="",this.menubarContainer.parentNode.insertBefore(d,this.menubarContainer)))};EditorUi.prototype.createMenu=
+function(d,f,g){g=null!=g?g:"geToolbarButton";var v=this.menus.get(d),x=this.menubar.addMenu(mxResources.get(d),v.funct);x.className=g;x.style.display="inline-block";x.style.cursor="pointer";x.style.height="24px";x.setAttribute("title",mxResources.get(d));this.menus.menuCreated(v,x,g);null!=f&&(x.style.backgroundImage="url("+f+")",x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundSize="100% 100%",x.style.width="24px",x.innerText="");return x};EditorUi.prototype.createToolbarButton=
+function(d,f,g,v){v=null!=v?v:24;var x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset";x.setAttribute("title",f);x.style.backgroundImage="url("+d+")";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";x.style.backgroundSize="100% 100%";x.style.display="inline-block";x.style.cursor="pointer";x.style.marginLeft="6px";x.style.width=v+"px";x.style.height=v+"px";null!=g&&(mxEvent.addListener(x,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,
+function(B){B.preventDefault()})),mxEvent.addListener(x,"click",function(B){"disabled"!=x.getAttribute("disabled")&&g(B);mxEvent.consume(B)}));return x};EditorUi.prototype.createMenuItem=function(d,f,g){var v=this.actions.get(d),x=null!=v?v.funct:null,B=this.createToolbarButton(f,mxResources.get(d),x);null==v||g||(d=function(){v.isEnabled()?(B.removeAttribute("disabled"),B.style.cursor="pointer"):(B.setAttribute("disabled","disabled"),B.style.cursor="default");B.style.opacity=v.isEnabled()?"":"0.2"},
+this.editor.graph.addListener("enabledChanged",d),v.addListener("stateChanged",d),d());return B};EditorUi.prototype.createFormatWindow=function(){if(null==this.formatWindow){var d=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"),d,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(d){var f=this.formatWindow;null!=f?f.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):p.apply(this,arguments)};var E=EditorUi.prototype.isFormatPanelVisible;
+EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():E.apply(this,arguments)};var M=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!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";d&&this.editor.graph.sizeDidChange()}else M.apply(this,
+arguments)};EditorUi.prototype.createShapesPanel=function(d){var f=document.createElement("div");f.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;";f.className="geTitle";var g=document.createElement("span");g.style.fontSize="18px";g.style.marginRight="5px";g.innerHTML="+";f.appendChild(g);mxUtils.write(f,mxResources.get("moreShapes"));d.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,
+function(){this.actions.get("shapes").funct()}));g=mxUtils.bind(this,function(v,x){v=this.createMenu(v,null,"geTitle");v.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;";d.appendChild(v);return v});!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?f.style.bottom="0":null!=this.actions.get("newLibrary")?(f=document.createElement("div"),f.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+f.className="geTitle",g=document.createElement("span"),g.style.cssText="position:relative;top:6px;",mxUtils.write(g,mxResources.get("newLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("newLibrary").funct),f=f.cloneNode(!1),f.style.left="50%",f.style.borderLeft="1px solid lightgray",g=g.cloneNode(!1),mxUtils.write(g,mxResources.get("openLibrary")),f.appendChild(g),d.appendChild(f),mxEvent.addListener(f,"click",this.actions.get("openLibrary").funct)):(f=g("newLibrary",
+mxResources.get("newLibrary")),f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="0",f=g("openLibraryFrom",mxResources.get("openLibraryFrom")),f.style.borderLeft="1px solid lightgray",f.style.boxSizing="border-box",f.style.paddingRight="6px",f.style.paddingLeft="6px",f.style.height="32px",f.style.left="50%");d.appendChild(this.sidebarContainer);d.style.overflow="hidden"};EditorUi.prototype.createShapesWindow=function(){if(null==
+this.sidebarWindow){var d=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,d-6,f-6,mxUtils.bind(this,function(g){this.createShapesPanel(g)}));
+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(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,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 .geStatus > *:not([class]) { vertical-align:top; }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); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }html body .geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+
"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }div.mxWindow { border-radius:5px; box-shadow: 0px 0px 2px #C0C0C0 !important;}div.mxWindow *:not(svg *) { font-family: inherit !important; }html div.geVerticalHandle { position:absolute;bottom:0px;left:50%;cursor:row-resize;width:11px;height:11px;background:white;margin-bottom:-6px; margin-left:-6px; border: none; border-radius: 6px; 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); }html div.geInactivePage { background: "+
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
-(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(e){this.doSetDarkMode(e);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
-EditorUi.prototype.doSetDarkMode=function(e){if(Editor.darkMode!=e){var f=this.editor.graph;Editor.darkMode=e;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
-"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(e=this.actions.layersWindow.window.isVisible(),
-this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,e&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
+(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};EditorUi.prototype.setDarkMode=function(d){this.doSetDarkMode(d);this.fireEvent(new mxEventObject("darkModeChanged"))};var S=document.createElement("link");S.setAttribute("rel","stylesheet");S.setAttribute("href",STYLE_PATH+"/dark.css");S.setAttribute("charset","UTF-8");S.setAttribute("type","text/css");
+EditorUi.prototype.doSetDarkMode=function(d){if(Editor.darkMode!=d){var f=this.editor.graph;Editor.darkMode=d;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";f.view.defaultGridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultDarkGridColor:mxGraphView.prototype.defaultGridColor;f.view.gridColor=f.view.defaultGridColor;f.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.defaultPageBorderColor=Editor.isDarkMode()?"#505759":
+"#ffffff";f.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";f.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";f.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";f.loadStylesheet();null!=this.actions.layersWindow&&(d=this.actions.layersWindow.window.isVisible(),
+this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null,d&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=f.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=f.defaultPageBorderColor;
Graph.prototype.shapeBackgroundColor=f.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=f.shapeForegroundColor;Graph.prototype.defaultThemeName=f.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=
Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;null!=this.sketchStyleElt?this.sketchStyleElt.innerHTML=Editor.createMinimalCss():null!=Editor.styleElt&&(Editor.styleElt.innerHTML=Editor.createMinimalCss());Editor.isDarkMode()?null==S.parentNode&&document.getElementsByTagName("head")[0].appendChild(S):
-null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(e){Editor.pagesVisible!=e&&(Editor.pagesVisible=e,mxSettings.settings.pagesVisible=e,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(e,f){this.sidebar.sidebarTitles!=e&&(this.sidebar.sidebarTitles=e,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=e,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
-EditorUi.prototype.setInlineFullscreen=function(e){Editor.inlineFullscreen!=e&&(Editor.inlineFullscreen=e,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(e){Editor.sketchMode!=
-e&&(Editor.sketchMode=e,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var e=this.editor.graph;e.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);e.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)e.defaultEdgeStyle.fontSize=null,e.defaultVertexStyle.fontSize=
-null;else{e.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;e.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(e.defaultEdgeStyle.edgeStyle="none",e.defaultEdgeStyle.curved="1",e.defaultEdgeStyle.rounded="0",e.defaultEdgeStyle.jettySize="auto",e.defaultEdgeStyle.orthogonalLoop="1",e.defaultEdgeStyle.endArrow="open",e.defaultEdgeStyle.endSize="14",e.defaultEdgeStyle.startSize="14",e.defaultEdgeStyle.sourcePerimeterSpacing="8",e.defaultEdgeStyle.targetPerimeterSpacing=
-"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),e.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,e.defaultVertexStyle.fontSource=Editor.sketchFontSource,e.defaultVertexStyle.hachureGap="4",e.defaultVertexStyle.sketch="1",e.defaultVertexStyle.jiggle="2",e.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,e.defaultEdgeStyle.fontSource=Editor.sketchFontSource,e.defaultEdgeStyle.sketch="1",e.defaultEdgeStyle.jiggle="2",e.defaultEdgeStyle.hachureGap=
-"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(e){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(e)){var g=e.indexOf(",");0<g&&(f=this.getPageById(e.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==e.substring(0,5)&&(f=mxResources.get("action"));return f};
-EditorUi.prototype.handleCustomLink=function(e){if(Graph.isPageLink(e)){var f=e.indexOf(",");if(e=this.getPageById(e.substring(f+1)))this.selectPage(e);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(e)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
-ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(e){e.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(e){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(e,
-f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(e=f.getProperty("customFonts"),this.menus.customFonts=e,mxSettings.setCustomFonts(e));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
-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(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,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)}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,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 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,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 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 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,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),"*")}),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;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=
+null!=S.parentNode&&S.parentNode.removeChild(S)}};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};
+EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){Editor.sketchMode!=
+d&&(Editor.sketchMode=d,this.updateDefaultStyles())};EditorUi.prototype.updateDefaultStyles=function(){var d=this.editor.graph;d.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);d.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);this.menus.defaultFontSize=Editor.sketchMode?20:"simple"==Editor.currentTheme?16:Menus.prototype.defaultFontSize;if(this.menus.defaultFontSize==Menus.prototype.defaultFontSize)d.defaultEdgeStyle.fontSize=null,d.defaultVertexStyle.fontSize=
+null;else{d.defaultVertexStyle.fontSize=this.menus.defaultFontSize;var f=parseInt(this.menus.defaultFontSize)-4;d.defaultEdgeStyle.fontSize=f}"simple"==Editor.currentTheme&&(d.defaultEdgeStyle.edgeStyle="none",d.defaultEdgeStyle.curved="1",d.defaultEdgeStyle.rounded="0",d.defaultEdgeStyle.jettySize="auto",d.defaultEdgeStyle.orthogonalLoop="1",d.defaultEdgeStyle.endArrow="open",d.defaultEdgeStyle.endSize="14",d.defaultEdgeStyle.startSize="14",d.defaultEdgeStyle.sourcePerimeterSpacing="8",d.defaultEdgeStyle.targetPerimeterSpacing=
+"8");Editor.sketchMode?(this.menus.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts),d.defaultVertexStyle.fontFamily=Editor.sketchFontFamily,d.defaultVertexStyle.fontSource=Editor.sketchFontSource,d.defaultVertexStyle.hachureGap="4",d.defaultVertexStyle.sketch="1",d.defaultVertexStyle.jiggle="2",d.defaultEdgeStyle.fontFamily=Editor.sketchFontFamily,d.defaultEdgeStyle.fontSource=Editor.sketchFontSource,d.defaultEdgeStyle.sketch="1",d.defaultEdgeStyle.jiggle="2",d.defaultEdgeStyle.hachureGap=
+"4"):this.menus.defaultFonts=Menus.prototype.defaultFonts;d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);this.clearDefaultStyle()};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};
+EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;
+ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,
+f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,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(d,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(d,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(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(v,x){try{this.spinner.stop();var B=this.createImageDataUri(v,f,"png"),I=parseInt(x.getAttribute("width")),D=parseInt(x.getAttribute("height"));this.writeImageToClipboard(B,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<d.length?d:null)}catch(v){this.handleError(v)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,v){var x=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":x,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](v)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var v=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),x=mxUtils.getXml(g.encodeCells(v));mxUtils.setTextContent(d,encodeURIComponent(x));f?(g.removeCells(v,!1),g.lastPasteXml=null):(g.lastPasteXml=x,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,v){var x=this.editor.graph,B=null;x.lastPasteXml==d?x.pasteCounter++:(x.lastPasteXml=d,x.pasteCounter=0);var I=x.pasteCounter*x.gridSize;if(g||this.isCompatibleString(d))B=this.importXml(d,I,I),x.setSelectionCells(B);else if(f&&1==x.getSelectionCount()){I=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(I)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[I]);else{x.model.beginUpdate();try{x.labelChanged(I,d),Graph.isLink(d)&&x.setLinkForCell(I,d)}finally{x.model.endUpdate()}}x.setSelectionCell(I)}else B=x.getInsertPoint(),x.isMouseInsertPoint()&&(I=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),B=this.insertTextAt(d,B.x+I,B.y+I,!0),x.setSelectionCells(B);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return B};EditorUi.prototype.pasteCells=
+function(d,f,g,v){if(!mxEvent.isConsumed(d)){var x=f,B=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var I=d.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:d.clipboardData.getData("text/html");null!=D&&0<D.length?(x=this.parseHtmlData(D),B="text/plain"!=x.getAttribute("data-type")):null!=I&&0<I.length&&(x=document.createElement("div"),mxUtils.setTextContent(x,
+D))}I=x.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(d));else{var G=B?x.innerHTML:mxUtils.trim(null==x.innerText?mxUtils.getTextContent(x):x.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=x.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,d)}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,d);try{mxEvent.consume(d)}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(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(v){null!=f&&(f.parentNode.removeChild(f),f=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[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(d[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 x=this.extractGraphModelFromEvent(v);if(null==x){var B=null!=v.dataTransfer?v.dataTransfer:
+v.clipboardData;null!=B&&(10==document.documentMode||11==document.documentMode?x=B.getData("Text"):(x=null,x=0<=mxUtils.indexOf(B.types,"text/uri-list")?v.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(B.types,"text/html")?B.getData("text/html"):null,null!=x&&0<x.length?(B=document.createElement("div"),B.innerHTML=this.editor.graph.sanitizeHtml(x),B=B.getElementsByTagName("img"),0<B.length&&(x=B[0].getAttribute("src"))):0<=mxUtils.indexOf(B.types,"text/plain")&&(x=B.getData("text/plain"))),
+null!=x&&(Editor.isPngDataUrl(x)?(x=Editor.extractGraphModelFromPng(x),null!=x&&0<x.length&&this.openLocalFile(x,null,!0)):this.isRemoteFileFormat(x)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(x))).send(mxUtils.bind(this,function(I){200<=I.getStatus()&&299>=I.getStatus()?this.openLocalFile(I.getText(),null,!0):this.showError(mxResources.get("error"),413==I.getStatus()?mxResources.get("diagramTooLarge"):
+mxResources.get("unknownError"))})):/^https?:\/\//.test(x)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(x):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(x)))))}else this.openLocalFile(x,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var v=document.body;var x=document.documentElement;var B=(v.clientWidth||
+x.clientWidth)-3;v=Math.max(v.clientHeight||0,x.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,B=d.clientWidth,v=d.clientHeight;x=document.createElement("div");x.style.zIndex=mxPopupMenu.prototype.zIndex+2;x.style.border="3px dotted rgb(254, 137, 12)";x.style.pointerEvents="none";x.style.position="absolute";x.style.top=f+"px";x.style.left=g+"px";x.style.width=Math.max(0,B-3)+"px";x.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(x):
+document.body.appendChild(x);return x};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];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++)d.push(v.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,v,x){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 B=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();B(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,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?B(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,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"==d.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,d,g.name))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(D){this.spinner.stop();B(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,v)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var I=Editor.extractGraphModelFromPdf(d);null!=I&&(x=null,v=!0,d=I)}this.spinner.stop();this.openLocalFile(d,f,v,x,null!=x?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(v){var x=new FileReader;x.onload=mxUtils.bind(this,function(B){try{this.openFileHandle(B.target.result,v.name,v,f)}catch(I){this.handleError(I)}});x.onerror=mxUtils.bind(this,function(B){this.spinner.stop();
+this.handleError(B);window.openFile=null});"image"!==v.type.substring(0,5)&&"application/pdf"!==v.type||"image/svg"===v.type.substring(0,9)?x.readAsText(v):x.readAsDataURL(v)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,v,x){var B=this.getCurrentFile(),I=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var D=mxUtils.parseXml(d);null!=D&&(this.editor.setGraphXml(D.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,v,x))});if(null!=d&&0<d.length)null==B||!B.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)?I():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=v)&&null!=B&&B.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(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+B&&B.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 d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,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 v=this.editor.graph,x=v.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(x[mxConstants.STYLE_SHAPE]));v.model.isEdge(d)&&(g(mxMarker.getPackageForType(x[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(x[mxConstants.STYLE_ENDARROW])));x=v.model.getChildCount(d);for(var B=0;B<x;B++)this.addBasenamesForCell(v.model.getChildAt(d,B),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(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 d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,v,x){d||(d=!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(x)try{var B=this.editor.graph;B.setGridEnabled(!1);B.pageVisible=!1;var I=B.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(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+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(d){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(x){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(x)}),"*")}),null,null,!0,v,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(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(d){var f=null,g=!1,v=!1,x=null,B=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,B);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 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}),"*"):(d(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),"*")}),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;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="";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();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",
+"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{d(oa,Aa,null,ja)}catch(ya){this.handleError(ya)}g=
+!1;null!=urlParams.modified&&this.editor.setStatus("");x=ua();v&&null==f&&(f=mxUtils.bind(this,function(ya,La){ya=ua();ya==x||g||(La=this.createLoadMessage("autosave"),La.xml=ya,(window.opener||window.parent).postMessage(JSON.stringify(La),"*"));x=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,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,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,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,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");
+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):this.handleError({message:413==oa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):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;B="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";I.postMessage(B,"*");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(d,f,g,v){var x="simple"==Editor.currentTheme||"min"==Editor.currentTheme,B=document.createElement(x?"a":"button");B.setAttribute("title",d+(null!=g?" ("+g+")":""));B.style.marginLeft="6px";mxUtils.write(B,d);x?(B.className="geMenuItem"+(v?" gePrimaryBtn":""),B.style.marginLeft="8px",B.style.padding="6px"):B.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(B,"click",f);return B};EditorUi.prototype.addEmbedButtons=function(){if("1"!=urlParams.embedInline){var d=document.createElement("div");
+d.style.display="inline-block";document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,null,!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),this.actions.get("save").funct,Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),
+this.actions.get("saveAndExit").funct)));"1"!=urlParams.noExitBtn&&d.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&&(d.style.position="relative","simple"!=Editor.currentTheme&&(d.style.marginRight="4px","1"!=urlParams.sketch?(d.style.marginTop="6px",this.buttonContainer.style.top="6px"):this.buttonContainer.style.top=
+"0px"),this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged"))):null!=this.menubar&&(d.style.position="absolute",d.style.padding="2px",d.style.right="62px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d))}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),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(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"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(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
+v=[],x=[],B=[],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);){d=g[Oa].replace(/\r$/,"");for(Oa++;Oa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Oa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Oa].substring(1)),Oa++;if("#"!=d.charAt(1)){var Na=d.indexOf(":");if(0<Na){var Ia=mxUtils.trim(d.substring(1,Na)),wa=mxUtils.trim(d.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=d=null;Ia=[];for(wa=0;wa<ab.length;wa++)V==ab[wa]&&(d=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 y=this.editor.csvToArray(g[wa].replace(/\r$/,""));if(null==y){var O=40<g[wa].length?g[wa].substring(0,40)+"...":g[wa];throw Error(O+" ("+wa+"):\n"+mxResources.get("containsValidationErrors"));}0<y.length&&V.push(y)}N.model.beginUpdate();try{for(wa=0;wa<V.length;wa++){y=V[wa];var P=null,X=null!=d?Y+y[d]: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<y.length;W++)N.setAttributeForCell(ba,Ia[W],y[W]),null==P||g||N.setAttributeForCell(P,Ia[W],y[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(B,P)&&B.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+y[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),x.push(R)):B.push(N.addCell(P)))}for(wa=0;wa<x.length;wa++)va="@"==Z.charAt(0)?x[wa].getAttribute(Z.substring(1)):null,Ea="@"==la.charAt(0)?x[wa].getAttribute(la.substring(1)):null,"auto"!=Z&&"auto"!=va||"auto"!=la&&"auto"!=Ea||N.updateGroupBounds([x[wa]],fa,!0);var Ca=B.slice(),
+Ma=B.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];B.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<B.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<B.length;Xa++){var Za=N.getCellGeometry(B[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(B,Xa)};this.executeLayout(function(){$a.execute(N.getDefaultParent());
+Ka()},!0,na);na=null}else if("horizontaltree"==oa||"verticaltree"==oa||"auto"==oa&&Ma.length==2*B.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(B,Xa)};this.executeLayout(function(){rb.execute(N.getDefaultParent());Ka()},!0,na);na=
+null}else if("organic"==oa||"auto"==oa&&Ma.length>B.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(B,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(d){var f=
+"";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(f+=g+v+"="+urlParams[v],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=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)&&(d=0==f?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,v,x){d=new LinkDialog(this,d,f,g,!0,v,x);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){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++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"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==d||d.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));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.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()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&
+this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var H=EditorUi.prototype.createSidebar;EditorUi.prototype.createSidebar=
+function(d){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 d=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(d.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&&!d.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")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=
+d&&null!=d.shape&&null!=d.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(d,f,g,v,x,B,I,D){var N=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");
+else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(N.getSvg(v,x,B)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),ia=N.getGraphBounds(),ka=Math.floor(ia.width*x/N.view.scale),ja=Math.floor(ia.height*x/N.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ka*ja<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var ca={globalVars:N.getExportVariables()};D&&(ca.grid={size:N.gridSize,steps:N.view.gridSteps,color:N.view.gridColor});d.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="+B+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(x,null==v||"none"==v,!0,!1,!1,B,!0,!1,null,D,I):d.exportImage(x,!1,!0,!1,!1,B,!0,!1,"jpeg",D);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=
+function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var v=d;this.currentPage!=this.pages[g]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),v.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+v.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");
+g.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(v);var x=document.createElement("div");x.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";x.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var B={};try{var I=mxSettings.getCustomLibraries();for(d=0;d<I.length;d++){var D=I[d];if("R"==
+D.substring(0,1)){var N=JSON.parse(decodeURIComponent(D.substring(1)));B[N[0]]={id:N[0],title:N[1],downloadUrl:N[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){x.innerText="";if(0==G.length)x.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];B[ka.id]&&(f[ka.id]=ka);var ja=this.addCheckbox(x,ka.title,B[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){x.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"));x.appendChild(ia)}));g.appendChild(x);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==B[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 B)f[ia]||this.closeLibrary(new RemoteLibrary(this,null,B[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(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,
+d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,v,x){var B=!0,I=window.setTimeout(mxUtils.bind(this,function(){B=!1;x({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),D=mxUtils.bind(this,function(){window.clearTimeout(I);B&&v.apply(this,arguments)}),N=mxUtils.bind(this,function(){window.clearTimeout(I);B&&x.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:D,
+error:N});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,ia){var ka={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=ia?ka.error={errResp:ia}:null!=G&&(ka.resp=G);this.remoteWin.postMessage(JSON.stringify(ka),"*")});try{var v=d.funtionName,x=this.remoteInvokableFns[v];if(null!=x&&
+"function"===typeof this[v]){if(x.allowedDomains){for(var B=!1,I=0;I<x.allowedDomains.length;I++)if(f=="https://"+x.allowedDomains[I]){B=!0;break}if(!B){g(null,"Invalid Call: "+v+" is not allowed.");return}}var D=d.functionArgs;Array.isArray(D)||(D=[]);if(x.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(d,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(x){try{var B=v.result;1>x.oldVersion&&B.createObjectStore("objects",{keyPath:"key"});2>x.oldVersion&&(B.createObjectStore("files",{keyPath:"title"}),B.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(I){null!=
+f&&f(I)}};v.onsuccess=mxUtils.bind(this,function(x){var B=v.result;this.database=B;EditorUi.migrateStorageFiles&&(StorageFile.migrate(B),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)}})));d(B);B.onversionchange=function(){B.close()}});v.onerror=f;v.onblocked=function(){}}catch(x){null!=f&&f(x)}else null!=f&&f()}else d(this.database)};
+EditorUi.prototype.setDatabaseItem=function(d,f,g,v,x){this.openDatabase(mxUtils.bind(this,function(B){try{x=x||"objects";Array.isArray(x)||(x=[x],d=[d],f=[f]);var I=B.transaction(x,"readwrite");I.oncomplete=g;I.onerror=v;for(B=0;B<x.length;B++)I.objectStore(x[B]).put(null!=d&&null!=d[B]?{key:d[B],data:f[B]}:f[B])}catch(D){null!=v&&v(D)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);x=x.transaction(v,
+"readwrite");x.oncomplete=f;x.onerror=g;for(var B=0;B<v.length;B++)x.objectStore(v[B]).delete(d[B])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,v){this.openDatabase(mxUtils.bind(this,function(x){try{v=v||"objects";var B=x.transaction([v],"readonly").objectStore(v).get(d);B.onsuccess=function(){f(B.result)};B.onerror=g}catch(I){null!=g&&g(I)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],
+"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),B=[];x.onsuccess=function(I){null==I.target.result?d(B):(B.push(I.target.result.value),I.target.result.continue())};x.onerror=f}catch(I){null!=f&&f(I)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(v){try{g=g||"objects";var x=v.transaction([g],"readonly").objectStore(g).getAllKeys();x.onsuccess=function(){d(x.result)};x.onerror=f}catch(B){null!=f&&f(B)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var v=this.getCurrentFile();
+null!=v?v.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
+return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,v,x,B,I,D){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,v,x,B,I,D)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,v,x,B,I,D,N,G,ia,ka,ja,ca,pa,ra){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,v,x,B,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(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,v)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
+function(d,f,g,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,v,x)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var d=[],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 x="<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(x||v)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,l,C,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=
+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 d(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";
+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=d(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 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);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(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!=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&&
+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,d(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,x=document.createElement("div");x.className="geCommentsWin";x.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var B=EditorUi.compactUi?"26px":"30px",I=document.createElement("div");I.className="geCommentsList";I.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";I.style.bottom=parseInt(B)+7+"px";x.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=B;N.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";B=document.createElement("a");
+B.className="geButton";if(!f){var G=B.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=d(ra,ka,null,0);
+pa();ca.preventDefault();mxEvent.consume(ca)});N.appendChild(G)}G=B.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=B.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()&&(B=B.cloneNode(),B.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',B.setAttribute("title",mxResources.get("save")),B.className="geAdaptiveAsset",mxEvent.addListener(B,"click",function(ca){p();ca.preventDefault();
+mxEvent.consume(ca)}),N.appendChild(B));x.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),d(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(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))}
-SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var d=this.ui.editor,k=d.graph,l=Graph.compressNode(d.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
-k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);d.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());d.graph.fireEvent(new mxEventObject(mxEvent.ROOT));d.fireEvent(new mxEventObject("pageSelected","change",this))}};
-function ChangePage(b,d,k,l,B){SelectPage.call(this,b,k);this.relatedPage=d;this.index=l;this.previousIndex=null;this.noSelect=B}mxUtils.extend(ChangePage,SelectPage);
+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"),x,e,k,l,C,!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,e,k,l,C,p,E,M,S,H,K){var Q=document.createElement("div");Q.style.textAlign="center";K=null!=K?K:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=K+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);Q.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),Q.appendChild(d));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(C||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",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(f),C=document.createElement("span"),mxUtils.write(C," "+mxResources.get("rememberThisSetting")),
+d.appendChild(C),Q.appendChild(d),mxEvent.addListener(C,"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,e){this.node=b;null!=e?this.node.setAttribute("id",e):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,e,k){this.ui=b;this.page=e;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,e,k){this.ui=b;this.oldIndex=e;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,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
+SelectPage.prototype.execute=function(){var b=mxUtils.indexOf(this.ui.pages,this.previousPage);if(null!=this.page&&0<=b){b=this.ui.currentPage;var e=this.ui.editor,k=e.graph,l=Graph.compressNode(e.getGraphXml(!0));mxUtils.setTextContent(b.node,l);b.viewState=k.getViewState();b.root=k.model.root;null!=b.model&&b.model.rootChanged(b.root);k.view.clear(b.root,!0);k.clearSelection();this.ui.currentPage=this.previousPage;this.previousPage=b;b=this.ui.currentPage;k.model.prefix=Editor.guid()+"-";k.model.rootChanged(b.root);
+k.setViewState(b.viewState);k.gridEnabled=k.gridEnabled&&(!this.ui.editor.isChromelessView()||"1"==urlParams.grid);e.updateGraphComponents();k.view.validate();k.blockMathRender=!0;k.sizeDidChange();k.blockMathRender=!1;this.neverShown&&(this.neverShown=!1,k.selectUnlockedLayer());e.graph.fireEvent(new mxEventObject(mxEvent.ROOT));e.fireEvent(new mxEventObject("pageSelected","change",this))}};
+function ChangePage(b,e,k,l,C){SelectPage.call(this,b,k);this.relatedPage=e;this.index=l;this.previousIndex=null;this.noSelect=C}mxUtils.extend(ChangePage,SelectPage);
ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var b=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(b,1);this.index=b}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;this.noSelect||SelectPage.prototype.execute.apply(this,arguments)};EditorUi.prototype.tabContainerHeight=38;EditorUi.prototype.getSelectedPageIndex=function(){return this.getPageIndex(this.currentPage)};
-EditorUi.prototype.getPageIndex=function(b){var d=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){d=k;break}return d};EditorUi.prototype.getPageById=function(b,d){d=null!=d?d:this.pages;if(null!=d)for(var k=0;k<d.length;k++)if(d[k].getId()==b)return d[k];return null};
-EditorUi.prototype.createImageForPageLink=function(b,d,k){var l=b.indexOf(","),B=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=d&&(B=this.getImageForPage(l,d,k),B.originalSrc=b));null==B&&(B={originalSrc:b});return B};
-EditorUi.prototype.getImageForPage=function(b,d,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,B=this.createTemporaryGraph(k.getStylesheet());B.defaultPageBackgroundColor=k.defaultPageBackgroundColor;B.shapeBackgroundColor=k.shapeBackgroundColor;B.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=d?d:this.currentPage);B.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=d?d.getName():l.apply(this,arguments)};document.body.appendChild(B.container);
-this.updatePageRoot(b);B.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=B.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=B.getGraphBounds();document.body.removeChild(B.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
-EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,d=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var B=
-this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";B!=this.tabContainer.style.height&&this.refresh(!1)}d.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var B=this.currentPage;null!=B&&B!=k&&(null==B.viewState||null==B.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
-(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+B.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+B.viewState.scrollTop),k=B);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,
-p){B=p.getProperty("edit").changes;for(p=0;p<B.length;p++)if(B[p]instanceof SelectPage||B[p]instanceof RenamePage||B[p]instanceof MovePage||B[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
-EditorUi.prototype.restoreViewState=function(b,d,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,d):(l.setViewState(d),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+d.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+d.scrollTop,l.restoreSelection(k))};
-Graph.prototype.createViewState=function(b){var d=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),B=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=d?"0"!=d:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(B)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
-mxSettings.getPageFormat():new mxRectangle(0,0,l,B),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
-Graph.prototype.saveViewState=function(b,d,k,l){k||(d.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),d.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),d.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),d.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),d.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),d.setAttribute("connect",null==b||b.connect?"1":"0"),d.setAttribute("arrows",null==b||b.arrows?"1":"0"),d.setAttribute("fold",
-null==b||b.foldingEnabled?"1":"0"));d.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(d.setAttribute("pageWidth",k.width),d.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&d.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&d.setAttribute("backgroundImage",
-JSON.stringify(l)));d.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");d.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&d.setAttribute("extFonts",b.extFonts.map(function(B){return B.name+"^"+B.url}).join("|"))};
+EditorUi.prototype.getPageIndex=function(b){var e=null;if(null!=this.pages&&null!=b)for(var k=0;k<this.pages.length;k++)if(this.pages[k]==b){e=k;break}return e};EditorUi.prototype.getPageById=function(b,e){e=null!=e?e:this.pages;if(null!=e)for(var k=0;k<e.length;k++)if(e[k].getId()==b)return e[k];return null};
+EditorUi.prototype.createImageForPageLink=function(b,e,k){var l=b.indexOf(","),C=null;0<l&&(l=this.getPageById(b.substring(l+1)),null!=l&&l!=e&&(C=this.getImageForPage(l,e,k),C.originalSrc=b));null==C&&(C={originalSrc:b});return C};
+EditorUi.prototype.getImageForPage=function(b,e,k){k=null!=k?k:this.editor.graph;var l=k.getGlobalVariable,C=this.createTemporaryGraph(k.getStylesheet());C.defaultPageBackgroundColor=k.defaultPageBackgroundColor;C.shapeBackgroundColor=k.shapeBackgroundColor;C.shapeForegroundColor=k.shapeForegroundColor;var p=this.getPageIndex(null!=e?e:this.currentPage);C.getGlobalVariable=function(M){return"pagenumber"==M?p+1:"page"==M&&null!=e?e.getName():l.apply(this,arguments)};document.body.appendChild(C.container);
+this.updatePageRoot(b);C.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";k=C.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=C.getGraphBounds();document.body.removeChild(C.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(k)),E.width,E.height,E.x,E.y)};
+EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var C=
+this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";C!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});var k=null,l=mxUtils.bind(this,function(){this.updateTabContainer();var C=this.currentPage;null!=C&&C!=k&&(null==C.viewState||null==C.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
+(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+C.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+C.viewState.scrollTop),k=C);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"===typeof Editor.MathJaxClear||this.editor.graph.mathEnabled&&null!=this.editor||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,
+p){C=p.getProperty("edit").changes;for(p=0;p<C.length;p++)if(C[p]instanceof SelectPage||C[p]instanceof RenamePage||C[p]instanceof MovePage||C[p]instanceof mxRootChange){l();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
+EditorUi.prototype.restoreViewState=function(b,e,k){b=null!=b?this.getPageById(b.getId()):null;var l=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(l.setViewState(e),this.editor.updateGraphComponents(),l.view.revalidate(),l.sizeDidChange()),l.container.scrollLeft=l.view.translate.x*l.view.scale+e.scrollLeft,l.container.scrollTop=l.view.translate.y*l.view.scale+e.scrollTop,l.restoreSelection(k))};
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),k=parseFloat(b.getAttribute("pageScale")),l=parseFloat(b.getAttribute("pageWidth")),C=parseFloat(b.getAttribute("pageHeight")),p=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),M=b.getAttribute("extFonts");if(M)try{M=M.split("|").map(function(S){S=S.split("^");return{name:S[0],url:S[1]}})}catch(S){console.log("ExtFonts format error: "+S.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=p&&0<p.length?p:null,backgroundImage:E,pageScale:isNaN(k)?mxGraph.prototype.pageScale:k,pageFormat:isNaN(l)||isNaN(C)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+mxSettings.getPageFormat():new mxRectangle(0,0,l,C),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:M||[]}};
+Graph.prototype.saveViewState=function(b,e,k,l){k||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
+null==b||b.foldingEnabled?"1":"0"));e.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);k=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=k&&(e.setAttribute("pageWidth",k.width),e.setAttribute("pageHeight",k.height));null!=b&&(null!=b.background&&e.setAttribute("background",b.background),l=this.getBackgroundImageObject(b.backgroundImage,l),null!=l&&e.setAttribute("backgroundImage",
+JSON.stringify(l)));e.setAttribute("math",(null==b?this.defaultMathEnabled:b.mathEnabled)?"1":"0");e.setAttribute("shadow",null!=b&&b.shadowVisible?"1":"0");null!=b&&null!=b.extFonts&&0<b.extFonts.length&&e.setAttribute("extFonts",b.extFonts.map(function(C){return C.name+"^"+C.url}).join("|"))};
Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled,hiddenTags:this.hiddenTags,extFonts:this.extFonts}};
-Graph.prototype.setViewState=function(b,d){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
-this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(d&&null!=k)for(d=0;d<k.length;d++){var l=document.getElementById("extFont_"+k[d].name);null!=l&&l.parentNode.removeChild(l)}for(d=0;d<this.extFonts.length;d++)this.addExtFont(this.extFonts[d].name,this.extFonts[d].url,
+Graph.prototype.setViewState=function(b,e){if(null!=b){this.lastPasteXml=b.lastPasteXml;this.pasteCounter=b.pasteCounter||0;this.mathEnabled=b.mathEnabled;this.gridEnabled=b.gridEnabled;this.gridSize=b.gridSize;this.graphHandler.guidesEnabled=b.guidesEnabled;this.foldingEnabled=b.foldingEnabled;this.setShadowVisible(b.shadowVisible,!1);this.scrollbars=b.scrollbars;this.pageVisible=!this.isViewer()&&b.pageVisible;this.background=b.background;this.pageScale=b.pageScale;this.pageFormat=b.pageFormat;
+this.view.currentRoot=b.currentRoot;this.defaultParent=b.defaultParent;this.connectionArrowsEnabled=b.arrows;this.setTooltips(b.tooltips);this.setConnectable(b.connect);this.setBackgroundImage(b.backgroundImage);this.hiddenTags=b.hiddenTags;var k=this.extFonts;this.extFonts=b.extFonts||[];if(e&&null!=k)for(e=0;e<k.length;e++){var l=document.getElementById("extFont_"+k[e].name);null!=l&&l.parentNode.removeChild(l)}for(e=0;e<this.extFonts.length;e++)this.addExtFont(this.extFonts[e].name,this.extFonts[e].url,
!0);this.view.scale=null!=b.scale?b.scale:1;null==this.view.currentRoot||this.model.contains(this.view.currentRoot)||(this.view.currentRoot=null);null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer());null!=b.translate&&(this.view.translate=b.translate)}else this.view.currentRoot=null,this.view.scale=1,this.gridEnabled=this.defaultGridEnabled,this.gridSize=mxGraph.prototype.gridSize,this.pageScale=mxGraph.prototype.pageScale,this.pageFormat=
"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat(),this.pageVisible=this.defaultPageVisible,this.backgroundImage=this.background=null,this.scrollbars=this.defaultScrollbars,this.foldingEnabled=this.graphHandler.guidesEnabled=!0,this.setShadowVisible(!1,!1),this.defaultParent=null,this.setTooltips(!0),this.setConnectable(!0),this.lastPasteXml=null,this.pasteCounter=0,this.mathEnabled=this.defaultMathEnabled,this.connectionArrowsEnabled=
!0,this.hiddenTags=[],this.extFonts=[];this.preferPageSize=this.pageBreaksVisible=this.pageVisible;this.fireEvent(new mxEventObject("viewStateChanged","state",b))};
-Graph.prototype.addExtFont=function(b,d,k){if(b&&d){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:d});var l="extFont_"+b;if(null==document.getElementById(l))if(0==d.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",d,null,l);else{document.getElementsByTagName("head");var B=document.createElement("style");B.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+d+'");\n}'));B.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(B)}if(!k){null==
-this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(B=0;B<k.length;B++)if(k[B].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:d})}}};
-EditorUi.prototype.updatePageRoot=function(b,d){if(null==b.root){d=this.editor.extractGraphModel(b.node,null,d);var k=Editor.extractParserError(d);if(k)throw Error(k);null!=d?(b.graphModelNode=d,b.viewState=this.editor.graph.createViewState(d),k=new mxCodec(d.ownerDocument),b.root=k.decode(d).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){d=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(d))throw Error(k);null!=d&&(b.graphModelNode=
-d)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
-EditorUi.prototype.selectPage=function(b,d,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d=null!=d?d:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var B=new SelectPage(this,b,k);B.execute();l.add(B);l.notify();this.editor.graph.tooltipHandler.hide();d||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
-EditorUi.prototype.selectNextPage=function(b){var d=this.currentPage;null!=d&&null!=this.pages&&(d=mxUtils.indexOf(this.pages,d),b?this.selectPage(this.pages[mxUtils.mod(d+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(d-1,this.pages.length)]))};
-EditorUi.prototype.insertPage=function(b,d){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),d=null!=d?d:this.pages.length,d=new ChangePage(this,b,b,d),this.editor.graph.model.execute(d));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
-EditorUi.prototype.createPage=function(b,d){d=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),d);d.setName(null!=b?b:this.createPageName());this.initDiagramNode(d);return d};EditorUi.prototype.createPageName=function(){for(var b={},d=0;d<this.pages.length;d++){var k=this.pages[d].getName();null!=k&&0<k.length&&(b[k]=k)}d=this.pages.length;do k=mxResources.get("pageWithNumber",[++d]);while(null!=b[k]);return k};
-EditorUi.prototype.removePage=function(b){try{var d=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(d.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);d.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),d.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));d.model.execute(new ChangePage(this,b,l))}finally{d.model.endUpdate()}}}catch(B){this.handleError(B)}return b};
-EditorUi.prototype.duplicatePage=function(b,d){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var B=b.node.cloneNode(!1);B.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(B);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
-k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(d);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,d);mxUtils.setTextContent(b.node,Graph.compressNode(d))};
-EditorUi.prototype.clonePages=function(b){for(var d=[],k=0;k<b.length;k++)d.push(this.clonePage(b[k]));return d};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var d=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;d.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);d.root=this.editor.graph.model.cloneCell(b.root,null,!0);return d};
-EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var d=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(d.container,300,80,!0,!0);d.init()}return b};EditorUi.prototype.movePage=function(b,d){this.editor.graph.model.execute(new MovePage(this,b,d))};
+Graph.prototype.addExtFont=function(b,e,k){if(b&&e){"1"!=urlParams["ext-fonts"]&&(Graph.recentCustomFonts[b.toLowerCase()]={name:b,url:e});var l="extFont_"+b;if(null==document.getElementById(l))if(0==e.indexOf(Editor.GOOGLE_FONTS))mxClient.link("stylesheet",e,null,l);else{document.getElementsByTagName("head");var C=document.createElement("style");C.appendChild(document.createTextNode('@font-face {\n\tfont-family: "'+b+'";\n\tsrc: url("'+e+'");\n}'));C.setAttribute("id",l);document.getElementsByTagName("head")[0].appendChild(C)}if(!k){null==
+this.extFonts&&(this.extFonts=[]);k=this.extFonts;l=!0;for(C=0;C<k.length;C++)if(k[C].name==b){l=!1;break}l&&this.extFonts.push({name:b,url:e})}}};
+EditorUi.prototype.updatePageRoot=function(b,e){if(null==b.root){e=this.editor.extractGraphModel(b.node,null,e);var k=Editor.extractParserError(e);if(k)throw Error(k);null!=e?(b.graphModelNode=e,b.viewState=this.editor.graph.createViewState(e),k=new mxCodec(e.ownerDocument),b.root=k.decode(e).root):b.root=this.editor.graph.model.createRoot()}else if(null==b.viewState){if(null==b.graphModelNode){e=this.editor.extractGraphModel(b.node);if(k=Editor.extractParserError(e))throw Error(k);null!=e&&(b.graphModelNode=
+e)}null!=b.graphModelNode&&(b.viewState=this.editor.graph.createViewState(b.graphModelNode))}return b};
+EditorUi.prototype.selectPage=function(b,e,k){try{if(b!=this.currentPage){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e=null!=e?e:!1;this.editor.graph.isMouseDown=!1;this.editor.graph.reset();var l=this.editor.graph.model.createUndoableEdit();l.ignoreEdit=!0;var C=new SelectPage(this,b,k);C.execute();l.add(C);l.notify();this.editor.graph.tooltipHandler.hide();e||this.editor.graph.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",l))}}catch(p){this.handleError(p)}};
+EditorUi.prototype.selectNextPage=function(b){var e=this.currentPage;null!=e&&null!=this.pages&&(e=mxUtils.indexOf(this.pages,e),b?this.selectPage(this.pages[mxUtils.mod(e+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(e-1,this.pages.length)]))};
+EditorUi.prototype.insertPage=function(b,e){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),e=null!=e?e:this.pages.length,e=new ChangePage(this,b,b,e),this.editor.graph.model.execute(e));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
+EditorUi.prototype.createPage=function(b,e){e=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var k=this.pages[e].getName();null!=k&&0<k.length&&(b[k]=k)}e=this.pages.length;do k=mxResources.get("pageWithNumber",[++e]);while(null!=b[k]);return k};
+EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,k=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=k){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var l=this.currentPage;l==b&&1<this.pages.length?(k==this.pages.length-1?k--:k++,l=this.pages[k]):1>=this.pages.length&&(l=this.insertPage(),e.model.execute(new RenamePage(this,l,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,l))}finally{e.model.endUpdate()}}}catch(C){this.handleError(C)}return b};
+EditorUi.prototype.duplicatePage=function(b,e){var k=null;try{var l=this.editor.graph;if(l.isEnabled()){l.isEditing()&&l.stopEditing();var C=b.node.cloneNode(!1);C.removeAttribute("id");var p={},E=l.createCellLookup([l.model.root]);k=new DiagramPage(C);k.root=l.cloneCell(l.model.root,null,p);var M=new mxGraphModel;M.prefix=Editor.guid()+"-";M.setRoot(k.root);l.updateCustomLinks(l.createCellMapping(p,E),[k.root]);k.viewState=b==this.currentPage?l.getViewState():b.viewState;this.initDiagramNode(k);
+k.viewState.scale=1;k.viewState.scrollLeft=null;k.viewState.scrollTop=null;k.viewState.currentRoot=null;k.viewState.defaultParent=null;k.setName(e);k=this.insertPage(k,mxUtils.indexOf(this.pages,b)+1)}}catch(S){this.handleError(S)}return k};EditorUi.prototype.initDiagramNode=function(b){var e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,e);mxUtils.setTextContent(b.node,Graph.compressNode(e))};
+EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push(this.clonePage(b[k]));return e};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),k=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(k,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);return e};
+EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
-EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,d=document.createElement("div");d.style.position="relative";d.style.display="inline-block";d.style.verticalAlign="top";d.style.height=this.tabContainer.style.height;d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.fontSize="13px";d.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),B=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),B=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){B=null;Q.stopPropagation();
-Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=B&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=B&&H!=B&&this.movePage(B,H);Q.stopPropagation();Q.preventDefault()}));d.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(d);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
-l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(d.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",d.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
-M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));d.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){d.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,
-d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){d.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<d.scrollLeft?100:50);mxUtils.setOpacity(M,d.scrollLeft<d.scrollWidth-d.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
-EditorUi.prototype.createTab=function(b){var d=document.createElement("div");d.style.display="inline-block";d.style.whiteSpace="nowrap";d.style.boxSizing="border-box";d.style.position="relative";d.style.overflow="hidden";d.style.textAlign="center";d.style.marginLeft="-1px";d.style.height=this.tabContainer.clientHeight+"px";d.style.padding="12px 4px 8px 4px";d.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";d.style.borderTopStyle="none";d.style.borderBottomStyle="none";d.style.backgroundColor=
-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 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};
-EditorUi.prototype.createTabForPage=function(b,d,k,l){k=this.createTab(k);var B=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",B+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,B);k.style.maxWidth=d+"px";k.style.width=d+"px";this.addTabListeners(b,k);42<d&&(k.style.textOverflow="ellipsis");return k};
-EditorUi.prototype.addTabListeners=function(b,d){mxEvent.disableContextMenu(d);var k=this.editor.graph;mxEvent.addListener(d,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,B=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(p){l=null!=this.currentMenu;B=b==this.currentPage;k.isMouseDown||B||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&B||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,d)}mxEvent.consume(p)}}))};
-EditorUi.prototype.getLinkForPage=function(b,d,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var B=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));B+=(0==B.length?"?":"&")+"page-id="+b.getId();null!=d&&(B+="&"+d.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
-EditorUi.drawHost:"https://"+window.location.host)+"/"+B+"#"+l.getHash()}}return null};
-EditorUi.prototype.createPageMenu=function(b,d){return mxUtils.bind(this,function(k,l){var B=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,d)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");B.isSelectionEmpty()||(M=B.getBoundingBox(B.getSelectionCells()),E=B.view.translate,H=B.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
+EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,l=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
+1),C=null,p=0;p<this.pages.length;p++)mxUtils.bind(this,function(H,K){this.pages[H]==this.currentPage?(K.className="geActivePage",K.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):K.className="geInactivePage";K.setAttribute("draggable","true");mxEvent.addListener(K,"dragstart",mxUtils.bind(this,function(Q){b.isEnabled()?(mxClient.IS_FF&&Q.dataTransfer.setData("Text","<diagram/>"),C=H):mxEvent.consume(Q)}));mxEvent.addListener(K,"dragend",mxUtils.bind(this,function(Q){C=null;Q.stopPropagation();
+Q.preventDefault()}));mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null!=C&&(Q.dataTransfer.dropEffect="move");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=C&&H!=C&&this.movePage(C,H);Q.stopPropagation();Q.preventDefault()}));e.appendChild(K)})(p,this.createTabForPage(this.pages[p],l,this.pages[p]!=this.currentPage,p+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);l=this.createPageMenuTab();this.tabContainer.appendChild(l);
+l=null;this.isPageInsertTabVisible()&&(l=this.createPageInsertTab(),this.tabContainer.appendChild(l));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=l&&(l.style.position="absolute",l.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var M=this.createControlTab(4,"&nbsp;&#10095;");M.style.position="absolute";
+M.style.right=this.editor.chromeless?"0px":"29px";M.style.fontSize="13pt";this.tabContainer.appendChild(M);var S=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=S+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){e.scrollLeft-=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,
+e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(M,"click",mxUtils.bind(this,function(H){e.scrollLeft+=Math.max(20,S-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(M,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(H)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.style.display="inline-block";e.style.whiteSpace="nowrap";e.style.boxSizing="border-box";e.style.position="relative";e.style.overflow="hidden";e.style.textAlign="center";e.style.marginLeft="-1px";e.style.height=this.tabContainer.clientHeight+"px";e.style.padding="12px 4px 8px 4px";e.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";e.style.borderTopStyle="none";e.style.borderBottomStyle="none";e.style.backgroundColor=
+this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
+EditorUi.prototype.createControlTab=function(b,e,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=e;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,e){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 C=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),x=this.pages[g].getId();v.setAttribute("title",this.pages[g].getName()+" ("+(g+1)+"/"+this.pages.length+")"+(null!=x?" ["+x+"]":""));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)});e||H();if(this.editor.graph.isEnabled()){e||(M.addSeparator(S),K());var Q=this.currentPage;if(null!=Q){M.addSeparator(S);var d=this.getShortPageName(Q);M.addItem(mxResources.get("removeIt",[d]),null,mxUtils.bind(this,function(){this.removePage(Q)}),S);M.addItem(mxResources.get("renameIt",[d]),null,mxUtils.bind(this,function(){this.renamePage(Q,Q.getName())}),S);e||M.addSeparator(S);M.addItem(mxResources.get("duplicateIt",
+[d]),null,mxUtils.bind(this,function(){this.duplicatePage(Q,mxResources.get("copyOf",[Q.getName()]))}),S)}}e&&(M.addSeparator(S),K(),M.addSeparator(S),H())}));C.div.className+=" geMenubarMenu";C.smartSeparators=!0;C.showDisabled=!0;C.autoExpand=!0;C.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(C,arguments);C.destroy()});var p=mxEvent.getClientX(l),E=mxEvent.getClientY(l);C.popup(p,E,null,l);this.setCurrentMenu(C);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 e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
+EditorUi.prototype.createTabForPage=function(b,e,k,l){k=this.createTab(k);var C=b.getName()||mxResources.get("untitled"),p=b.getId();k.setAttribute("title",C+(null!=p?" ("+p+")":"")+" ["+l+"]");mxUtils.write(k,C);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(p){this.renamePage(b);mxEvent.consume(p)}));var l=!1,C=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(p){l=null!=this.currentMenu;C=b==this.currentPage;k.isMouseDown||C||this.selectPage(b)}),null,mxUtils.bind(this,function(p){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(p)&&C||mxEvent.isPopupTrigger(p))){k.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(p)||!l){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var M=mxEvent.getClientX(p),S=mxEvent.getClientY(p);E.popup(M,S,null,p);this.setCurrentMenu(E,e)}mxEvent.consume(p)}}))};
+EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var l=this.getCurrentFile();if(null!=l&&l.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var C=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));C+=(0==C.length?"?":"&")+"page-id="+b.getId();null!=e&&(C+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
+EditorUi.drawHost:"https://"+window.location.host)+"/"+C+"#"+l.getHash()}}return null};
+EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,l){var C=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),l);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),l);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),l);null!=this.getLinkForPage(b)&&(k.addSeparator(l),k.addItem(mxResources.get("link"),
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(p,E,M,S,H,K){p=this.createUrlParameters(p,E,M,S,H,K);M||p.push("hide-pages=1");C.isSelectionEmpty()||(M=C.getBoundingBox(C.getSelectionCells()),E=C.view.translate,H=C.view.scale,M.width/=H,M.height/=H,M.x=M.x/H-E.x,M.y=M.y/H-E.y,p.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(M.x),y:Math.round(M.y),width:Math.round(M.width),height:Math.round(M.height),border:100}))));
S=new EmbedDialog(this,this.getLinkForPage(b,p,S));this.showDialog(S.container,450,240,!0,!0);S.init()}))})));k.addSeparator(l);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),l);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(l),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(d,k,l){l.ui=d.ui;return k};b.afterDecode=function(d,k,l){d=l.previous;l.previous=l.name;l.name=d;return l};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(d,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(B,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,B)?p:void 0})),null!=k.relatedPage.root&&d.encodeCell(k.relatedPage.root,
-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 v.isVertex(L)&&p(L)}function B(L){var V=
+!0,!0))}),l))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.oldIndex;l.oldIndex=l.newIndex;l.newIndex=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,l){l.ui=e.ui;return k};b.afterDecode=function(e,k,l){e=l.previous;l.previous=l.name;l.name=e;return l};mxCodecRegistry.register(b)})();
+(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,l){l.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(l.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&l.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(C,p){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,C)?p:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
+l));return l};b.beforeDecode=function(e,k,l){l.ui=e.ui;l.relatedPage=l.ui.getPageById(k.getAttribute("relatedPage"));if(null==l.relatedPage){var C=k.ownerDocument.createElement("diagram");C.setAttribute("id",k.getAttribute("relatedPage"));C.setAttribute("name",k.getAttribute("name"));l.relatedPage=new DiagramPage(C);C=k.getAttribute("viewState");null!=C&&(l.relatedPage.viewState=JSON.parse(C),k.removeAttribute("viewState"));k=k.cloneNode(!0);C=k.firstChild;if(null!=C)for(l.relatedPage.root=e.decodeCell(C,
+!1),l=C.nextSibling,C.parentNode.removeChild(C),C=l;null!=C;){l=C.nextSibling;if(C.nodeType==mxConstants.NODETYPE_ELEMENT){var p=C.getAttribute("id");null==e.lookup(p)&&e.decodeCell(C)}C.parentNode.removeChild(C);C=l}}return k};b.afterDecode=function(e,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,C,p,E,M){C=null!=C?C:!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,C){this.model.beginUpdate();try{var p=[];this.traverse(C,!0,mxUtils.bind(this,function(M,S){var H=null!=S&&this.isTreeEdge(S);H&&p.push(S);M==C||null!=S&&!H||p.push(M);return(null==S||H)&&(M==C||!this.model.isCollapsed(M))}));this.model.setCollapsed(C,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,C,p,E,M,S){return this.model.filterCells(this.getEdges(l,
+C,p,E,M,S),mxUtils.bind(this,function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(l,C){return this.getTreeEdges(l,C,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.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 C(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 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:
@@ -3966,78 +3973,78 @@ L.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?F=0:V==mxConstants.DIRECTION
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,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())&&
+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 d(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,v=g.getModel(),x=f.menus.createPopupMenu;f.menus.createPopupMenu=function(L,V,R){x.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];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);
+Z&&!la||null!=V&&mxEvent.isShiftDown(V)||R.push(Y);return null==Z||la})}g.setSelectionCells(R)}},null,null,"Alt+Shift+D");var B=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 B.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,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)||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))&&
+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?(d(g.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(L)):39==L.keyCode?(d(g.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(d(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];!C(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);(C(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 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"};');
+typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var l=k.apply(this,arguments),C=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",
new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');M.vertex=!0;var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");S.geometry.relative=!0;S.edge=!0;E.insertEdge(S,!0);M.insertEdge(S,!1);
var H=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);Q.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(e);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);var Q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');Q.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+d.geometry.relative=!0;d.edge=!0;E.insertEdge(d,!0);Q.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');f.vertex=!0;var g=new mxCell("",new mxGeometry(0,
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;E.insertEdge(g,!0);f.insertEdge(g,!1);p.insert(S);p.insert(K);p.insert(d);p.insert(g);p.insert(E);p.insert(M);p.insert(H);p.insert(Q);p.insert(f);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!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 mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!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 orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+p.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var M=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;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);var H=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');H.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');B.setAttributeForCell(p,"treeRoot",
+K.geometry.relative=!0;K.edge=!0;E.insertEdge(K,!0);H.insertEdge(K,!1);p.insert(S);p.insert(K);p.insert(E);p.insert(M);p.insert(H);return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');C.setAttributeForCell(p,"treeRoot",
"1");p.vertex=!0;return sb.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
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,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,
+EditorUi.initMinimalTheme=function(){function b(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.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 B="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;x="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,x.container.clientHeight-10);g.formatWindow=new WrapperWindow(g,mxResources.get("format"),v,B,240,x,
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=
+g.formatElt.style.right="0px"),x=g.diagramContainer.parentNode,null!=g.formatElt.parentNode?(g.formatElt.parentNode.removeChild(g.formatElt),x.style.right="0px"):(x.parentNode.appendChild(g.formatElt),x.style.right=g.formatElt.style.width)}function e(g,v){function x(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 B=document.createElement("div");B.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;";B.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";I.innerHTML="+";B.appendChild(I);mxUtils.write(B,mxResources.get("moreShapes"));v.appendChild(B);mxEvent.addListener(B,"click",function(){g.actions.get("shapes").funct()});
+var D=new Menubar(g,v);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?B.style.bottom="0":null!=g.actions.get("newLibrary")?(B=document.createElement("div"),B.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),B.appendChild(I),
+v.appendChild(B),mxEvent.addListener(B,"click",g.actions.get("newLibrary").funct),B=document.createElement("div"),B.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;",B.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),B.appendChild(I),v.appendChild(B),mxEvent.addListener(B,
+"click",g.actions.get("openLibrary").funct)):(B=x("newLibrary",mxResources.get("newLibrary")),B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="0",B=x("openLibraryFrom",mxResources.get("openLibraryFrom")),B.style.borderLeft="1px solid lightgray",B.style.boxSizing="border-box",B.style.paddingRight="6px",B.style.paddingLeft="6px",B.style.height="32px",B.style.left="50%");v.appendChild(g.sidebar.container);v.style.overflow="hidden"}
+function k(g,v){if(EditorUi.windowed){var x=g.editor.graph;x.popupMenuHandler.hideMenu();if(null==g.sidebarWindow){v=Math.min(x.container.clientWidth-10,218);var B="1"==urlParams.embedInline?650:Math.min(x.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,(x.container.clientHeight-B)/2):56,v-6,B-6,function(I){e(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(),e(g,g.sidebarElt),g.sidebarElt.style.border="none",g.sidebarElt.style.width="210px",
+g.sidebarElt.style.borderRight="1px solid gray"),x=g.diagramContainer.parentNode,null!=g.sidebarElt.parentNode?(g.sidebarElt.parentNode.removeChild(g.sidebarElt),x.style.left="0px"):(x.parentNode.appendChild(g.sidebarElt),x.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,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!=
+Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var C=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");C.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,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,x){var B=this.editorUi.editor.graph;g.smartSeparators=!0;M.apply(this,arguments);"1"==urlParams.sketch?B.isEnabled()&&(g.addSeparator(),1==B.getSelectionCount()&&this.addMenuItems(g,
+["-","lockUnlock"],null,x)):1==B.getSelectionCount()?(B.isCellFoldable(B.getSelectionCell())&&this.addMenuItems(g,B.isCellCollapsed(v)?["expand"]:["collapse"],null,x),this.addMenuItems(g,["collapsible","-","lockUnlock","enterGroup"],null,x),g.addSeparator(),this.addSubmenu("layout",g)):B.isSelectionEmpty()&&B.isEnabled()?(g.addSeparator(),this.addMenuItems(g,["editData"],null,x),g.addSeparator(),this.addSubmenu("layout",g),this.addSubmenu("insert",g),this.addMenuItems(g,["-","exitGroup"],null,x)):
+B.isEnabled()&&this.addMenuItems(g,["-","lockUnlock"],null,x)};var S=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(g,v,x){S.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(g,["copyAsImage"],null,x)};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,
+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 x=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(D,N){var G=this.editorUi.editor.graph,ia=G.getSelectionCell();x.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 B="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<B.length;G++)"-"==
+B[G]?D.addSeparator(N):I(D,N,mxResources.get(B[G])+"...",B[G])})))};EditorUi.prototype.installFormatToolbar=function(g){var v=this.editor.graph,x=document.createElement("div");x.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(B,I){0<v.getSelectionCount()?(g.appendChild(x),x.innerHTML=
+"Selected: "+v.getSelectionCount()):null!=x.parentNode&&x.parentNode.removeChild(x)}))};var d=!1;EditorUi.prototype.initFormatWindow=function(){if(!d&&null!=this.formatWindow){d=!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(x){mxEvent.getSource(x)==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;";
+W),W());return Ca}function x(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 B(){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);x([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);x([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&&(x([oa,Aa],60),520<=l&&x([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==y&&(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),y=ea),D.buttonContainer.style.paddingRight="34px"):(D.buttonContainer.style.paddingRight="0px",null!=y&&(y.parentNode.removeChild(y),y=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||
@@ -4075,89 +4082,89 @@ mxClient.IS_POINTER&&(R.style.touchAction="none");pa.appendChild(R);window.setTi
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=
+var y=null;B();mxEvent.addListener(window,"resize",function(){B();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,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;
+"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 e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,l,C,p,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=l;this.createdDate=C;this.isResolved=p;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,l,C){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,l,C){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=l;this.locale=C};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\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\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,e,k){this.init(b,e,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;
-GraphViewer.prototype.init=function(b,d,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
+GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
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 v=this.view.graphBounds,y=this.view.translate;E.setAttribute("viewBox",v.x+y.x-this.panDx+" "+(v.y+y.y-this.panDy)+
+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!=e&&(this.xmlDocument=e.ownerDocument,this.xmlNode=e,this.xml=mxUtils.getXml(e),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 v=this.view.graphBounds,x=this.view.translate;E.setAttribute("viewBox",v.x+x.x-this.panDx+" "+(v.y+x.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();
+this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(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 x=S[M.currentPage];return"page"==v?x.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 x=0<=v;x&&this.selectPage(v);return x};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 d=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(v){if(null!=v&&Graph.isPageLink(v.src)){var x=v.src,
+B=x.indexOf(",");0<B&&(B=M.getIndexById(x.substring(B+1)),0<=B&&(v=M.getImageForGraphModel(Editor.parseDiagramNode(M.diagrams[B])),v.originalSrc=x))}d.apply(this,arguments)};var f=this.graph.getGraphBounds;this.graph.getGraphBounds=function(v){var x=f.apply(this,arguments);v=this.backgroundImage;if(null!=v){var B=this.view.translate,I=this.view.scale;x=mxRectangle.fromRectangle(x);x.add(new mxRectangle((B.x+v.x)*I,(B.y+v.y)*I,v.width*I,v.height*I))}return x};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(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()}};
+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 x=v.indexOf(",");M.selectPageById(v.substring(x+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 C=this.getObservableParent(b),p=new k(mxUtils.bind(this,function(E){0<b.offsetWidth&&(p.disconnect(),l())}));p.observe(C,{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)};
-GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var d=0;d<this.diagrams.length;d++)if(this.diagrams[d].getAttribute("id")==b)return d;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
+GraphViewer.prototype.getImageForGraphModel=function(b){var e=Graph.createOffscreenGraph(this.graph.getStylesheet());e.getGlobalVariable=this.graph.getGlobalVariable;document.body.appendChild(e.container);b=(new mxCodec(b.ownerDocument)).decode(b).root;e.model.setRoot(b);b=e.getSvg();var k=e.getGraphBounds();document.body.removeChild(e.container);return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(b)),k.width,k.height,k.x,k.y)};
+GraphViewer.prototype.getIndexById=function(b){if(null!=this.diagrams)for(var e=0;e<this.diagrams.length;e++)if(this.diagrams[e].getAttribute("id")==b)return e;return-1};GraphViewer.prototype.setXmlNode=function(b){b=this.editor.extractGraphModel(b,!0);this.xmlDocument=b.ownerDocument;this.xml=mxUtils.getXml(b);this.xmlNode=b;this.updateGraphXml(b);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(b){null==this.xmlNode&&(this.xmlDocument=b.ownerDocument,this.xml=mxUtils.getXml(b),this.xmlNode=b);this.setGraphXml(b)};GraphViewer.prototype.updateGraphXml=function(b){this.setGraphXml(b);this.fireEvent(new mxEventObject("graphChanged"))};
-GraphViewer.prototype.setLayersVisible=function(b){var d=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var B=0;B<l.getChildCount(l.root);B++){var p=l.getChildAt(l.root,B);d=d&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[B]:!0)}}finally{l.endUpdate()}}return d?null:k};
-GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var d=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),d=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
-{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};d&&this.setLayersVisible(d)}};
-GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,d=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
+GraphViewer.prototype.setLayersVisible=function(b){var e=!0;if(!this.autoOrigin){var k=[],l=this.graph.getModel();l.beginUpdate();try{for(var C=0;C<l.getChildCount(l.root);C++){var p=l.getChildAt(l.root,C);e=e&&l.isVisible(p);k.push(l.isVisible(p));l.setVisible(p,null!=b?b[C]:!0)}}finally{l.endUpdate()}}return e?null:k};
+GraphViewer.prototype.setGraphXml=function(b){if(null!=this.graph){this.graph.view.translate=new mxPoint;this.graph.view.scale=1;var e=null;this.graph.getModel().beginUpdate();try{this.graph.getModel().clear(),this.editor.setGraphXml(b),e=this.setLayersVisible(!0)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph());this.graph.initialViewState=
+{translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};e&&this.setLayersVisible(e)}};
+GraphViewer.prototype.addSizeHandler=function(){var b=this.graph.container,e=this.graph.getGraphBounds(),k=!1;b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var l=mxUtils.bind(this,function(){if(!k){k=!0;var M=this.graph.getGraphBounds();b.style.overflow=1!=this.graphConfig["toolbar-nohide"]?M.width+2*this.graph.border>b.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){M=b.getBoundingClientRect();var S=mxUtils.getScrollOrigin(document.body);
S="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-S.x,top:-S.y};M={left:M.left-S.left,top:M.top-S.top,bottom:M.bottom-S.top,right:M.right-S.left};this.toolbar.style.left=M.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=M.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px",this.toolbar.style.top=M.top+1+"px"):this.toolbar.style.top=M.top+"px"}else null!=
-this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),B=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==B||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},B=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
-!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,d.width+2*this.graph.border),
-0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,d.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=B=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
-l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||d.width+2*this.graph.border>b.offsetWidth||d.height+2*this.graph.border>H)?(M=null,null!=H&&d.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/d.height),this.fitGraph(M)):this.widthIsEmpty||
-null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-d.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-d.y/this.graph.view.scale)+M.y),B=b.offsetWidth):this.graph.center((!this.widthIsEmpty||d.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){d=this.graph.getGraphBounds();B=null;E(M)}};
-GraphViewer.prototype.crop=function(){var b=this.graph,d=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=d.x?Math.floor(b.view.translate.x-d.x/l+k):k,null!=d.y?Math.floor(b.view.translate.y-d.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,d){b.style.width=d+"px"};GraphViewer.prototype.updateContainerHeight=function(b,d){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=d+"px"};
-GraphViewer.prototype.showLayers=function(b,d){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,B=null!=l&&0<l.length,p=!1;if(0<k.length||B||null!=d){d=null!=d?d.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==d){d=!1;p={};if(B)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(d=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(d=!0,p[S.id]=!0);for(M=0;d&&
-M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),d.isVisible(d.getChildAt(d.root,M)))}finally{b.endUpdate()}p=!0}return p};
-GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var d=b.ownerDocument.createElement("div");d.style.position="absolute";d.style.overflow="hidden";d.style.boxSizing="border-box";d.style.whiteSpace="nowrap";d.style.textAlign="left";d.style.zIndex=this.toolbarZIndex;d.style.backgroundColor="#eee";
-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,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!=
+this.toolbar&&(this.toolbar.style.width=Math.max(this.minToolbarWidth,b.offsetWidth)+"px");this.treeCellFolded&&(this.treeCellFolded=!1,this.positionGraph(this.graph.view.translate),this.graph.initialViewState.translate=this.graph.view.translate.clone());k=!1}}),C=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(M){var S=b.offsetWidth;S==C||this.handlingResize||(this.handlingResize=!0,"auto"==b.style.overflow&&(b.style.overflow="hidden"),this.graph.maxFitScale=null!=M?M:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,null,!0),(this.center||0==this.graphConfig.resize&&""!=b.style.height)&&this.graph.center(),this.graph.maxFitScale=null,0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1)),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},C=S,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=
+!1}),0))});GraphViewer.useResizeSensor&&(9>=document.documentMode?(mxEvent.addListener(window,"resize",l),this.graph.addListener("size",l)):new ResizeSensor(this.graph.container,l));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=b.style.height&&this.autoFit||this.updateContainerWidth(b,e.width+2*this.graph.border),
+0==this.graphConfig.resize&&""!=b.style.height||this.updateContainerHeight(b,Math.max(this.minHeight,e.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var p=C=null;l=mxUtils.bind(this,function(){window.clearTimeout(p);this.handlingResize||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(9>=document.documentMode?mxEvent.addListener(window,"resize",l):new ResizeSensor(this.graph.container,l))}else 9>=document.documentMode||this.graph.addListener("size",
+l);var E=mxUtils.bind(this,function(M){var S=b.style.minWidth;this.widthIsEmpty&&(b.style.minWidth="100%");var H=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=b.style.height&&this.autoFit?b.offsetHeight:void 0;0<b.offsetWidth&&null==M&&this.allowZoomOut&&(this.allowZoomIn||e.width+2*this.graph.border>b.offsetWidth||e.height+2*this.graph.border>H)?(M=null,null!=H&&e.height+2*this.graph.border>H-2&&(M=(H-2*this.graph.border-2)/e.height),this.fitGraph(M)):this.widthIsEmpty||
+null!=M||0!=this.graphConfig.resize||""==b.style.height?(M=null!=M?M:new mxPoint,this.graph.view.setTranslate(Math.floor(this.graph.border-e.x/this.graph.view.scale)+M.x,Math.floor(this.graph.border-e.y/this.graph.view.scale)+M.y),C=b.offsetWidth):this.graph.center((!this.widthIsEmpty||e.width<this.minWidth)&&1!=this.graphConfig.resize);b.style.minWidth=S});8==document.documentMode?window.setTimeout(E,0):E();this.positionGraph=function(M){e=this.graph.getGraphBounds();C=null;E(M)}};
+GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,l=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/l+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/l+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
+GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var l=this.graphConfig.layerIds,C=null!=l&&0<l.length,p=!1;if(0<k.length||C||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;p={};if(C)for(var M=0;M<l.length;M++){var S=b.getCell(l[M]);null!=S&&(e=!0,p[S.id]=!0)}else for(M=0;M<k.length;M++)S=b.getChildAt(b.root,parseInt(k[M])),null!=S&&(e=!0,p[S.id]=!0);for(M=0;e&&
+M<E;M++)S=b.getChildAt(b.root,M),b.setVisible(S,p[S.id]||!1)}else for(M=0;M<E;M++)b.setVisible(b.getChildAt(b.root,M),e.isVisible(e.getChildAt(e.root,M)))}finally{b.endUpdate()}p=!0}return p};
+GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";
+e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var k=null,l=null,C=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(e,0);k=null;l=window.setTimeout(mxUtils.bind(this,function(){e.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);e.style.display="";mxUtils.setOpacity(e,ja||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ja){mxEvent.isTouchEvent(ja)||(p(30),C())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ja){mxEvent.consume(ja)});mxEvent.addListener(e,"mouseenter",
+mxUtils.bind(this,function(ja){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ja){p(100);mxEvent.consume(ja)}));mxEvent.addListener(e,"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(e.style.opacity||0)?C():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);e.appendChild(ja);H++;return ja}),Q=null,d=null,f=null,g=null,v=0;v<S.length;v++){var x=S[v];
+if("pages"==x){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 B=K(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");B.style.borderRightStyle="none";B.style.paddingLeft="0px";B.style.paddingRight="0px";e.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";x=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";B.style.display=g.style.display;I.style.display=g.style.display});this.addListener("graphChanged",x);x()}else if("zoom"==x)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"==x){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(),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 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"}))};
-GraphViewer.prototype.addClickHandler=function(b,d){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var B=mxEvent.getSource(k);B!=b.container&&null!=B&&null==l;)"a"==B.nodeName.toLowerCase()&&(l=B.getAttribute("href")),B=B.parentNode;null!=d?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){d.destroy()},0):null!=l&&null==d&&b.isCustomLink(l)&&
-(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=d||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
-GraphViewer.prototype.showLightbox=function(b,d,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=d?d:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
+1<D.getChildCount(D.root)?"inline-block":"none"}}else if("tags"==x){if(this.tagsEnabled){var G=K(mxUtils.bind(this,function(ja){null==d&&(d=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),d.div.getElementsByTagName("div")[0].style.position="",d.div.style.maxHeight="160px",d.div.style.maxWidth="120px",d.div.style.padding="2px",d.div.style.overflow="auto",d.div.style.height="auto",d.div.style.position="fixed",d.div.style.fontFamily=Editor.defaultHtmlFont,d.div.style.fontSize="11px",
+d.div.style.backgroundColor="#eee",d.div.style.color="#000",d.div.style.border="1px solid #d0d0d0",d.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(d.div,80));if(null!=f)f.parentNode.removeChild(f),f=null;else{f=d.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);d.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"==x?this.lightboxEnabled&&K(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(x=this.graphConfig["toolbar-buttons"][x],null!=x&&(x.elem=K(null==
+x.enabled||x.enabled?x.handler:function(){},x.image,x.title,x.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),
+e.appendChild(S),this.filename=S);this.minToolbarWidth=34*H;var ia=b.style.border,ka=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.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};e.style.left=ja.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ja.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ja.top+1+"px"):e.style.top=ja.top+"px";"1px solid transparent"==ia&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var pa=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);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==e||ra==Q)return;ra=ra.parentNode}pa()});mxEvent.addListener(document.body,"mouseleave",function(ra){pa()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",ka):ka();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+e.parentNode&&ka()})).observe(b)};
+GraphViewer.prototype.createToolbarButton=function(b,e,k,l){var C=document.createElement("div");C.style.borderRight="1px solid #d0d0d0";C.style.padding="3px 6px 3px 6px";mxEvent.addListener(C,"click",b);null!=k&&C.setAttribute("title",k);C.style.display="inline-block";b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";null==l||l?(mxEvent.addListener(C,"mouseenter",function(){C.style.backgroundColor="#ddd"}),mxEvent.addListener(C,"mouseleave",
+function(){C.style.backgroundColor="#eee"}),mxUtils.setOpacity(b,60),C.style.cursor="pointer"):mxUtils.setOpacity(C,30);C.appendChild(b);return C};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,l){if(null==l)for(var C=mxEvent.getSource(k);C!=b.container&&null!=C&&null==l;)"a"==C.nodeName.toLowerCase()&&(l=C.getAttribute("href")),C=C.parentNode;null!=e?null==l||b.isCustomLink(l)?mxEvent.consume(k):b.isExternalProtocol(l)||b.isBlankLink(l)||window.setTimeout(function(){e.destroy()},0):null!=l&&null==e&&b.isCustomLink(l)&&
+(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(l)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
this.graphConfig.highlight&&(k.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(k.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(l){"ready"==l.data&&l.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):k.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(k.dev=
"1");this.lightboxWindow=window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(k)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
-GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("src",Editor.closeBlackImage);d.style.cssText="position:fixed;top:32px;right:32px;";d.style.cursor="pointer";
-mxEvent.addListener(d,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
+GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrigin(document);var b=document.createElement("div");b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeBlackImage);e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";
+mxEvent.addListener(e,"click",function(){l.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";this.tagsEnabled&&(urlParams.tags="{}");if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=
this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var l=new EditorUi(new Editor(!0),document.createElement("div"),!0);l.editor.editBlankUrl=this.editBlankUrl;l.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
-l.refresh=function(){};var B=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",B);document.body.removeChild(b);document.body.removeChild(d);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",B)):(b.style.display="none",d.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(e){return H.getImageUrl(e)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;d.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(d);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
+l.refresh=function(){};var C=mxUtils.bind(this,function(Q){27==Q.keyCode&&l.destroy()}),p=this.initialOverflow,E=l.destroy;l.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",C);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=p;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var M=l.editor.graph,S=M.container;S.style.overflow="hidden";this.lightboxChrome?(S.style.border="1px solid #c0c0c0",S.style.margin="40px",mxEvent.addListener(document.documentElement,
+"keydown",C)):(b.style.display="none",e.style.display="none");var H=this;M.getImageFromBundles=function(Q){return H.getImageUrl(Q)};var K=l.createTemporaryGraph;l.createTemporaryGraph=function(){var Q=K.apply(this,arguments);Q.getImageFromBundles=function(d){return H.getImageUrl(d)};return Q};this.graphConfig.move&&(M.isMoveCellsEvent=function(Q){return!0});mxUtils.setPrefixedStyle(S.style,"border-radius","4px");S.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(S.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(S.style,"transition","all .25s ease-in-out"));this.addClickHandler(M,l);window.setTimeout(mxUtils.bind(this,function(){S.style.outline="none";S.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(S);document.body.appendChild(e);l.setFileData(this.xml);mxUtils.setPrefixedStyle(S.style,"transform","rotateY(0deg)");l.chromelessToolbar.style.bottom=
"60px";l.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(l.chromelessToolbar);l.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});l.lightboxFit();l.chromelessResize();this.showLayers(M,this.graph);mxEvent.addListener(b,"click",function(){l.destroy()})}),0);return l};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
-GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(d){try{d.innerText="",GraphViewer.createViewerForElement(d)}catch(k){d.innerText=k.message,null!=window.console&&console.error(k)}})};
-GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var d=document.getElementsByClassName(b);b=[];for(var k=0;k<d.length;k++)b.push(d[k]);return b}var l=document.getElementsByTagName("*");d=[];for(k=0;k<l.length;k++){var B=l[k].className;null!=B&&0<B.length&&(B=B.split(" "),0<=mxUtils.indexOf(B,b)&&d.push(l[k]))}return d};
-GraphViewer.createViewerForElement=function(b,d){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),B=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=d&&d(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){B(p)}):B(l.xml)}};
-GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(d){}};
-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],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})();
+GraphViewer.processElements=function(b){mxUtils.forEach(GraphViewer.getElementsByClassName(b||"mxgraph"),function(e){try{e.innerText="",GraphViewer.createViewerForElement(e)}catch(k){e.innerText=k.message,null!=window.console&&console.error(k)}})};
+GraphViewer.getElementsByClassName=function(b){if(document.getElementsByClassName){var e=document.getElementsByClassName(b);b=[];for(var k=0;k<e.length;k++)b.push(e[k]);return b}var l=document.getElementsByTagName("*");e=[];for(k=0;k<l.length;k++){var C=l[k].className;null!=C&&0<C.length&&(C=C.split(" "),0<=mxUtils.indexOf(C,b)&&e.push(l[k]))}return e};
+GraphViewer.createViewerForElement=function(b,e){var k=b.getAttribute("data-mxgraph");if(null!=k){var l=JSON.parse(k),C=function(p){p=mxUtils.parseXml(p);p=new GraphViewer(b,p.documentElement,l);null!=e&&e(p)};null!=l.url?GraphViewer.getUrl(l.url,function(p){C(p)}):C(l.xml)}};
+GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type="text/css";b.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog, .geDialog table { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(b)}catch(e){}};
+GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(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(){e(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)},e=function(k,l){function C(){this.q=[];this.add=function(f){this.q.push(f)};var Q,d;this.call=function(){Q=0;for(d=this.q.length;Q<d;Q++)this.q[Q].call()}}function p(Q,d){return Q.currentStyle?Q.currentStyle[d]:window.getComputedStyle?window.getComputedStyle(Q,null).getPropertyValue(d):Q.style[d]}function E(Q,d){if(!Q.resizedAttached)Q.resizedAttached=
+new C,Q.resizedAttached.add(d);else if(Q.resizedAttached){Q.resizedAttached.add(d);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],v=Q.resizeSensor.childNodes[1],x=function(){g.style.width="100000px";g.style.height="100000px";f.scrollLeft=1E5;f.scrollTop=1E5;v.scrollLeft=1E5;v.scrollTop=1E5};x();var B=!1,I=function(){Q.resizedAttached&&(B&&(Q.resizedAttached.call(),B=!1),b(I))};b(I);var D,N,G,ia;d=function(){if((G=Q.offsetWidth)!=D||(ia=Q.offsetHeight)!=N)B=!0,D=G,N=ia;x()};var ka=function(ja,
+ca,pa){ja.attachEvent?ja.attachEvent("on"+ca,pa):ja.addEventListener(ca,pa)};ka(f,"scroll",d);ka(v,"scroll",d)}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,d=k.length;Q<d;Q++)e.detach(k[Q]);
+else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
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"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},
@@ -7039,7 +7046,12 @@ mxShapeSysMLSubmachineState.prototype.getConstraints=function(a,d,e){a=[];a.push
.75),!1));return a};function mxShapeSysMLUseCaseExtensionPoints(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLUseCaseExtensionPoints,mxShape);mxShapeSysMLUseCaseExtensionPoints.prototype.cst={USE_CASE_EXT_PT:"mxgraph.sysml.useCaseExtPt"};mxShapeSysMLUseCaseExtensionPoints.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c);a.setShadow(!1);this.foreground(a,d,e,b,c)};
mxShapeSysMLUseCaseExtensionPoints.prototype.background=function(a,d,e,b,c){a.ellipse(0,0,b,c);a.fillAndStroke()};mxShapeSysMLUseCaseExtensionPoints.prototype.foreground=function(a,d,e,b,c){a.begin();a.moveTo(.02*b,.35*c);a.lineTo(.98*b,.35*c);a.stroke()};mxCellRenderer.registerShape(mxShapeSysMLUseCaseExtensionPoints.prototype.cst.USE_CASE_EXT_PT,mxShapeSysMLUseCaseExtensionPoints);
mxShapeSysMLUseCaseExtensionPoints.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.145),!1));a.push(new mxConnectionConstraint(new mxPoint(.145,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,.855),!1));a.push(new mxConnectionConstraint(new mxPoint(.855,
-.145),!1));return a};function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
+.145),!1));return a};function mxShapeSysMLPort(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeSysMLPort,mxShape);mxShapeSysMLPort.prototype.cst={PORT:"mxgraph.sysml.port"};
+mxShapeSysMLPort.prototype.customProperties=[{name:"sysMLPortType",dispName:"Port Type",type:"enum",enumList:[{val:"empty",dispName:"Empty"},{val:"flowN",dispName:"Flow Up"},{val:"flowE",dispName:"Flow Right"},{val:"flowS",dispName:"Flow Down"},{val:"flowW",dispName:"Flow Left"},{val:"doubleH",dispName:"Double Horizontal"},{val:"doubleV",dispName:"Double Vertical"}]}];
+mxShapeSysMLPort.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.rect(0,0,b,c);a.fillAndStroke();switch(mxUtils.getValue(this.style,"sysMLPortType","empty")){case "flowN":a.begin();a.moveTo(.25*b,.5*c);a.lineTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.25*c);a.lineTo(.5*b,.75*c);a.stroke();break;case "flowE":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.75*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.stroke();break;case "flowS":a.begin();a.moveTo(.25*
+b,.5*c);a.lineTo(.5*b,.75*c);a.lineTo(.75*b,.5*c);a.moveTo(.5*b,.75*c);a.lineTo(.5*b,.25*c);a.stroke();break;case "flowW":a.begin();a.moveTo(.5*b,.25*c);a.lineTo(.25*b,.5*c);a.lineTo(.5*b,.75*c);a.moveTo(.25*b,.5*c);a.lineTo(.75*b,.5*c);a.stroke();break;case "doubleH":a.begin();a.moveTo(.6*b,.25*c);a.lineTo(.85*b,.5*c);a.lineTo(.6*b,.75*c);a.moveTo(.4*b,.25*c);a.lineTo(.15*b,.5*c);a.lineTo(.4*b,.75*c);a.stroke();break;case "doubleV":a.begin(),a.moveTo(.25*b,.6*c),a.lineTo(.5*b,.85*c),a.lineTo(.75*
+b,.6*c),a.moveTo(.25*b,.4*c),a.lineTo(.5*b,.15*c),a.lineTo(.75*b,.4*c),a.stroke()}};mxCellRenderer.registerShape(mxShapeSysMLPort.prototype.cst.PORT,mxShapeSysMLPort);mxShapeSysMLPort.prototype.getConstraints=function(a,d,e){a=[];a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));return a};
+function mxShapeUMLInputPin(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLInputPin,mxActor);mxShapeUMLInputPin.prototype.cst={INPUT_PIN:"mxgraph.uml25.inputPin"};
mxShapeUMLInputPin.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);a.begin();a.moveTo(0,0);a.lineTo(b,0);a.lineTo(b,c);a.lineTo(0,c);a.close();a.fillAndStroke();a.setShadow(!1);a.begin();a.moveTo(.75*b,.5*c);a.lineTo(.25*b,.5*c);a.moveTo(.4*b,.4*c);a.lineTo(.25*b,.5*c);a.lineTo(.4*b,.6*c);a.stroke()};mxCellRenderer.registerShape(mxShapeUMLInputPin.prototype.cst.INPUT_PIN,mxShapeUMLInputPin);mxShapeUMLInputPin.prototype.constraints=null;
function mxShapeUMLBehaviorAction(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1;this.dx=.5}mxUtils.extend(mxShapeUMLBehaviorAction,mxActor);mxShapeUMLBehaviorAction.prototype.cst={BEHAVIOR_ACTION:"mxgraph.uml25.behaviorAction"};
mxShapeUMLBehaviorAction.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=mxUtils.getValue(this.style,"rounded",!1);e=mxUtils.getValue(this.style,"absoluteArcSize",!1);var f=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));e||(f*=Math.min(b,c));f=Math.min(f,.5*b,.5*c);d||(f=0);a.begin();d?(a.moveTo(0,f),a.arcTo(f,f,0,0,1,f,0),a.lineTo(b-f,0),a.arcTo(f,f,0,0,1,b,f),a.lineTo(b,c-f),a.arcTo(f,f,0,0,1,b-f,c),a.lineTo(f,c),a.arcTo(f,f,0,0,1,0,c-f)):(a.moveTo(0,0),a.lineTo(b,
@@ -7180,7 +7192,15 @@ mxRackRackCabinet.prototype.paintVertexShape=function(a,d,e,b,c){b=parseFloat(mx
2*g,e):a.translate(d,e);c=b*f+42;this.background(a,c);a.setShadow(!1);this.foreground(a,c);h!==mxRackRackCabinet.prototype.cst.OFF&&this.sideText(a,c,b,f,g,h)};mxRackRackCabinet.prototype.background=function(a,d){a.setFillColor("#ffffff");a.rect(0,0,180,d);a.fillAndStroke()};
mxRackRackCabinet.prototype.foreground=function(a,d){a.setFillColor("#f4f4f4");a.rect(0,0,180,21);a.fillAndStroke();a.rect(0,d-21,180,21);a.fillAndStroke();a.rect(0,21,9,d-42);a.fillAndStroke();a.rect(171,21,9,d-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(171.5,7.5,6,6);a.stroke();a.ellipse(2.5,d-13.5,6,6);a.stroke();a.ellipse(171.5,d-13.5,6,6);a.stroke()};
mxRackRackCabinet.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet.prototype.cst.DIR_DESC||f===mxRackRackCabinet.prototype.cst.DIR_ON)for(f=0;f<
-e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
+e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackRackCabinet2(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackRackCabinet2,mxShape);
+mxRackRackCabinet2.prototype.cst={SHAPE_RACK_RACK_CABINET:"mxgraph.rackGeneral.rackCabinet2",UNIT_NUM:"unitNum",UNIT_HEIGHT:"rackUnitSize",TEXT_COLOR:"textColor",NUM_DIR:"numDir",NUMBER_DISPLAY:"numDisp",ON:"on",OFF:"off",DIR_ASC:"ascend",DIR_DESC:"descend",TEXT_SIZE:"textSize"};
+mxRackRackCabinet2.prototype.customProperties=[{name:"unitNum",dispName:"Number of units",type:"int",defVal:12},{name:"startUnit",dispName:"Starting unit",type:"int",defVal:1},{name:"rackUnitSize",dispName:"Unit height",type:"float",defVal:14.8},{name:"fillColor2",dispName:"Panel Color",type:"color",defVal:"#ffffff"},{name:"textColor",dispName:"Number text color",type:"color",defVal:"#666666"},{name:"textSize",dispName:"Text size",type:"float",defVal:"12"},{name:"numDisp",dispName:"Display Numbers",
+type:"enum",defVal:"descend",enumList:[{val:"off",dispName:"Off"},{val:"ascend",dispName:"Ascending"},{val:"descend",dispName:"Descending"}],onChange:function(a,d){a.setCellStyles("marginLeft","off"==d?9:33,a.getSelectionCells())}}];
+mxRackRackCabinet2.prototype.paintVertexShape=function(a,d,e,b,c){var f=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_NUM,"12")),g=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.UNIT_HEIGHT,"14.8")),h=parseFloat(mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_SIZE,"12")),k=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.NUMBER_DISPLAY,mxRackRackCabinet2.prototype.cst.ON);k!==mxRackRackCabinet2.prototype.cst.OFF?
+(a.translate(d+2*h,e),b-=2*h):a.translate(d,e);c=f*g+42;this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c);k!==mxRackRackCabinet2.prototype.cst.OFF&&this.sideText(a,c,f,g,h,k)};mxRackRackCabinet2.prototype.background=function(a,d,e){var b=mxUtils.getValue(this.style,"fillColor2","#ffffff");a.setFillColor(b);a.rect(0,0,d,e);a.fillAndStroke()};
+mxRackRackCabinet2.prototype.foreground=function(a,d,e){var b=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,"#f4f4f4");a.setFillColor(b);a.rect(0,0,d,21);a.fillAndStroke();a.rect(0,e-21,d,21);a.fillAndStroke();a.rect(0,21,9,e-42);a.fillAndStroke();a.rect(d-9,21,9,e-42);a.fillAndStroke();a.ellipse(2.5,7.5,6,6);a.stroke();a.ellipse(d-8.5,7.5,6,6);a.stroke();a.ellipse(2.5,e-13.5,6,6);a.stroke();a.ellipse(d-8.5,e-13.5,6,6);a.stroke()};
+mxRackRackCabinet2.prototype.sideText=function(a,d,e,b,c,f){var g=mxUtils.getValue(this.style,mxRackRackCabinet2.prototype.cst.TEXT_COLOR,"#666666"),h=mxUtils.getValue(this.style,"startUnit",1);a.setFontSize(c);a.setFontColor(g);if(f===mxRackRackCabinet2.prototype.cst.DIR_ASC)for(f=0;f<e;f++)a.text(-c,21+.5*b+f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);else if(f===mxRackRackCabinet2.prototype.cst.DIR_DESC||f===mxRackRackCabinet2.prototype.cst.DIR_ON)for(f=
+0;f<e;f++)a.text(-c,d-21-.5*b-f*b,0,0,(f+h).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,0);a.setStrokeColor(g);a.begin();for(f=0;f<e+1;f++)a.moveTo(-2*c,21+f*b),a.lineTo(0,21+f*b);a.stroke()};function mxRackHorCableDuct1U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackHorCableDuct1U,mxShape);mxRackHorCableDuct1U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_1U:"mxgraph.rackGeneral.horCableDuct1U"};
mxRackHorCableDuct1U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct1U.prototype.background=function(a,d,e){a.rect(0,0,160.9,14.8);a.fillAndStroke()};
mxRackHorCableDuct1U.prototype.foreground=function(a,d,e){a.rect(12,0,3,7);a.stroke();a.rect(12,7,3,7.8);a.stroke();a.rect(45.5,0,3,7);a.stroke();a.rect(45.5,7,3,7.8);a.stroke();a.rect(79,0,3,7);a.stroke();a.rect(79,7,3,7.8);a.stroke();a.rect(112.5,0,3,7);a.stroke();a.rect(112.5,7,3,7.8);a.stroke();a.rect(146,0,3,7);a.stroke();a.rect(146,7,3,7.8);a.stroke()};function mxRackHorCableDuct2U(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}
mxUtils.extend(mxRackHorCableDuct2U,mxShape);mxRackHorCableDuct2U.prototype.cst={SHAPE_RACK_HOR_CABLE_DUCT_2U:"mxgraph.rackGeneral.horCableDuct2U"};mxRackHorCableDuct2U.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,b,c);a.setShadow(!1);this.foreground(a,b,c)};mxRackHorCableDuct2U.prototype.background=function(a,d,e){a.rect(0,0,160.9,29.6);a.fillAndStroke()};
@@ -7198,10 +7218,10 @@ function mxRackChannelBase(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d
mxRackChannelBase.prototype.background=function(a,d,e){a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke();a.rect(0,0,d,e-5);a.fillAndStroke()};mxRackChannelBase.prototype.foreground=function(a,d,e){a.setFillColor("#000000");a.rect(10,e-15,5,15);a.fillAndStroke();a.rect(d-15,e-15,5,15);a.fillAndStroke()};function mxRackCabinetLeg(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxRackCabinetLeg,mxShape);
mxRackCabinetLeg.prototype.cst={SHAPE_RACK_CABINET_LEG:"mxgraph.rackGeneral.cabinetLeg"};mxRackCabinetLeg.prototype.paintVertexShape=function(a,d,e,b,c){b=Math.max(b,20);c=Math.max(c,20);a.translate(d,e);this.background(a,b,c)};
mxRackCabinetLeg.prototype.background=function(a,d,e){a.begin();a.moveTo(0,e-10);a.lineTo(5,e-10);a.lineTo(5,e-12);a.lineTo(9,e-12);a.lineTo(9,e-10);a.lineTo(d-10,e-10);a.lineTo(d-10,9);a.lineTo(d-12,9);a.lineTo(d-12,5);a.lineTo(d-10,5);a.lineTo(d-10,0);a.lineTo(d,0);a.lineTo(d,e);a.lineTo(0,e);a.close();a.fillAndStroke()};mxCellRenderer.registerShape(mxRackContainer.prototype.cst.SHAPE_RACK_CONTAINER,mxRackContainer);
-mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);
-mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);
-mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);
-mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
+mxCellRenderer.registerShape(mxRackRackCabinet2.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet2);mxCellRenderer.registerShape(mxRackHorCableDuct.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT,mxRackHorCableDuct);mxCellRenderer.registerShape(mxRackHorRoutingBank.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK,mxRackHorRoutingBank);mxCellRenderer.registerShape(mxRackNeatPatch.prototype.cst.SHAPE_RACK_NEAT_PATCH,mxRackNeatPatch);mxCellRenderer.registerShape(mxRackShelf.prototype.cst.SHAPE_RACK_SHELF,mxRackShelf);
+mxCellRenderer.registerShape(mxRackPlate.prototype.cst.SHAPE_RACK_PLATE,mxRackPlate);mxCellRenderer.registerShape(mxRackRackNumbering.prototype.cst.SHAPE_RACK_RACK_NUMBERING,mxRackRackNumbering);mxCellRenderer.registerShape(mxRackRackCabinet.prototype.cst.SHAPE_RACK_RACK_CABINET,mxRackRackCabinet);mxCellRenderer.registerShape(mxRackHorCableDuct1U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_1U,mxRackHorCableDuct1U);
+mxCellRenderer.registerShape(mxRackHorCableDuct2U.prototype.cst.SHAPE_RACK_HOR_CABLE_DUCT_2U,mxRackHorCableDuct2U);mxCellRenderer.registerShape(mxRackHorRoutingBank1U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_1U,mxRackHorRoutingBank1U);mxCellRenderer.registerShape(mxRackHorRoutingBank2U.prototype.cst.SHAPE_RACK_HOR_ROUTING_BANK_2U,mxRackHorRoutingBank2U);mxCellRenderer.registerShape(mxRackNeatPatch2U.prototype.cst.SHAPE_RACK_NEAT_PATCH_2U,mxRackNeatPatch2U);
+mxCellRenderer.registerShape(mxRackShelf1U.prototype.cst.SHAPE_RACK_SHELF_1U,mxRackShelf1U);mxCellRenderer.registerShape(mxRackShelf2U.prototype.cst.SHAPE_RACK_SHELF_2U,mxRackShelf2U);mxCellRenderer.registerShape(mxRackShelf4U.prototype.cst.SHAPE_RACK_SHELF_4U,mxRackShelf4U);mxCellRenderer.registerShape(mxRackChannelBase.prototype.cst.SHAPE_RACK_CHANNEL_BASE,mxRackChannelBase);mxCellRenderer.registerShape(mxRackCabinetLeg.prototype.cst.SHAPE_RACK_CABINET_LEG,mxRackCabinetLeg);
mxStencilRegistry.allowEval = false;