diff --git a/ChangeLog b/ChangeLog
index 53f21bec0654ff1e57aefc65498c5ed38189599b..f175aa6c546e5ee30b41d53996059073107e8489 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+24-MAR:2020: 12.9.2
+
+- Adds filename placeholder
+- Fixes Gliffy import
+
 24-MAR:2020: 12.9.1
 
 - Fixes insert HTML table from text panel
diff --git a/VERSION b/VERSION
index 65a979325aa0bfcfcbcd9ebb30982d7e3a48278d..b825d6d0316fcc846a38882598427998b6d14815 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.9.1
\ No newline at end of file
+12.9.2
\ No newline at end of file
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index d1e27de988b922d3bc9193761f0ddd46c40e88ff..8645988a9ff24c1178e5ad784c5709f4286e9a6e 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -133,7 +133,7 @@ var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456
 "");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
 String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||"https://app.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2";
 window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";
-window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");
+window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");
 window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
 window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
 window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",
@@ -2302,8 +2302,8 @@ Sidebar.prototype.showTooltip=function(a,c,d,b,f,e){if(this.enableTooltips&&this
 this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/
 b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltip.style.width=l+"px";var m=l;if(this.tooltipTitles&&null!=f&&0<f.length){null==this.tooltipTitle?
 (this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="";this.tooltipTitle.style.display="";mxUtils.write(this.tooltipTitle,f);var m=Math.min(this.maxTooltipWidth,
-Math.max(l,this.tooltipTitle.scrollWidth+4)),n=this.tooltipTitle.offsetHeight+10,g=g+n;mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-n+"px":(g-=6,this.tooltipTitle.style.top=g-n+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>l&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder)+(m-l)/2,h=-Math.round(h.y-this.tooltipBorder),n=document.body,p=document.documentElement,r=
-this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+r.x,g=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+r.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=
+Math.max(l,this.tooltipTitle.scrollWidth+4)),n=this.tooltipTitle.offsetHeight+10,g=g+n;mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-n+"px":(g-=6,this.tooltipTitle.style.top=g-n+"px")}else null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");m>l&&(this.tooltip.style.width=m+"px");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder)+(m>l?(m-l)/2:0),h=-Math.round(h.y-this.tooltipBorder),n=document.body,p=document.documentElement,
+r=this.getTooltipOffset(),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+r.x,g=Math.min(Math.max(n.clientHeight||0,p.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16))+r.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=
 h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=g+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null)};
 Sidebar.prototype.addDataEntry=function(a,c,d,b,f){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(f,c,d,b)}))};
 Sidebar.prototype.addEntries=function(a){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var b=a.data,c=null!=a.title?a.title:"";null!=a.tags&&(c+=" "+a.tags);null!=b&&0<c.length?this.addEntry(c,mxUtils.bind(this,function(){b=this.editorUi.convertDataUri(b);var c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==a.aspect&&(c+="aspect=fixed;");return this.createVertexTemplate(c+"image="+b,a.w,a.h,"",a.title||"",!1,!1,!0)})):null!=a.xml&&0<c.length&&this.addEntry(c,
@@ -2615,9 +2615,10 @@ HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getM
 HoverIcons.prototype.update=function(a,c,d){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var b=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,b=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
 this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,c,d))}),this.updateDelay+10))):null!=this.startTime&&(b=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,c,d)?this.reset(!1):(null!=this.currentState||b>this.activationDelay)&&this.currentState!=a&&(b>this.updateDelay&&null!=a||null==this.bbox||null==c||null==d||!mxUtils.contains(this.bbox,
 c,d))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
-Graph.prototype.createTable=function(a,c){var d=new mxCell("",new mxGeometry(0,0,40*c,30*a),"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;");d.vertex=!0;for(var b=0;b<a;b++){var f=new mxCell("",new mxGeometry(0,30*b,40*c,30),"html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];");f.vertex=!0;for(var e=0;e<c;e++){var h=new mxCell("",new mxGeometry(40*e,30*b,40,30),"html=1;whiteSpace=wrap;part=1;connectable=0;");h.vertex=
-!0;f.insert(h)}d.insert(f)}console.log("createTable",a,c,d);return d};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,c,d){a=this.cloneCell(a);for(var b=0;b<d;b++)a.insert(this.cloneCell(c));return a};
+Graph.prototype.createTable=function(a,c,d,b){d=null!=d?d:40;b=null!=b?b:30;return this.createParent(this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,c*d,b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];"),this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;"),c),a)};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,c,d,b){d=null!=d?d:120;b=null!=b?b:120;var f=this.createVertex(null,null,"",0,0,c*d,a*b,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;"),e=this.createVertex(null,null,"",0,0,c*d,b,"swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;");f.insert(this.createParent(e,this.createVertex(null,null,"",0,0,d,b,"swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;"),
+c));return 1<a?this.createParent(f,this.createParent(e,this.createVertex(null,null,"",0,0,d,b,"html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;"),c),a-1):f};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
 Graph.prototype.getActualStartSize=function(a,c){var d=new mxRectangle;if(this.isSwimlane(a)){var b=c?null:this.view.getState(a),f=null!=b?b.style:this.getCellStyle(a);if(null!=f){var e=parseInt(mxUtils.getValue(f,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),b=1==mxUtils.getValue(f,mxConstants.STYLE_FLIPH,0),h=1==mxUtils.getValue(f,mxConstants.STYLE_FLIPV,0),g=0;mxUtils.getValue(f,mxConstants.STYLE_HORIZONTAL,!0)||g++;f=mxUtils.getValue(f,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
 f==mxConstants.DIRECTION_NORTH?g++:f==mxConstants.DIRECTION_WEST?g+=2:f==mxConstants.DIRECTION_SOUTH&&(g+=3);g=mxUtils.mod(g,4);0==g?d.y=e:1==g?d.x=e:2==g?d.height=e:3==g&&(d.width=e);h&&(e=d.y,d.y=d.height,d.height=e);b&&(e=d.x,d.x=d.width,d.width=e)}}return d};
 Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var c=this.getModel(),d=c.getChildCount(a),b=this.getCellGeometry(a);if(null!=b&&0<d)for(var f=this.getActualStartSize(a),e=f.y,h=0;h<d;h++){var g=c.getChildAt(a,h);if(null!=g){var k=this.getCellGeometry(g);if(null!=k){if(h==d-1){var l=k.clone();l.width=b.width-f.x;e<b.height?l.height=b.height-e:e>b.height&&(b.height=e+Graph.minTableRowHeight,l.height=Graph.minTableRowHeight);c.setGeometry(g,l);this.tableRowResized(g,
@@ -9051,7 +9052,7 @@ A.className="geBtn",p.appendChild(A));PrintDialog.previewEnabled&&(A=mxUtils.but
 this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(A.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 E=document.createElement("canvas"),D=new Image;D.onload=function(){try{E.getContext("2d").drawImage(D,0,0);var a=E.toDataURL("image/png");Editor.prototype.useCanvasForExport=
 null!=a&&6<a.length}catch(G){}};D.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(B){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.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.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,c,b){b.ui=a.ui;return c};a.afterDecode=function(a,c,b){b.previousColor=b.color;b.previousImage=b.image;b.previousFormat=b.format;null!=b.foldingEnabled&&(b.foldingEnabled=!b.foldingEnabled);null!=b.mathEnabled&&(b.mathEnabled=!b.mathEnabled);null!=b.shadowVisible&&(b.shadowVisible=!b.shadowVisible);return b};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.9.2";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.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.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":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.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
 !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,c,d,f,g,k){g=null!=g?g:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
@@ -9295,136 +9296,137 @@ d.init()};b.cellEditor.editMermaidData=function(c,d,e){var f=JSON.parse(e);d=new
 "mermaidData",JSON.stringify({data:d,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(d.container,420,300,!0,!0);d.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(I){a.handleError(I)}};
 b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var c=!1;try{a.handleCustomLink(b),c=!0}catch(G){a.handleError(G)}return c};var d=this.clearDefaultStyle;this.clearDefaultStyle=function(){d.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var f=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
 a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return f.apply(this,arguments)};var g=b.addClickHandler;b.addClickHandler=function(a,c,d){var e=c;c=function(a,c){if(null==c){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(c=d.getAttribute("href"))}null!=c&&b.isCustomLink(c)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(c)&&
-mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var b=l.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=
-a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:n.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");
-if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==
-d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.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,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(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)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||
-"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),
-E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,
-f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(d=c.getElementsByTagName("a"),null!=d&&1==d.length?k=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(k=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,
-function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",
-mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=
-this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck",
-"false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),
-d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,
-"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c,!0),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),
-mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==
-a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=
-function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();
-this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,
-b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(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.copyCells=
-function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=
-a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),
-null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&
-(f=f.substring(0,k+3))}catch(D){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(D){}try{var l=this.editor.graph;if(null!=f&&0<f.length){l.lastPasteXml==f?l.pasteCounter++:(l.lastPasteXml=f,l.pasteCounter=0);var p=l.pasteCounter*l.gridSize;if(g||this.isCompatibleString(f))l.setSelectionCells(this.importXml(f,p,p));else{var n=l.getInsertPoint();l.isMouseInsertPoint()&&
-(p=0,l.lastPasteXml==f&&0<l.pasteCounter&&l.pasteCounter--);l.setSelectionCells(this.insertTextAt(f,n.x+p,n.y+p,!0))}l.isSelectionEmpty()||(l.scrollCellToVisible(l.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(l.view.getState(l.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c||(l.lastPasteXml=null,l.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],
-"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,
-"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?
-(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=
-Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":
-e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,
-mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,
-e.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else if(0==
-d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,e,b)}));else{if("image/png"==a.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,e,b)}}}catch(A){this.handleError(A)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(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))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(ca){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(P){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?
-mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==k.action){var p=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",
-error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,q=1==k.enableSearch,t=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=
-null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var x=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
-var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(z);g.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container);K(a)}),R=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-R){for(var X=x.getGlobalVariable,x=this.createTemporaryGraph(x.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==R){U=this.updatePageRoot(this.pages[L]);break}x.getGlobalVariable=function(a){return"page"==a?U.getName():"pagenumber"==a?1:X.apply(this,arguments)};document.body.appendChild(x.container);x.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=x.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],
-l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){N(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){N(null)}),null,null,k.scale,null,null,null,x)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);v=this.createLoadMessage("export");if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();v.xml=mxUtils.getXml(ga);v.data=this.getFileData(null,null,!0,null,null,null,ga);v.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),
-v.data=this.getHtml(z,this.editor.graph),v.xml=mxUtils.getXml(z),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,
-null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var Y=this.editor.graph.getSvg(fa);this.embedFonts(Y,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(v),
-"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight=
-"38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(p),this.embedFilenameSpan=p),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",
-data:JSON.stringify(k)}),"*");return}}catch(P){this.handleError(P)}}var aa=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(da){this.handleError(da)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=m();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;
-d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",
-b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){aa(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),
-m)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&aa(a.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){aa(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):
-(k=m(k),aa(k,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?
-(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
-mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight=
-"20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),
-this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-
-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,t=null,D=null,B=null,G=null,I="",H="auto",J="auto",F=null,K=null,N=40,R=40,X=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,Y="auto",G=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];
-for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?ba=L.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?n=M:"labels"==Q&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?D=M:"stylename"==Q&&0<M.length&&"-"!=M?m=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==
-Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?G=M:"namespace"==Q&&0<M.length&&"-"!=M?I=M:"width"==Q?H=M:"height"==Q?J=M:"left"==Q&&0<M.length?F=M:"top"==Q&&0<M.length?K=M:"ignore"==Q?ca=M.split(","):"connect"==Q?aa.push(JSON.parse(M)):"link"==Q?P=M:"padding"==Q?U=parseFloat(M):"edgespacing"==Q?N=parseFloat(M):"nodespacing"==Q?R=parseFloat(M):"levelspacing"==Q?X=parseFloat(M):"layout"==Q&&(Y=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),
-Q=da=null,M=[],T=0;T<ea.length;T++)B==ea[T]&&(da=T),G==ea[T]&&(Q=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==g[aa[S].to]&&(g[aa[S].to]={});B=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&B.push(ha)}L.model.beginUpdate();
-try{for(T=0;T<B.length;T++){var ha=B[T],O=null,ka=null!=da?I+ha[da]:null;null!=ka&&(O=L.model.getCell(ka));var c=null!=O,ia=new mxCell(ba,new mxGeometry(ga,W,0,0),k||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=t){var ua=t[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=m&&null!=l){var va=l[ia.getAttribute(m)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,
-ia.style);c&&(L.model.setGeometry(O,ia.geometry),L.model.setStyle(O,ia.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ia;if(!c)for(S=0;S<aa.length;S++)g[aa[S].to][O.getAttribute(aa[S].to)]=O;null!=P&&"link"!=P&&(L.setLinkForCell(O,O.getAttribute(P)),L.setAttributeForCell(O,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=F&&null!=O.getAttribute(F)&&(O.geometry.x=ga+parseFloat(O.getAttribute(F))),null!=K&&null!=O.getAttribute(K)&&
-(O.geometry.y=fa+parseFloat(O.getAttribute(K))),"@"==H.charAt(0)&&null!=O.getAttribute(H.substring(1))?O.geometry.width=parseFloat(O.getAttribute(H.substring(1))):O.geometry.width="auto"==H?wa.width+U:parseFloat(H),"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+U:parseFloat(J),W+=O.geometry.height+R);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(O)):(G=null!=Q?L.model.getCell(I+ha[Q]):null,d.push(O),
-null!=G?(G.style=L.replacePlaceholders(G,D),L.addCell(O,G)):e.push(L.addCell(O)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var O=d[T],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||
-""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?L.replacePlaceholders(l,c.style):L.createCurrentEdgeStyle();la.push(L.insertEdge(null,null,k||"",c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,na)}}});ya(O,O,xa);if(null!=f[O.id])for(ja=0;ja<f[O.id].length;ja++)ya(O,f[O.id][ja],xa)}if(null!=ca)for(T=0;T<d.length;T++)for(O=d[T],ja=0;ja<ca.length;ja++)L.setAttributeForCell(O,mxUtils.trim(ca[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;var ta=
-function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));"auto"==H&&(b.width=Math.round(L.snap(b.width)));"auto"==J&&(b.height=Math.round(L.snap(b.height)))}};if("["==Y.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(Y),function(){ta();za()});V=null}else if("circle"==Y){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=
-function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==Y);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==
-Y||"verticalflow"==Y||"auto"==Y&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=R;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=X;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,fa)},!0,V);V=null}else if("organic"==Y||"auto"==Y&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*R;qa.resetEdges=
-!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=N;this.executeLayout(function(){qa.execute(L.getDefaultParent());ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Ca){this.handleError(Ca)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>
-mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};
-EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,
-0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,
-arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=
-function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=
-mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&
-"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());
-this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);
-this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&
-this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=
-function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&
-!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=
-c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);
-this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
-function(a,b,c,d,f,g,k){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),p=Math.floor(m.height*f/e.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q=
-{globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});
-EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=
-function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();
-for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);
-(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));
-var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));
-0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=
-null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,
-"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,
-"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(y){c(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||
-window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=!0)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.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(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),
-"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,
-[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}});a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var n=JSON.parse(a.data);"init"==n.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),
-"*")):"remoteInvokeResponse"!=n.event||d||(c?null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?(e=n.resp[0],c=!1,l()):g():null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?m(n.resp[0]):k())}}catch(K){try{f=JSON.stringify(f)}catch(N){}EditorUi.logError("Migration Caught: "+K.message+(0<=K.message.indexOf("JSON")?" >> "+f:""),null,null,null,K,"INFO")}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(v){null!=b&&b(v)}else null!=
-b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||
-(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(z){null!=c&&c(z)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=
-c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(z){null!=b&&b(z)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=
-b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=
-function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=
-function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=
-function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&
-a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+mxEvent.consume(a);null!=e&&e(a,c)};g.call(this,a,c,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var l=b.getExportVariables;b.getExportVariables=function(){var b=l.apply(this,arguments),c=a.getCurrentFile();null!=c&&(b.filename=c.getTitle());
+b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var n=b.getGlobalVariable;b.getGlobalVariable=function(b){var c=a.getCurrentFile();return"filename"==b&&null!=c?c.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
+a.pages.length:1:n.apply(this,arguments)};var t=b.labelLinkClicked;b.labelLinkClicked=function(a,c,d){var e=c.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d))t.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(d)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};
+var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",
+!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",
+function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,
+f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,
+a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(y=this.editor.graph.view,
+y.setUnit(mxSettings.getUnit()),y.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.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,y.unit),this.refresh());if("1"==urlParams.styledev){y=document.getElementById("geFooter");null!=y&&(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)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var A=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:A.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var E=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=E&&(E.parentNode.removeChild(E),E=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=E&&(E.parentNode.removeChild(E),E=null);if(b.isEnabled()){var c=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=b.view.translate,e=b.view.scale,f=c.x/e-d.x,g=c.y/e-d.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var m=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,c=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=c)b.setSelectionCells(this.importXml(c,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),c=document.createElement("div");c.innerHTML=k;var l=null,d=c.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(d=c.getElementsByTagName("a"),null!=
+d&&1==d.length?k=d[0].getAttribute("href"):(c=c.getElementsByTagName("pre"),null!=c&&1==c.length&&(k=mxUtils.getTextContent(c[0]))));var p=!0,n=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,p))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){p=a;n()},mxEvent.isControlDown(a)):n()}else null!=m&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(m)?this.loadImage(decodeURIComponent(m),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,
+a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,c)),d/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,c*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+m+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(m,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];
+if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,d,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
+"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var d=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var e=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||d||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),d=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var e=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!d||224!=e&&17!=e&&91!=e||(d=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(z){this.handleError(z)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var f=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:f.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var c=a.indexOf(",");0<c&&(b=this.getPageById(a.substring(c+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){var c=b.getProperty("customFonts");this.menus.customFonts=c;mxSettings.setCustomFonts(c);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));
+this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(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.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(c.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=
+null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&
+(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var c=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,c,c));b.scrollCellToVisible(b.getSelectionCell())}),
+mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(D){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(D){}try{var l=this.editor.graph;if(null!=f&&0<f.length){l.lastPasteXml==f?l.pasteCounter++:
+(l.lastPasteXml=f,l.pasteCounter=0);var p=l.pasteCounter*l.gridSize;if(g||this.isCompatibleString(f))l.setSelectionCells(this.importXml(f,p,p));else{var n=l.getInsertPoint();l.isMouseInsertPoint()&&(p=0,l.lastPasteXml==f&&0<l.pasteCounter&&l.pasteCounter--);l.setSelectionCells(this.insertTextAt(f,n.x+p,n.y+p,!0))}l.isSelectionEmpty()||(l.scrollCellToVisible(l.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(l.view.getState(l.getSelectionCell())));try{mxEvent.consume(a)}catch(D){}}else c||
+(l.lastPasteXml=null,l.pasteCounter=0)}catch(D){this.handleError(D)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
+else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
+0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
+e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
+var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){try{var d=c.target.result,e=a.name;if(null!=
+e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(E){this.handleError(E,
+mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==c.target.result.substring(0,
+10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,e,b)}));else{if("image/png"==a.type.substring(0,9))d=
+this.extractGraphModelFromPng(d);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(d);null!=g&&(d=g)}this.spinner.stop();this.openLocalFile(d,e,b)}}}catch(A){this.handleError(A)}});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?c.readAsText(a):c.readAsDataURL(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=
+this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
+0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&
+(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
+a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(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))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
+this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,
+d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var k=f.data,m=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
+a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ca){}return a});if("json"==urlParams.proto){try{k=JSON.parse(k)}catch(P){k=null}try{if(null==k)return;if("dialog"==k.action){this.showError(null!=k.titleKey?mxResources.get(k.titleKey):k.title,null!=k.messageKey?
+mxResources.get(k.messageKey):k.message,null!=k.buttonKey?mxResources.get(k.buttonKey):k.button);null!=k.modified&&(this.editor.modified=k.modified);return}if("prompt"==k.action){this.spinner.stop();var l=new FilenameDialog(this,k.defaultValue||"",null!=k.okKey?mxResources.get(k.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:k}),"*")},null!=k.titleKey?mxResources.get(k.titleKey):k.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==
+k.action){var p=m(k.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[k.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:k}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"discard",message:k}),"*")}),k.editKey?mxResources.get(k.editKey):null,k.discardKey?mxResources.get(k.discardKey):null,k.ignore?mxUtils.bind(this,function(){this.hideDialog();
+g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:k}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(P){g.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:k}),"*")}return}if("template"==k.action){this.spinner.stop();var n=1==k.enableRecent,q=1==k.enableSearch,t=1==k.enableCustomTemp,l=new NewDialog(this,!1,null!=k.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;
+null!=k.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,n?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(a,b,c){g.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:c}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("textContent"==k.action){var u=this.getDiagramTextContent();g.postMessage(JSON.stringify({event:"textContent",data:u,message:k}),"*");return}if("status"==
+k.action){null!=k.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(k.messageKey))):null!=k.message&&this.editor.setStatus(mxUtils.htmlEntities(k.message));null!=k.modified&&(this.editor.modified=k.modified);return}if("spinner"==k.action){var v=null!=k.messageKey?mxResources.get(k.messageKey):k.message;null==k.show||k.show?this.spinner.spin(document.body,v):this.spinner.stop();return}if("export"==k.action){if("png"==k.format||"xmlpng"==k.format){if(null==k.spin&&null==k.spinKey||
+this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){var z=null!=k.xml?k.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var x=this.editor.graph,K=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=k.format;b.message=k;b.data=a;b.xml=encodeURIComponent(z);g.postMessage(JSON.stringify(b),"*")}),N=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==k.format&&(a=
+this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(z)));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container);K(a)}),R=k.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=R){for(var X=x.getGlobalVariable,x=this.createTemporaryGraph(x.getStylesheet()),U,L=0;L<this.pages.length;L++)if(this.pages[L].getId()==R){U=this.updatePageRoot(this.pages[L]);break}x.getGlobalVariable=function(a){return"page"==
+a?U.getName():"pagenumber"==a?1:X.apply(this,arguments)};document.body.appendChild(x.container);x.model.setRoot(U.root)}if(null!=k.layerIds){for(var V=x.model,W=V.getChildCells(V.getRoot()),l={},L=0;L<k.layerIds.length;L++)l[k.layerIds[L]]=!0;for(L=0;L<W.length;L++)V.setVisible(W[L],l[W[L].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){N(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){N(null)}),null,null,k.scale,null,null,null,x)}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==k.format?"1":"0")+(null!=R?"&pageId="+R:"")+(null!=k.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:k.layerIds})):"")+(null!=k.scale?"&scale="+k.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?K("data:image/png;base64,"+a.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else{null!=k.xml&&0<k.xml.length&&this.setFileData(k.xml);v=this.createLoadMessage("export");
+if("html2"==k.format||"html"==k.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ga=this.getXmlFileData();v.xml=mxUtils.getXml(ga);v.data=this.getFileData(null,null,!0,null,null,null,ga);v.format=k.format}else if("html"==k.format)z=this.editor.getGraphXml(),v.data=this.getHtml(z,this.editor.graph),v.xml=mxUtils.getXml(z),v.format=k.format;else{mxSvgCanvas2D.prototype.foAltText=null;var fa=this.editor.graph.background;fa==mxConstants.NONE&&(fa=null);v.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);v.format="svg";var ba=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(v),"*")});if("xmlsvg"==k.format)(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,null!=k.spinKey?mxResources.get(k.spinKey):k.spin))&&this.getEmbeddedSvg(v.xml,this.editor.graph,null,!0,ba,null,null,k.embedImages);else if(null==k.spin&&null==k.spinKey||this.spinner.spin(document.body,
+null!=k.spinKey?mxResources.get(k.spinKey):k.spin)){this.editor.graph.setEnabled(!1);var Y=this.editor.graph.getSvg(fa);this.embedFonts(Y,mxUtils.bind(this,function(a){k.embedImages||null==k.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ba(mxUtils.getXml(a))})):ba(mxUtils.getXml(a))}))}return}g.postMessage(JSON.stringify(v),"*")}return}if("load"==k.action)d=1==k.autosave,this.hideDialog(),null!=k.modified&&null==urlParams.modified&&(urlParams.modified=k.modified),null!=k.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=k.saveAndExit),null!=k.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,k.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(p),this.embedFilenameSpan=p),k=null!=k.xmlpng?this.extractGraphModelFromPng(k.xmlpng):k.xml;else{"remoteInvokeReady"==k.action?this.handleRemoteInvokeReady(g):"remoteInvoke"==k.action?this.handleRemoteInvoke(k,f.origin):"remoteInvokeResponse"==k.action?this.handleRemoteInvokeResponse(k):g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(k)}),"*");return}}catch(P){this.handleError(P)}}var aa=mxUtils.bind(this,function(f,k){c=!0;try{a(f,k)}catch(da){this.handleError(da)}c=
+!1;null!=urlParams.modified&&this.editor.setStatus("");var m=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=m();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=m();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",
+b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||g.postMessage(JSON.stringify(this.createLoadMessage("load")),
+"*")});null!=k&&"function"===typeof k.substring&&"data:application/vnd.visio;base64,"==k.substring(0,34)?(m="0M8R4KGxGuE"==k.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(k.substring(k.indexOf(",")+1)),function(a){aa(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),m)):null!=k&&"function"===typeof k.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,"")?this.parseFile(new Blob([k],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&aa(a.responseText,f)}),""):null!=k&&"function"===typeof k.substring&&this.isLucidChartData(k)?this.convertLucidChart(k,mxUtils.bind(this,function(a){aa(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(k=m(k),aa(k,f))}}));var g=window.opener||window.parent,f="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";g.postMessage(f,"*")};EditorUi.prototype.addEmbedButtons=
+function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
+a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
+a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};
+EditorUi.prototype.executeLayoutList=function(a,b){for(var c=this.editor.graph,d=c.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](c);if(null!=a[e].config)for(var g in a[e].config)f[g]=a[e].config[g];this.executeLayout(function(){f.execute(c.getDefaultParent(),0==d.length?null:d)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var c=a.split("\n"),d=[],e=[],f={};if(0<c.length){var g={},k=null,l=null,m=null,n=null,t=null,D=null,B=null,G=null,I="",H="auto",J=
+"auto",F=null,K=null,N=40,R=40,X=100,U=0,L=this.editor.graph;L.getGraphBounds();for(var V=function(){null!=b?b(la):(L.setSelectionCells(la),L.scrollCellToVisible(L.getSelectionCell()))},W=L.getFreeInsertPoint(),ga=W.x,fa=W.y,W=fa,ba=null,Y="auto",G=null,aa=[],P=null,ca=null,Z=0;Z<c.length&&"#"==c[Z].charAt(0);){a=c[Z];for(Z++;Z<c.length&&"\\"==a.charAt(a.length-1)&&"#"==c[Z].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(c[Z].substring(1)),Z++;if("#"!=a.charAt(1)){var da=a.indexOf(":");if(0<
+da){var Q=mxUtils.trim(a.substring(1,da)),M=mxUtils.trim(a.substring(da+1));"label"==Q?ba=L.sanitizeHtml(M):"labelname"==Q&&0<M.length&&"-"!=M?n=M:"labels"==Q&&0<M.length&&"-"!=M?t=JSON.parse(M):"style"==Q?k=M:"parentstyle"==Q?D=M:"stylename"==Q&&0<M.length&&"-"!=M?m=M:"styles"==Q&&0<M.length&&"-"!=M?l=JSON.parse(M):"identity"==Q&&0<M.length&&"-"!=M?B=M:"parent"==Q&&0<M.length&&"-"!=M?G=M:"namespace"==Q&&0<M.length&&"-"!=M?I=M:"width"==Q?H=M:"height"==Q?J=M:"left"==Q&&0<M.length?F=M:"top"==Q&&0<M.length?
+K=M:"ignore"==Q?ca=M.split(","):"connect"==Q?aa.push(JSON.parse(M)):"link"==Q?P=M:"padding"==Q?U=parseFloat(M):"edgespacing"==Q?N=parseFloat(M):"nodespacing"==Q?R=parseFloat(M):"levelspacing"==Q?X=parseFloat(M):"layout"==Q&&(Y=M)}}}if(null==c[Z])throw Error(mxResources.get("invalidOrMissingFile"));for(var ea=this.editor.csvToArray(c[Z]),Q=da=null,M=[],T=0;T<ea.length;T++)B==ea[T]&&(da=T),G==ea[T]&&(Q=T),M.push(mxUtils.trim(ea[T]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==
+ba&&(ba="%"+M[0]+"%");if(null!=aa)for(var S=0;S<aa.length;S++)null==g[aa[S].to]&&(g[aa[S].to]={});B=[];for(T=Z+1;T<c.length;T++){var ha=this.editor.csvToArray(c[T]);if(null==ha){var ma=40<c[T].length?c[T].substring(0,40)+"...":c[T];throw Error(ma+" ("+T+"):\n"+mxResources.get("containsValidationErrors"));}0<ha.length&&B.push(ha)}L.model.beginUpdate();try{for(T=0;T<B.length;T++){var ha=B[T],O=null,ka=null!=da?I+ha[da]:null;null!=ka&&(O=L.model.getCell(ka));var c=null!=O,ia=new mxCell(ba,new mxGeometry(ga,
+W,0,0),k||"whiteSpace=wrap;html=1;");ia.vertex=!0;ia.id=ka;for(var ja=0;ja<ha.length;ja++)L.setAttributeForCell(ia,M[ja],ha[ja]);if(null!=n&&null!=t){var ua=t[ia.getAttribute(n)];null!=ua&&L.labelChanged(ia,ua)}if(null!=m&&null!=l){var va=l[ia.getAttribute(m)];null!=va&&(ia.style=va)}L.setAttributeForCell(ia,"placeholders","1");ia.style=L.replacePlaceholders(ia,ia.style);c&&(L.model.setGeometry(O,ia.geometry),L.model.setStyle(O,ia.style),0>mxUtils.indexOf(e,O)&&e.push(O));O=ia;if(!c)for(S=0;S<aa.length;S++)g[aa[S].to][O.getAttribute(aa[S].to)]=
+O;null!=P&&"link"!=P&&(L.setLinkForCell(O,O.getAttribute(P)),L.setAttributeForCell(O,P,null));L.fireEvent(new mxEventObject("cellsInserted","cells",[O]));var wa=this.editor.graph.getPreferredSizeForCell(O);O.vertex&&(null!=F&&null!=O.getAttribute(F)&&(O.geometry.x=ga+parseFloat(O.getAttribute(F))),null!=K&&null!=O.getAttribute(K)&&(O.geometry.y=fa+parseFloat(O.getAttribute(K))),"@"==H.charAt(0)&&null!=O.getAttribute(H.substring(1))?O.geometry.width=parseFloat(O.getAttribute(H.substring(1))):O.geometry.width=
+"auto"==H?wa.width+U:parseFloat(H),"@"==J.charAt(0)&&null!=O.getAttribute(J.substring(1))?O.geometry.height=parseFloat(O.getAttribute(J.substring(1))):O.geometry.height="auto"==J?wa.height+U:parseFloat(J),W+=O.geometry.height+R);c?(null==f[ka]&&(f[ka]=[]),f[ka].push(O)):(G=null!=Q?L.model.getCell(I+ha[Q]):null,d.push(O),null!=G?(G.style=L.replacePlaceholders(G,D),L.addCell(O,G)):e.push(L.addCell(O)))}for(var na=e.slice(),la=e.slice(),S=0;S<aa.length;S++)for(var xa=aa[S],T=0;T<d.length;T++){var O=
+d[T],ya=mxUtils.bind(this,function(a,b,c){var d=b.getAttribute(c.from);if(null!=d&&(L.setAttributeForCell(b,c.from,null),""!=d))for(var d=d.split(","),e=0;e<d.length;e++){var f=g[c.to][d[e]];if(null!=f){var k=c.label;null!=c.fromlabel&&(k=(b.getAttribute(c.fromlabel)||"")+(k||""));null!=c.tolabel&&(k=(k||"")+(f.getAttribute(c.tolabel)||""));var l="target"==c.placeholders==!c.invert?f:a,l=null!=c.style?L.replacePlaceholders(l,c.style):L.createCurrentEdgeStyle();la.push(L.insertEdge(null,null,k||"",
+c.invert?f:a,c.invert?a:f,l));mxUtils.remove(c.invert?a:f,na)}}});ya(O,O,xa);if(null!=f[O.id])for(ja=0;ja<f[O.id].length;ja++)ya(O,f[O.id][ja],xa)}if(null!=ca)for(T=0;T<d.length;T++)for(O=d[T],ja=0;ja<ca.length;ja++)L.setAttributeForCell(O,mxUtils.trim(ca[ja]),null);if(0<e.length){var oa=new mxParallelEdgeLayout(L);oa.spacing=N;var ta=function(){0<oa.spacing&&oa.execute(L.getDefaultParent());for(var a=0;a<e.length;a++){var b=L.getCellGeometry(e[a]);b.x=Math.round(L.snap(b.x));b.y=Math.round(L.snap(b.y));
+"auto"==H&&(b.width=Math.round(L.snap(b.width)));"auto"==J&&(b.height=Math.round(L.snap(b.height)))}};if("["==Y.charAt(0)){var za=V;L.view.validate();this.executeLayoutList(JSON.parse(Y),function(){ta();za()});V=null}else if("circle"==Y){var ra=new mxCircleLayout(L);ra.resetEdges=!1;var Aa=ra.isVertexIgnored;ra.isVertexIgnored=function(a){return Aa.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){ra.execute(L.getDefaultParent());ta()},!0,V);V=null}else if("horizontaltree"==
+Y||"verticaltree"==Y||"auto"==Y&&la.length==2*e.length-1&&1==na.length){L.view.validate();var sa=new mxCompactTreeLayout(L,"horizontaltree"==Y);sa.levelDistance=R;sa.edgeRouting=!1;sa.resetEdges=!1;this.executeLayout(function(){sa.execute(L.getDefaultParent(),0<na.length?na[0]:null)},!0,V);V=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==na.length){L.view.validate();var pa=new mxHierarchicalLayout(L,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=
+R;pa.parallelEdgeSpacing=N;pa.interRankCellSpacing=X;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(L.getDefaultParent(),la);L.moveCells(la,ga,fa)},!0,V);V=null}else if("organic"==Y||"auto"==Y&&la.length>e.length){L.view.validate();var qa=new mxFastOrganicLayout(L);qa.forceConstant=3*R;qa.resetEdges=!1;var Ba=qa.isVertexIgnored;qa.isVertexIgnored=function(a){return Ba.apply(this,arguments)||0>mxUtils.indexOf(e,a)};oa=new mxParallelEdgeLayout(L);oa.spacing=N;this.executeLayout(function(){qa.execute(L.getDefaultParent());
+ta()},!0,V);V=null}}this.hideDialog()}finally{L.model.endUpdate()}null!=V&&V()}}catch(Ca){this.handleError(Ca)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var l=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
+l.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
+2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/a,8/a)};var f=b.init;b.init=function(){f.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,
+!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var c=1;null==this.drive&&"function"!==typeof window.DriveClient||c++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||c++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||c++;b||null==this.gitHub||c++;b||null==this.gitLab||c++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&c++;return c};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();
+var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);
+this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
+this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
+this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var t=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);t.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,d,f,g,k){var e=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(e.getSvg(d,f,g)),"image/svg+xml");else{var l=a.getFileData(!0,null,null,
+null,null,!0),m=e.getGraphBounds(),n=Math.floor(m.width*f/e.view.scale),p=Math.floor(m.height*f/e.view.scale);if(l.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:e.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<k?"&dpi="+k:"")+"&bg="+(null!=d?d:
+"none")+"&w="+n+"&h="+p+"&border="+g+"&xml="+encodeURIComponent(l))})}else"png"==c?a.exportImage(f,null==d||"none"==d,!0,!1,!1,g,!0,!1,null,null,k):a.exportImage(f,!1,!0,!1,!1,g,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var d=a;this.currentPage!=this.pages[c]&&(d=this.createTemporaryGraph(a.getStylesheet()),
+this.updatePageRoot(this.pages[c]),d.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+d.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},c=document.createElement("div");c.style.whiteSpace="nowrap";var d=document.createElement("h3");mxUtils.write(d,mxUtils.htmlEntities(a));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(d);var e=
+document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var f={};try{var g=mxSettings.getCustomLibraries();for(a=0;a<g.length;a++){var k=g[a];if("R"==k.substring(0,1)){var l=JSON.parse(decodeURIComponent(k.substring(1)));f[l[0]]={id:l[0],title:l[1],downloadUrl:l[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
+a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var c=0;c<a.length;c++){var d=a[c];f[d.id]&&(b[d.id]=d);var g=this.addCheckbox(e,d.title,f[d.id]);(function(a,c){mxEvent.addListener(c,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(d,g)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));c.appendChild(e);c=new CustomDialog(this,c,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,c;for(c in b)null==f[c]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(c){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,c,b))}catch(B){this.handleError(B,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[c]));for(c in f)b[c]||this.closeLibrary(new RemoteLibrary(this,null,f[c]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(c.container,340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
+a.msgMarkers,c=this.remoteInvokeCallbacks[b.callbackId];if(null==c)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?c.error&&c.error(a.error.errResp):c.callback&&c.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,d,f){var e=!0,g=window.setTimeout(mxUtils.bind(this,function(){e=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),k=mxUtils.bind(this,function(){window.clearTimeout(g);
+e&&d.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:k,error:f});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var c=mxUtils.bind(this,function(b,c){var d={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=c?d.error={errResp:c}:null!=b&&(d.resp=
+b);this.remoteWin.postMessage(JSON.stringify(d),"*")});try{var d=a.funtionName,e=this.remoteInvokableFns[d];if(null!=e&&"function"===typeof this[d]){if(e.allowedDomains){for(var f=!1,g=0;g<e.allowedDomains.length;g++)if(b=="https://"+e.allowedDomains[g]){f=!0;break}if(!f){c(null,"Invalid Call: "+d+" is not allowed.");return}}var k=a.functionArgs;Array.isArray(k)||(k=[]);if(e.isAsync)k.push(function(){c(Array.prototype.slice.apply(arguments))}),k.push(function(a){c(null,a||"Unkown Error")}),this[d].apply(this,
+k);else{var l=this[d].apply(this,k);c([l])}}else c(null,"Invalid Call: "+d+" is not found.")}catch(y){c(null,"Invalid Call: An error occured, "+y.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var c=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=c)try{var d=c.open("database",2);d.onupgradeneeded=function(a){var b=d.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
+b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};d.onsuccess=mxUtils.bind(this,function(b){var c=d.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(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src",
+"https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var c=!0,d=!1,e,f=0,g=mxUtils.bind(this,function(){d=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),k=mxUtils.bind(this,function(){f++;l()}),l=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(c){null==c||".scratchpad"==a&&c==this.emptyLibraryXml?
+b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):k()}),k)}}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],k,k,["filesInfo","files"])}catch(J){EditorUi.logError("Migration Caught: "+J.message,null,null,null,J,"INFO")}});
+a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var n=JSON.parse(a.data);"init"==n.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=n.event||d||(c?null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?(e=n.resp[0],c=!1,l()):g():null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?m(n.resp[0]):k())}}catch(K){try{f=
+JSON.stringify(f)}catch(N){}EditorUi.logError("Migration Caught: "+K.message+(0<=K.message.indexOf("JSON")?" >> "+f:""),null,null,null,K,"INFO")}});window.addEventListener("message",a)}})));a(c);c.onversionchange=function(){c.close()}});d.onerror=b;d.onblocked=function(){}}catch(v){null!=b&&b(v)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,d,f){this.openDatabase(mxUtils.bind(this,function(e){try{f=f||"objects";Array.isArray(f)||(f=[f],a=[a],b=[b]);var g=
+e.transaction(f,"readwrite");g.oncomplete=c;g.onerror=d;for(e=0;e<f.length;e++)g.objectStore(f[e]).put(null!=a&&null!=a[e]?{key:a[e],data:b[e]}:b[e])}catch(x){null!=d&&d(x)}}),d)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,d){this.openDatabase(mxUtils.bind(this,function(e){d=d||"objects";Array.isArray(d)||(d=[d],a=[a]);e=e.transaction(d,"readwrite");e.oncomplete=b;e.onerror=c;for(var f=0;f<d.length;f++)e.objectStore(d[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,
+b,c,d){this.openDatabase(mxUtils.bind(this,function(e){try{d=d||"objects";var f=e.transaction([d],"readonly").objectStore(d).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(z){null!=c&&c(z)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),
+b.target.result["continue"]())};e.onerror=b}catch(z){null!=b&&b(z)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(q){null!=b&&b(q)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=
+this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var c=this.getCurrentFile();null!=c?c.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?
+a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var c=this.getCurrentFile();return null!=c?c.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var c=this.getCurrentFile();null!=
+c&&c.getRevisions?c.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==
+localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),d=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<d.length){var f="<mxfile "===d.substring(0,8)||"<?xml"===d.substring(0,5)||"\x3c!--[if IE]>"===d.substring(0,12),d="<mxlibrary>"===d.substring(0,11);(f||d)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null;
+var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
 var CommentsWindow=function(a,d,c,b,g,f){function k(){for(var a=C.getElementsByTagName("div"),b=0,c=0;c<a.length;c++)"none"!=a[c].style.display&&a[c].parentNode==C&&b++;y.style.display=0==b?"block":"none"}function l(a,b,c,d){function e(){b.removeChild(l);b.removeChild(m);g.style.display="block";f.style.display="block"}q={div:b,comment:a,saveCallback:c,deleteOnCancel:d};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),l=document.createElement("textarea");l.className=
 "geCommentEditTxtArea";l.style.minHeight=f.offsetHeight+"px";l.value=a.content;b.insertBefore(l,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){d?(b.parentNode.removeChild(b),k()):e();q=null});n.className="geCommentEditBtn";m.appendChild(n);var p=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=l.value;mxUtils.write(f,a.content);e();c(a);q=null});mxEvent.addListener(l,"keydown",mxUtils.bind(this,
 function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(p.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));p.focus();p.className="geCommentEditBtn gePrimaryBtn";m.appendChild(p);b.insertBefore(m,f);g.style.display="none";f.style.display="none";l.focus()}function n(b,c){c.innerHTML="";var d=new Date(b.modifiedDate),e=a.timeSince(d);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(c,mxResources.get("timeAgo",
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 6a086c8a7017e76878469bc21386540c7b504ea4..96ac4b6067ef4eb5e63ab0f3c198ab51bfd7373b 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -9584,6 +9584,12 @@
 		graph.getExportVariables = function()
 		{
 			var vars = graphGetExportVariables.apply(this, arguments);
+			var file = ui.getCurrentFile();
+			
+			if (file != null)
+			{
+				vars['filename'] = file.getTitle();
+			}
 			
 			vars['pagecount'] = (ui.pages != null) ? ui.pages.length : 1;
 			vars['page'] = (ui.currentPage != null) ? ui.currentPage.getName() : '';
@@ -9598,7 +9604,13 @@
 		
 		graph.getGlobalVariable = function(name)
 		{
-			if (name == 'page' && ui.currentPage != null)
+			var file = ui.getCurrentFile();
+			
+			if (name == 'filename' && file != null)
+			{
+				return file.getTitle();
+			}
+			else if (name == 'page' && ui.currentPage != null)
 			{
 				return ui.currentPage.getName();
 			}
@@ -13812,7 +13824,7 @@
 							// Version 2 introduces browser file storage.
 							db.createObjectStore('files', {keyPath: 'title'});
 							db.createObjectStore('filesInfo', {keyPath: 'title'});
-							EditorUi.migrateStorageFiles = true;
+							EditorUi.migrateStorageFiles = isLocalStorage;
 						}
 					}
 					
diff --git a/src/main/webapp/js/diagramly/Extensions.js b/src/main/webapp/js/diagramly/Extensions.js
index 2f5721e8b8269e3457529c153ddf9874a2c773bf..30d3b3a200b0ef2a8fa95d7d6f238dc46f5337ba 100644
--- a/src/main/webapp/js/diagramly/Extensions.js
+++ b/src/main/webapp/js/diagramly/Extensions.js
@@ -3280,6 +3280,24 @@ LucidImporter = {};
 		
 		return '';
 	}
+		
+	function getLink(m)
+	{
+		if (m != null)
+		{
+			for (var i = 0; i < m.length; i++)
+			{
+				if (m[i].n = 'lk' && m[i].v != null &&
+					m[i].v.length > 0 &&
+					m[i].v[0].tp == 'ext')
+				{
+					return m[i].v[0].url;
+				}
+			}
+		}
+		
+		return null;
+	}
 
 	function getFontColor(properties)
 	{
@@ -3608,6 +3626,16 @@ LucidImporter = {};
 		return '';
 	}
 
+	function getHeaderColor(color)
+	{
+		if (color != null)
+		{
+			return mxConstants.STYLE_FILLCOLOR + '=' + color.substring(0, 7) + ';';
+		}
+		
+		return '';
+	}
+	
 	function getOpacity(properties, action, cell)
 	{
 		var style = '';
@@ -3660,41 +3688,45 @@ LucidImporter = {};
 
 	function getRotation(properties, action, cell)
 	{
+		var s = '';
+	
 		// Converts rotation
 		if (properties.Rotation != null)
 		{
 			// KNOWN: TextRotation currently ignored
 			var deg = mxUtils.toDegree(parseFloat(properties.Rotation));
+			var h = true;
 			
 			// Fixes the case for horizontal swimlanes where we use horizontal=0
 			// and Lucid uses rotation
-			
 			if (action.Class == 'AdvancedSwimLaneBlockRotated')
 			{
 				deg += 90;
 				cell.geometry.rotate90();
+				h = false;
 			}
 			else if (mxUtils.indexOf(rccw, action.Class) >= 0)
 			{
 				deg -= 90;
 				cell.geometry.rotate90();
-				cell.geometry.rotate90();
-				cell.geometry.rotate90();
 			}
 			else if (mxUtils.indexOf(rcw2, action.Class) >= 0)
 			{
 				deg += 180;
-				cell.geometry.rotate90();
-				cell.geometry.rotate90();
 			}
 			
 			if (deg != 0)
 			{
-				return 'rotation=' + deg + ';';
+				s += 'rotation=' + deg + ';'
+			}
+			
+			if (!h)
+			{
+				s +=  'horizontal=0;';
 			}
 		}
 		
-		return '';
+		return s;
 	}
 	
 	function getFlipH(properties)
@@ -3798,9 +3830,25 @@ LucidImporter = {};
 		return '';
 	}
 
-	// Adds metadata
+	// Adds metadata, link, converts placeholders
 	function addCustomData(cell, p, graph)
 	{
+		if (p.Link != null && p.Link.length > 0 && p.Link[0].tp == 'ext')
+		{
+			graph.setAttributeForCell(cell, 'link', p.Link[0].url);
+		}
+		else if (p.Text != null)
+		{
+			var link = getLink(getTextM(p.Text));
+			
+			if (link != null)
+			{
+				graph.setAttributeForCell(cell, 'link', link);
+			}
+		}
+		
+		replacePlaceholders(cell, graph);
+		
 		for (var property in p)
 		{
 			if (p.hasOwnProperty(property) && 
@@ -3824,6 +3872,58 @@ LucidImporter = {};
 		}
 	};
 	
+	var placeholderPattern = new RegExp('{{(date\{.*\}|[^%^\{^\}]+)}}', 'g');
+	
+	function replacePlaceholders(cell, graph)
+	{
+		var result = [];
+		var str = graph.convertValueToString(cell);
+		var doReplace = false;
+		
+		if (str != null)
+		{
+			var last = 0;
+			
+			while (match = placeholderPattern.exec(str))
+			{
+				var val = match[0];
+				doReplace = true;
+				
+				if (val.length > 2)
+				{
+					var tmp = val.substring(2, val.length - 2);
+					
+					if (tmp == 'documentName')
+					{
+						tmp = 'filename';
+					}
+					else if (tmp.substring(0, 5) == 'date:')
+					{
+						// LATER: Convert more date masks
+						tmp = 'date{' + tmp.substring(5).replace(/MMMM/g, 'mmmm') + '}';
+					}
+					else if (tmp.substring(0, 9) == 'i18nDate:')
+					{
+						// LATER: Convert more named date masks
+						tmp = 'date{' + tmp.substring(9).replace(/i18nShort/g, 'shortDate')
+							.replace(/i18nMediumWithTime/g, 'mmm d, yyyy hh:MM TT') + '}';
+					}
+					
+					tmp = '%' + tmp + '%';
+					result.push(str.substring(last, match.index) + ((tmp != null) ? tmp : val));
+					last = match.index + val.length;
+				}
+			}
+			
+			if (doReplace)
+			{
+				result.push(str.substring(last));
+				graph.setAttributeForCell(cell, 'label', result.join(''));
+				graph.setAttributeForCell(cell, 'placeholders', '1');
+			}
+		}
+	};
+	
 	function setAttributeForCell(cell, key, value, graph)
 	{
 		var currentKey = key;
@@ -4546,7 +4646,7 @@ LucidImporter = {};
 	    v.vertex = true;
 
 	    var cls = (obj.Class != null) ? obj.Class : (a != null) ? a.Class : null;
-	    
+	    var rotatedSL = false;
 	    
 	    //composite shapes
 		switch (cls)
@@ -4596,6 +4696,7 @@ LucidImporter = {};
 				break;
 				
 			case 'AdvancedSwimLaneBlockRotated' :
+				rotatedSL = true;
 			case 'AdvancedSwimLaneBlock' :
 				var lanesNum = 0;
 				
@@ -4604,34 +4705,54 @@ LucidImporter = {};
 					lanesNum = p.Lanes.length;
 				}
 
-				v.style = "strokeColor=none;fillColor=none;"
+				v.style = 'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;strokeColor=none;fillColor=none;';
 				v.style += addAllStyles(v.style, p, a, v);
 				
 				var totalOffset = 0; //relative
 				var lane = new Array();
+
+				var laneStyle = rotatedSL? 'swimlane;horizontal=0;html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout;startSize=25;'
+												: 'swimlane;html=1;whiteSpace=wrap;part=1;connectable=0;collapsible=0;startSize=25;';
 				
-				for (var i = 0; i < lanesNum; i++)
+				if (!rotatedSL)
 				{
-					var currOffset = parseFloat(p.Lanes[i].p);
+					var tbl = v;
+					v = new mxCell('', new mxGeometry(x, y, w, h), 'html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout');
+				    v.vertex = true;
+				    tbl.insert(lane[i]);
+				}
+				
+				for (var j = 0; j < lanesNum; j++)
+				{
+					var currOffset = parseFloat(p.Lanes[j].p);
+					var i = parseInt(p.Lanes[j].tid) || j;
 					
-					lane.push(new mxCell('', new mxGeometry(w * totalOffset, 0,	w * currOffset, h), 'shape=swimlane;startSize=25;'));
+					lane.push(new mxCell('', new mxGeometry(w * totalOffset, 0,	w * currOffset, h), laneStyle));
 					
-					lane[i].vertex = true;
-					v.insert(lane[i]);
-					lane[i].value = convertText(p["Lane_" + i]);
-					lane[i].style += 	
+					lane[j].vertex = true;
+					v.insert(lane[j]);
+					lane[j].value = convertText(p["Lane_" + i]);
+					lane[j].style +=
+									addAllStyles(lane[j].style, p, a, lane[j]) +
 									getFontSize(p["Lane_" + i]) +
 									getFontColor(p["Lane_" + i]) + 
 									getFontStyle(p["Lane_" + i]) +
-									getTextAlignment(p["Lane_" + i], lane[i]) + 
+									getTextAlignment(p["Lane_" + i], lane[j]) + 
 									getTextLeftSpacing(p["Lane_" + i]) +
 									getTextRightSpacing(p["Lane_" + i]) + 
 									getTextTopSpacing(p["Lane_" + i]) +
 									getTextBottomSpacing(p["Lane_" + i]) + 
 									getTextGlobalSpacing(p["Lane_" + i]) +
-									getTextVerticalAlignment(p["Lane_" + i]); 
-					addAllStyles(lane[i].style, p, a, lane[i]);
-
+									getTextVerticalAlignment(p["Lane_" + i]) +
+									getHeaderColor(p["HeaderFill_" + i]);
+					
+					if (rotatedSL)
+					{
+						var dc = new mxCell('', new mxGeometry(0, 0, h - 25, w * currOffset), 'html=1;whiteSpace=wrap;part=1;connectable=0;fillColor=none;strokeColor=none;');
+					    dc.vertex = true;
+						lane[j].insert(dc);
+					}
+					
 					totalOffset += currOffset;
 				}
 				
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index a284dadc661abb4981074e6f5556edb38d06aa16..5c21c3ebb74ce1f2a002c7a58582416b12046ff4 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -26,7 +26,7 @@ window.REALTIME_URL = window.REALTIME_URL || 'cache';
 window.DRAWIO_GITLAB_URL = window.DRAWIO_GITLAB_URL || 'https://gitlab.com';
 window.DRAWIO_GITLAB_ID = window.DRAWIO_GITLAB_ID || '5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44';
 window.SAVE_URL = window.SAVE_URL || 'save';
-window.OPEN_URL = window.OPEN_URL || 'open';
+window.OPEN_URL = window.OPEN_URL || 'import';
 window.PROXY_URL = window.PROXY_URL || 'proxy';
 window.DRAWIO_VIEWER_URL = window.DRAWIO_VIEWER_URL || null;
 
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index a6e5b78d916ebb80a888a4a9160b7a561f997f11..1bc7b96389c7e4c1de74b3d3a673bc1aa5bce198 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -4,88 +4,89 @@ b.t.replace(/>/g,"&gt;"),b.t;if(null!=b.Value&&null!=b.Value.t)return b.Value.t=
 d(g)+p(g)+y(g)+z(g)+x(g)+A(g)+C(g)+H(g)}function f(a,b,d,g){var p="";null!=a&&""!=a&&";"!=a.charAt(a.length-1)&&(p=";");return p+=e(mxConstants.STYLE_FONTSIZE,a,b,d,g)+e(mxConstants.STYLE_FONTCOLOR,a,b,d,g)+e(mxConstants.STYLE_FONTSTYLE,a,b,d,g)+e(mxConstants.STYLE_ALIGN,a,b,d,g)+e(mxConstants.STYLE_SPACING_LEFT,a,b,d,g)+e(mxConstants.STYLE_SPACING_RIGHT,a,b,d,g)+e(mxConstants.STYLE_SPACING_TOP,a,b,d,g)+e(mxConstants.STYLE_SPACING_BOTTOM,a,b,d,g)+e(mxConstants.STYLE_SPACING,a,b,d,g)+e(mxConstants.STYLE_VERTICAL_ALIGN,
 a,b,d,g)+e(mxConstants.STYLE_STROKECOLOR,a,b,d,g)+e(mxConstants.STYLE_OPACITY,a,b,d,g)+e(mxConstants.STYLE_ROUNDED,a,b,d,g)+e(mxConstants.STYLE_ROTATION,a,b,d,g)+e(mxConstants.STYLE_FLIPH,a,b,d,g)+e(mxConstants.STYLE_FLIPV,a,b,d,g)+e(mxConstants.STYLE_SHADOW,a,b,d,g)+e(mxConstants.STYLE_FILLCOLOR,a,b,d,g)+e(mxConstants.STYLE_DASHED,a,b,d,g)+e(mxConstants.STYLE_STROKEWIDTH,a,b,d,g)+e(mxConstants.STYLE_IMAGE,a,b,d,g)}function e(g,c,e,f,h){a:{if(null!=c&&null!=g){if(c.includes(";"+g+"=")){c=!0;break a}if(c.substring(0,
 g.length+1)==g+"="){c=!0;break a}}c=!1}if(!c)switch(g){case mxConstants.STYLE_FONTSIZE:return b(e);case mxConstants.STYLE_FONTCOLOR:return a(e);case mxConstants.STYLE_FONTSTYLE:return d(e);case mxConstants.STYLE_ALIGN:return p(e);case mxConstants.STYLE_SPACING_LEFT:return y(e);case mxConstants.STYLE_SPACING_RIGHT:return z(e);case mxConstants.STYLE_SPACING_TOP:return x(e);case mxConstants.STYLE_SPACING_BOTTOM:return A(e);case mxConstants.STYLE_SPACING:return C(e);case mxConstants.STYLE_VERTICAL_ALIGN:return H(e);
-case mxConstants.STYLE_STROKECOLOR:return B(e,f);case mxConstants.STYLE_OPACITY:return E(e,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=e.Rounding&&0<e.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*e.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:a:{if(null!=e.Rotation&&(g=mxUtils.toDegree(parseFloat(e.Rotation)),"AdvancedSwimLaneBlockRotated"==f.Class?(g+=90,h.geometry.rotate90()):0<=mxUtils.indexOf(sb,f.Class)?(g-=90,h.geometry.rotate90(),h.geometry.rotate90(),h.geometry.rotate90()):
-0<=mxUtils.indexOf(ob,f.Class)&&(g+=180,h.geometry.rotate90(),h.geometry.rotate90()),0!=g)){f="rotation="+g+";";break a}f=""}return f;case mxConstants.STYLE_FLIPH:return f=e.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=e.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return F(e);case mxConstants.STYLE_FILLCOLOR:return M(e,f);case mxConstants.STYLE_DASHED:return ba(e);case mxConstants.STYLE_STROKEWIDTH:return T(e);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?
-"image="+e.URL+";":"UserImage2Block"==f.Class&&null!=e.ImageFillProps&&null!=e.ImageFillProps.url?"image="+e.ImageFillProps.url+";":"",f}return""}function b(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function a(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}
-function d(a){return g(m(a))}function g(a){if(null!=a){var b=0,d=!1;if(null!=a)for(var g=0;!d&&g<a.length;){var p=a[g];"b"==p.n&&null!=p.v&&p.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"i"==p.n&&null!=p.v&&p.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"u"==p.n&&null!=p.v&&p.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function p(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}
-function y(a){var b=m(a);if(null!=b)for(var d=0;d<b.length;){var g=b[d];if(null!=g.v){if("il"==g.n)return"spacingLeft="+.6*g.v+";";p(a)}d++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function A(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=
-d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"===typeof a.InsetMargin?"spacing="+parseInt(a.InsetMargin)+";":""}function H(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":ca(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function B(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":ca(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function E(a,b,d){b="";if("string"===typeof a.LineColor&&
-7<a.LineColor.length){var g="0x"+a.LineColor.substring(a.LineColor.length-2,a.LineColor.length);b+="strokeOpacity="+Math.round(parseInt(g)/2.55)+";"}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function F(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function M(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=
-a.FillColor.cs&&1<a.FillColor.cs.length)return ca(mxConstants.STYLE_FILLCOLOR,a.FillColor.cs[0].c.substring(0,7))+ca(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?ca(mxConstants.STYLE_FILLCOLOR,a.FillColor.substring(0,7),"#FFFFFF"):ca(mxConstants.STYLE_FILLCOLOR,"none");return""}function ba(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?
-"dashed=1;dashPattern=1 1;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,6)?"dashed=1;":""}function T(a){return ca(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(a.LineWidth),"1")}function O(a,b,d,g){for(var p=b,c=0;null!=g.getAttributeForCell(a,p);)c++,p=b+"_"+c;g.setAttributeForCell(a,p,null!=d?d:"")}function ga(a,b,d,g,p){var e=n(b);if(null!=e){var h=Da[e.Class];null!=h&&(a.style+=h+";");h=null!=e.Properties?e.Properties:e;if(null!=h){a.value=c(h);a.style+=f(a.style,h,e,a);a.style.includes("strokeColor")||
-(a.style+=B(h,e));for(var y in h)if(h.hasOwnProperty(y)&&y.toString().startsWith("ShapeData_"))try{var x=h[y],z=mxUtils.trim(x.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");O(a,z,x.Value,d)}catch(sc){window.console&&console.log("Ignored "+y+":",sc)}if(a.edge){a.style=null!=h.Rounding?a.style+("rounded=1;arcSize="+h.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=h.Shape)if(null!=h.ElbowPoints)for(a.geometry.points=[],e=0;e<h.ElbowPoints.length;e++)a.geometry.points.push(new mxPoint(Math.round(.6*
-h.ElbowPoints[e].x+0),Math.round(.6*h.ElbowPoints[e].y+0)));else"elbow"==h.Shape?a.style=null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":a.style+"edgeStyle=elbowEdgeStyle;":null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==h.Shape&&(a.style+="curved=1;"));null!=h.Endpoint1.Style&&(null!=Ka[h.Endpoint1.Style]?a.style+="startArrow="+Ka[h.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+
-h.Endpoint1.Style));null!=h.Endpoint2.Style&&(null!=Ka[h.Endpoint2.Style]?a.style+="endArrow="+Ka[h.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+h.Endpoint2.Style));y=!1;if(null==h.ElbowPoints&&null!=h.Endpoint1.Block&&h.Endpoint1.Block==h.Endpoint2.Block)if(null!=h.ElbowControlPoints)for(a.geometry.points=[],e=0;e<h.ElbowControlPoints.length;e++)p=h.ElbowControlPoints[e],a.geometry.points.push(new mxPoint(Math.round(.6*p.x+0),Math.round(.6*
-p.y+0)));else null!=g&&null!=p&&(g=new mxPoint(Math.round(g.geometry.x+g.geometry.width*h.Endpoint1.LinkX),Math.round(g.geometry.y+g.geometry.height*h.Endpoint1.LinkY)),p=new mxPoint(Math.round(p.geometry.x+p.geometry.width*h.Endpoint2.LinkX),Math.round(p.geometry.y+p.geometry.height*h.Endpoint2.LinkY)),a.geometry.points=[new mxPoint(g.x+20,g.y),new mxPoint(p.x+20,p.y)],y=!0);ia(a,h.Endpoint1,!0,y);ia(a,h.Endpoint2,!1,y)}}}null!=b.id&&O(a,"lucidchartObjectId",b.id,d)}function Z(a,b){var d=n(a).Properties.BoundingBox;
-null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+0),Math.round(.6*d.y+0),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;ga(v,a,b);return v}function Y(a,b,d){var p=2*(parseFloat(a.Location)-.5);d=mxCell;var e=c(a),p=new mxGeometry(p,0,0,0),y="11",f="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var f=g(a.Value.m),x=0;x<a.Value.m.length;x++)"s"==a.Value.m[x].n?
-y=.6*parseFloat(a.Value.m[x].v):"c"==a.Value.m[x].n&&(f+="fontColor="+a.Value.m[x].v+";");a=new d(e,p,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(f+";fontSize="+y+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function ca(a,b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function ia(a,b,d,g){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(g?"":(d?"exitY":"entryY")+"="+b.LinkY+
-";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function Ea(a,b,d,g,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var g=null!=d.Endpoint1.Block?y[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block?y[d.Endpoint2.Block]:null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;ga(c,b,a,g,p);var e=n(b).Properties,f=null!=e?e.TextAreas:b.TextAreas;if(null!=f){for(var l=0;null!=f["t"+l];){var x=f["t"+l];c=Y(x,c);l++}for(l=0;null!=f["m"+l]||1>
-l;)x=f["m"+l],null!=x&&(c=Y(x,c,b)),l++;null!=f.Text&&(c=Y(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=Y(f.Message,c,b))}null==g&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);h.push(a.addCell(c,null,null,g,p))},h=[],y={},f=[],x=[],z=0;if(null!=b.Groups)for(var k in b.Groups){var A=
-b.Groups[k];A.id=k;if(1==A.Hidden&&null!=A.Members){0>mxUtils.indexOf(x,k)&&x.push(k);for(var m in A.Members)x=Fa(m,b.Groups,x)}}if(null!=b.Blocks)for(k in b.Blocks)A=b.Blocks[k],A.id=k,0>mxUtils.indexOf(x,k)&&(m=!1,null!=Da[A.Class]&&"mxCompositeShape"==Da[A.Class]&&(y[A.id]=Pa(A,h,a),f.push(A),m=!0),m||(y[A.id]=Z(A,a),f.push(A)));else for(z=0;z<b.Objects.length;z++)A=b.Objects[z],null!=A.Action&&"mxCompositeShape"==Da[A.Action.Class]?y[A.id]=Pa(A,h,a):A.IsBlock&&null!=A.Action&&null!=A.Action.Properties&&
-(y[A.id]=Z(A,a)),f.push(A);if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(x,k)&&(A=b.Lines[k],A.id=k,f.push(A));f.sort(function(a,b){a=n(a);b=n(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,g=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=g?d-g:0});for(z=0;z<f.length;z++){var A=f[z],C=y[A.id];null!=C?h.push(a.addCell(C)):A.IsLine&&null!=A.Action&&null!=A.Action.Properties?e(A,A.Action.Properties):null!=A.StrokeStyle&&e(A,A)}if(p&&null!=d&&null!=g){a.isGridEnabled()&&
-(d=a.snap(d),g=a.snap(g));var l=a.getBoundingBoxFromGeometry(h,!0);null!=l&&a.moveCells(h,d-l.x,g-l.y)}c||a.setSelectionCells(h)}finally{a.getModel().endUpdate()}}function da(){var a=new Graph;a.setExtendParents(!1);a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function La(a,b,d,g,p,c,e,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);
-a.insertEdge(d,!0);c.push(d);g.push(p.addCell(d,null,null,null,null))}function oa(a,b,d,g,p,c,e,y,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("",new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);y=[d];p=p.clone();a.insertEdge(p,!0);d.insertEdge(p,!1);y.push(p);c.push(e.addCell(p,null,null,null,null))}function fa(a,b,d,g,p,e){g.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";
-g.style+=f(g.style,p,e,g);b=c(p);g.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");a.style+=f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;g.insert(a)}function ja(a,b,d,g,p,e,y,x){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+
-"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,y,x,e);e.value=c(y);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*g*b,.7*g*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*g*.35,10+(1-d)*g*.35);a.vertex=!0;a.style+=f(a.style,y,x,a);e.insert(a)}function Pa(g,e,m){var u=n(g),h=u.Properties,O=h.BoundingBox,t=Math.round(.6*
-O.w),r=Math.round(.6*O.h),Z=Math.round(.6*O.x+0),Y=Math.round(.6*O.y+0);null==g.Class||"GCPInputDatabase"!==g.Class&&"GCPInputRecord"!==g.Class&&"GCPInputPayment"!==g.Class&&"GCPInputGateway"!==g.Class&&"GCPInputLocalCompute"!==g.Class&&"GCPInputBeacon"!==g.Class&&"GCPInputStorage"!==g.Class&&"GCPInputList"!==g.Class&&"GCPInputStream"!==g.Class&&"GCPInputMobileDevices"!==g.Class&&"GCPInputCircuitBoard"!==g.Class&&"GCPInputLive"!==g.Class&&"GCPInputUsers"!==g.Class&&"GCPInputLaptop"!==g.Class&&"GCPInputApplication"!==
-g.Class&&"GCPInputLightbulb"!==g.Class&&"GCPInputGame"!==g.Class&&"GCPInputDesktop"!==g.Class&&"GCPInputDesktopAndMobile"!==g.Class&&"GCPInputWebcam"!==g.Class&&"GCPInputSpeaker"!==g.Class&&"GCPInputRetail"!==g.Class&&"GCPInputReport"!==g.Class&&"GCPInputPhone"!==g.Class&&"GCPInputBlank"!==g.Class||(r+=20);v=new mxCell("",new mxGeometry(Z,Y,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(null!=g.Class?g.Class:null!=u?u.Class:null){case "BraceNoteBlock":case "UI2BraceNoteBlock":var ia=!1;null!=
-h.BraceDirection&&"Right"==h.BraceDirection&&(ia=!0);var Ea=null,da=null;ia?(Ea=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),da=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(Ea=new mxCell("",new mxGeometry(0,0,.125*r,r),"shape=curlyBracket;rounded=1;flipH=1;"),da=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);Ea.vertex=
-!0;v.insert(Ea);Ea.style+=f(Ea.style,h,u,Ea);da.vertex=!0;da.value=c(h);v.insert(da);da.style+=f(da.style,h,u,da);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var ca=0;null!=h.Lanes&&(ca=h.Lanes.length);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);for(var sb=0,Da=[],l=0;l<ca;l++){var Pa=parseFloat(h.Lanes[l].p);Da.push(new mxCell("",new mxGeometry(t*sb,0,t*Pa,r),"shape=swimlane;startSize=25;"));Da[l].vertex=!0;v.insert(Da[l]);Da[l].value=c(h["Lane_"+
-l]);Da[l].style+=b(h["Lane_"+l])+a(h["Lane_"+l])+d(h["Lane_"+l])+p(h["Lane_"+l],Da[l])+y(h["Lane_"+l])+z(h["Lane_"+l])+x(h["Lane_"+l])+A(h["Lane_"+l])+C(h["Lane_"+l])+H(h["Lane_"+l]);f(Da[l].style,h,u,Da[l]);sb+=Pa}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";var Ka=null,ob=null,Cb=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ka=new mxCell("",new mxGeometry(.112*t,.077*
-r,.77*t,.85*r),""),h.KeyboardShown&&(ob=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Cb=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ka=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&
-(ob=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Cb=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));Ka.vertex=!0;v.insert(Ka);"Dark"==h.Scheme?Ka.style+="fillColor=#111111;":"Light"==h.Scheme&&(Ka.style+="fillColor=#ffffff;");null!=ob&&(ob.vertex=!0,v.insert(ob));null!=Cb&&(Cb.vertex=!0,v.insert(Cb))}v.style+=f(v.style,
-h,u,v);break;case "AndroidAlertDialog":var Fa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Fa.vertex=!0;v.insert(Fa);var ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");ma.vertex=!0;v.insert(ma);var Db=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");Db.vertex=!0;v.insert(Db);var qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);var ra=
-new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);Fa.value=c(h.DialogTitle);Fa.style+=k(h.DialogTitle);Db.value=c(h.DialogText);Db.style+=k(h.DialogText);qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+="strokeColor=#353535;",ra.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+=
-"strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,h,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Fa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Fa.vertex=!0;v.insert(Fa);Fa.value=c(h.DialogTitle);Fa.style+=k(h.DialogTitle);ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");ma.vertex=!0;v.insert(ma);qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);
-qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);var rb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");rb.vertex=!0;v.insert(rb);var tb=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");tb.vertex=!0;v.insert(tb);var ub=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");
-ub.vertex=!0;v.insert(ub);var Eb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Eb.vertex=!0;v.insert(Eb);Eb.value=c(h.Label_1);Eb.style+=k(h.Label_1);var Fb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(h.Label_0);Fb.style+=k(h.Label_0);var vb=null;"AndroidDateDialog"==g.Class&&(vb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),vb.vertex=!0,v.insert(vb),
-vb.value=c(h.Label_2),vb.style+=k(h.Label_2));var Qa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var Ra=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ra.vertex=!0;v.insert(Ra);var ic=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");ic.vertex=!0;v.insert(ic);var Gb=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);
-Gb.value=c(h.Label_4);Gb.style+=k(h.Label_4);var wb=null;"AndroidTimeDialog"==g.Class&&(wb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),wb.vertex=!0,v.insert(wb),wb.value=c(h.Label_Colon),wb.style+=k(h.Label_Colon));var Hb=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(h.Label_3);Hb.style+=k(h.Label_3);var Ib=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");
-Ib.vertex=!0;v.insert(Ib);Ib.value=c(h.Label_5);Ib.style+=k(h.Label_5);var jc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");jc.vertex=!0;v.insert(jc);var kc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var lc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");lc.vertex=!0;v.insert(lc);var Jb=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");
-Jb.vertex=!0;v.insert(Jb);Jb.value=c(h.Label_7);Jb.style+=k(h.Label_7);var Kb=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=c(h.Label_6);Kb.style+=k(h.Label_6);var Lb=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Lb.vertex=!0;v.insert(Lb);Lb.value=c(h.Label_8);Lb.style+=k(h.Label_8);var xb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");xb.vertex=!0;v.insert(xb);
-var yb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");yb.vertex=!0;v.insert(yb);var zb=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");zb.vertex=!0;v.insert(zb);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+="strokeColor=#353535;",ra.style+="strokeColor=#353535;",rb.style+="strokeColor=none;fillColor=#7E7E7E;",tb.style+="strokeColor=none;fillColor=#7E7E7E;",ub.style+="strokeColor=none;fillColor=#7E7E7E;",
-xb.style+="strokeColor=none;fillColor=#7E7E7E;",yb.style+="strokeColor=none;fillColor=#7E7E7E;",zb.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;",rb.style+="strokeColor=none;fillColor=#939393;",tb.style+="strokeColor=none;fillColor=#939393;",ub.style+="strokeColor=none;fillColor=#939393;",xb.style+="strokeColor=none;fillColor=#939393;",yb.style+="strokeColor=none;fillColor=#939393;",
-zb.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,h,u,v);break;case "AndroidListItems":var xa=r,gb=0;if(h.ShowHeader){var gb=8,Mb=new mxCell("",new mxGeometry(0,0,t,gb),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(h.Header);Mb.style+=k(h.Header);var xa=xa-gb,mc=new mxCell("",new mxGeometry(0,gb-2,t,4),"shape=line;strokeColor=#999999;");mc.vertex=!0;v.insert(mc)}var Sa=parseInt(h.Items);0<Sa&&(xa/=Sa);for(var G=[],ma=[],l=0;l<Sa;l++)G[l]=new mxCell("",
-new mxGeometry(0,gb+l*xa,t,xa),"strokeColor=none;fillColor=none;"),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["Item_"+l]),G[l].style+=k(h["Item_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(0,gb+l*xa-2,t,4),"shape=line;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+"strokeColor=#ffffff;":ma[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;":v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;
-case "AndroidTabs":var Ta=parseInt(h.Tabs),Ga=t;0<Ta&&(Ga/=Ta);for(var ea=[],ma=[],l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,r),"strokeColor=none;fillColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(l*Ga-2,.2*r,4,.6*r),"shape=line;direction=north;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+"strokeColor=#484848;":ma[l].style+"strokeColor=#CCCCCC;");var nc=new mxCell("",
-new mxGeometry(h.Selected*Ga+2,r-3,Ga-4,3),"strokeColor=none;fillColor=#33B5E5;");nc.vertex=!0;v.insert(nc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=f(v.style,h,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Nb=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");
-Nb.vertex=!0;v.insert(Nb);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=f(v.style,h,u,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidTextBlock":v.style="Dark"==h.Scheme?h.ShowBorder?v.style+
-"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(h.Label);v.style+=k(h.Label);v.style+=f(v.style,h,u,v);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+="fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+=
-"fillColor=#ffffff;"}if(h.HighlightShow){var hb=null,hb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");hb.vertex=!0;v.insert(hb);switch(h.HighlightColor){case "Blue":hb.style+="fillColor=#33B5E5;";break;case "Dark Gray":hb.style+="fillColor=#B0B0B0;";break;case "White":hb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Ab=new mxCell("",new mxGeometry(20,5,2,r-10),"shape=line;direction=north;");Ab.vertex=!0;v.insert(Ab);
-switch(h.VlignColor){case "Blue":Ab.style+="strokeColor=#244C5A;";break;case "White":Ab.style+="strokeColor=#ffffff;"}}v.style+=f(v.style,h,u,v);break;case "AndroidButton":v.value=c(h.Label);v.style+=k(h.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=f(v.style,h,u,v);break;case "AndroidTextBox":v.value=c(h.Label);v.style+=k(h.Label);var Ob=new mxCell("",
-new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");Ob.vertex=!0;v.insert(Ob);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Ob.style=h.TextFocused?Ob.style+"strokeColor=#33B5E5;":Ob.style+"strokeColor=#A9A9A9;";v.style+=f(v.style,h,u,v);break;case "AndroidRadioButton":var pb=null;h.Checked&&(pb=new mxCell("",new mxGeometry(.15*t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),pb.vertex=
-!0,v.insert(pb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",h.Checked?(pb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(pb.style+="strokeColor=#999999;"));v.style+=f(v.style,h,u,v);break;case "AndroidCheckBox":var bc=null;h.Checked&&(bc=new mxCell("",new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),
-bc.vertex=!0,v.insert(bc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";
-v.style+=f(v.style,h,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,h,u,v);break;case "iOSSegmentedControl":Ta=parseInt(h.Tabs);Ga=t;v.style+="strokeColor=none;fillColor=none;";0<Ta&&(Ga/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,r),"strokeColor="+h.FillColor+";"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),ea[l].style=
-h.Selected==l?ea[l].style+M(h,u):ea[l].style+"fillColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=f(v.style,h,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Nb=new mxCell("",new mxGeometry(0,0,
-t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+M(h,u));Nb.vertex=!0;v.insert(Nb);v.style+=f(v.style,h,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=f(v.style,h,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var R=new mxCell(c(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=k(h.Text);var za=new mxCell(c(h.Carrier),new mxGeometry(.09*
-t,0,.2*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.Carrier);v.style+=f(v.style,h,u,v);break;case "iOSSearchBar":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v)+k(h.Search);v.value=c(h.Search);var V=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");V.vertex=!0;v.insert(V);break;case "iOSNavBar":v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+k(h.Title);
-v.style+=f(v.style,h,u,v);v.value=c(h.Title);R=new mxCell(c(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=k(h.LeftText);za=new mxCell(c(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.RightText);V=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");V.vertex=!0;v.insert(V);break;case "iOSTabs":Ta=
-parseInt(h.Tabs);Ga=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,h,u,v);0<Ta&&(Ga/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Ga,0,Ga,r),"strokeColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=b(h["Tab_"+l]),ea[l].style+=a(h["Tab_"+l])+d(h["Tab_"+l])+p(h["Tab_"+l])+y(h["Tab_"+l])+z(h["Tab_"+l])+x(h["Tab_"+l])+A(h["Tab_"+l])+C(h["Tab_"+l]),ea[l].style+="verticalAlign=bottom;",ea[l].style=
-h.Selected==l?ea[l].style+"fillColor=#BBBBBB;":ea[l].style+"fillColor=none;";break;case "iOSDatePicker":var Ua=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);var Va=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21);Va.style+=k(h.Option21);var Wa=new mxCell("",new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");
-Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);var Xa=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);var Ya=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);var Za=new mxCell("",new mxGeometry(.65*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=
-!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);var sa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);var ta=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);var $a=new mxCell("",new mxGeometry(.65*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;
-v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);var ua=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);var va=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);var ab=new mxCell("",new mxGeometry(.5*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);
-ab.value=c(h.Option24);ab.style+=k(h.Option24);var bb=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);var cb=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option44);cb.style+=k(h.Option44);var wa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=
-c(h.Option15);wa.style+=k(h.Option15);var db=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=c(h.Option25);db.style+=k(h.Option25);var eb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,
-.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSTimePicker":Ua=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);Va=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21);Va.style+=k(h.Option21);Xa=new mxCell("",new mxGeometry(0,
-.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);Ya=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);ta=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),
-"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);ua=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option33);ua.style+=k(h.Option33);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);ab=new mxCell("",new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");
-ab.vertex=!0;v.insert(ab);ab.value=c(h.Option24);ab.style+=k(h.Option24);cb=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option34);cb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);db=new mxCell("",new mxGeometry(.25*t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);
-db.value=c(h.Option25);db.style+=k(h.Option25);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSCountdownPicker":Wa=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);
-Za=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);ta=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);$a=new mxCell("",
-new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);ua=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);bb=new mxCell("",new mxGeometry(.45*
-t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);eb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");
-Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.text)+a(h.text)+d(h.text)+H(h.text);v.style+=f(v.style,h,u,v);v.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=
-new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);var la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*
-t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+
-a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);var na=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);
-break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;
-case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);na=null;switch(h.AccessoryIndicatorType){case "Disclosure":V=
+case mxConstants.STYLE_STROKECOLOR:return B(e,f);case mxConstants.STYLE_OPACITY:return E(e,f,h);case mxConstants.STYLE_ROUNDED:return f=!h.edge&&null!=e.Rounding&&0<e.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+.6*e.Rounding+";":"",f;case mxConstants.STYLE_ROTATION:return g="",null!=e.Rotation&&(e=mxUtils.toDegree(parseFloat(e.Rotation)),c=!0,"AdvancedSwimLaneBlockRotated"==f.Class?(e+=90,h.geometry.rotate90(),c=!1):0<=mxUtils.indexOf(tb,f.Class)?(e-=90,h.geometry.rotate90()):0<=mxUtils.indexOf(ob,
+f.Class)&&(e+=180),0!=e&&(g+="rotation="+e+";"),c||(g+="horizontal=0;")),g;case mxConstants.STYLE_FLIPH:return f=e.FlipX?"flipH=1;":"",f;case mxConstants.STYLE_FLIPV:return f=e.FlipY?"flipV=1;":"",f;case mxConstants.STYLE_SHADOW:return F(e);case mxConstants.STYLE_FILLCOLOR:return M(e,f);case mxConstants.STYLE_DASHED:return ba(e);case mxConstants.STYLE_STROKEWIDTH:return T(e);case mxConstants.STYLE_IMAGE:return f="ImageSearchBlock2"==f.Class?"image="+e.URL+";":"UserImage2Block"==f.Class&&null!=e.ImageFillProps&&
+null!=e.ImageFillProps.url?"image="+e.ImageFillProps.url+";":"",f}return""}function b(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("s"==d.n&&null!=d.v)return"fontSize="+Math.round(.6*d.v)+";";b++}return"fontSize=11;"}function a(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("c"==d.n&&null!=d.v)return a=d.v,"#"!=a.charAt(0)&&(a="#"+a),a=a.substring(0,7),mxConstants.STYLE_FONTCOLOR+"="+a+";";b++}return""}function d(a){return g(m(a))}function g(a){if(null!=a){var b=0,d=!1;
+if(null!=a)for(var g=0;!d&&g<a.length;){var p=a[g];"b"==p.n&&null!=p.v&&p.v&&(d=!0,b+=1);g++}d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"i"==p.n&&null!=p.v&&p.v&&(d=!0,b+=2),g++;d=!1;if(null!=a)for(g=0;!d&&g<a.length;)p=a[g],"u"==p.n&&null!=p.v&&p.v&&(d=!0,b+=4),g++;if(0<b)return"fontStyle="+b+";"}return""}function p(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("a"==d.n&&null!=d.v)return"align="+d.v+";";b++}return""}function y(a){var b=m(a);if(null!=b)for(var d=0;d<b.length;){var g=
+b[d];if(null!=g.v){if("il"==g.n)return"spacingLeft="+.6*g.v+";";p(a)}d++}return""}function z(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("ir"==d.n&&null!=d.v)return"spacingRight="+d.v+";";b++}return""}function x(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mt"==d.n&&null!=d.v)return"spacingTop="+d.v+";";b++}return""}function A(a){a=m(a);if(null!=a)for(var b=0;b<a.length;){var d=a[b];if("mb"==d.n&&null!=d.v)return"spacingBottom="+d.v+";";b++}return""}function C(a){return"number"===
+typeof a.InsetMargin?"spacing="+parseInt(a.InsetMargin)+";":""}function H(a){return null!=a.Text_VAlign&&"string"===typeof a.Text_VAlign?"verticalAlign="+a.Text_VAlign+";":ca(mxConstants.STYLE_VERTICAL_ALIGN,a.TextVAlign,"middle")}function B(a,b){return 0==a.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":ca(mxConstants.STYLE_STROKECOLOR,a.LineColor.substring(0,7),"#000000")}function E(a,b,d){b="";if("string"===typeof a.LineColor&&7<a.LineColor.length){var g="0x"+a.LineColor.substring(a.LineColor.length-
+2,a.LineColor.length);b+="strokeOpacity="+Math.round(parseInt(g)/2.55)+";"}"string"===typeof a.FillColor&&7<a.FillColor.length&&(a="0x"+a.FillColor.substring(a.FillColor.length-2,a.FillColor.length),d.style.includes("fillOpacity")||(b+="fillOpacity="+Math.round(parseInt(a)/2.55)+";"));return b}function F(a){return null!=a.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function M(a,b){if(null!=a.FillColor)if("object"===typeof a.FillColor){if(null!=a.FillColor.cs&&1<a.FillColor.cs.length)return ca(mxConstants.STYLE_FILLCOLOR,
+a.FillColor.cs[0].c.substring(0,7))+ca(mxConstants.STYLE_GRADIENTCOLOR,a.FillColor.cs[1].c.substring(0,7))}else return"string"===typeof a.FillColor?ca(mxConstants.STYLE_FILLCOLOR,a.FillColor.substring(0,7),"#FFFFFF"):ca(mxConstants.STYLE_FILLCOLOR,"none");return""}function ba(a){return"dotted"==a.StrokeStyle?"dashed=1;dashPattern=1 4;":"dashdot"==a.StrokeStyle?"dashed=1;dashPattern=10 5 1 5;":"dotdotdot"==a.StrokeStyle?"dashed=1;dashPattern=1 1;":null!=a.StrokeStyle&&"dashed"==a.StrokeStyle.substring(0,
+6)?"dashed=1;":""}function T(a){return ca(mxConstants.STYLE_STROKEWIDTH,.6*parseFloat(a.LineWidth),"1")}function O(a,b,d,g){for(var p=b,c=0;null!=g.getAttributeForCell(a,p);)c++,p=b+"_"+c;g.setAttributeForCell(a,p,null!=d?d:"")}function ga(a,b,d,g,p){var e=n(b);if(null!=e){var h=Da[e.Class];null!=h&&(a.style+=h+";");h=null!=e.Properties?e.Properties:e;if(null!=h){a.value=c(h);a.style+=f(a.style,h,e,a);a.style.includes("strokeColor")||(a.style+=B(h,e));if(null!=h.Link&&0<h.Link.length&&"ext"==h.Link[0].tp)d.setAttributeForCell(a,
+"link",h.Link[0].url);else if(null!=h.Text){a:{e=m(h.Text);if(null!=e)for(var y=0;y<e.length;y++)if(e[y].n=null!=e[y].v&&0<e[y].v.length&&"ext"==e[y].v[0].tp){e=e[y].v[0].url;break a}e=null}null!=e&&d.setAttributeForCell(a,"link",e)}var e=[],y=d.convertValueToString(a),x=!1;if(null!=y){for(var z=0;match=pb.exec(y);){var k=match[0],x=!0;if(2<k.length){var A=k.substring(2,k.length-2);"documentName"==A?A="filename":"date:"==A.substring(0,5)?A="date{"+A.substring(5).replace(/MMMM/g,"mmmm")+"}":"i18nDate:"==
+A.substring(0,9)&&(A="date{"+A.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");A="%"+A+"%";e.push(y.substring(z,match.index)+(null!=A?A:k));z=match.index+k.length}}x&&(e.push(y.substring(z)),d.setAttributeForCell(a,"label",e.join("")),d.setAttributeForCell(a,"placeholders","1"))}for(var u in h)if(h.hasOwnProperty(u)&&u.toString().startsWith("ShapeData_"))try{var C=h[u],H=mxUtils.trim(C.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
+"");O(a,H,C.Value,d)}catch(sc){window.console&&console.log("Ignored "+u+":",sc)}if(a.edge){a.style=null!=h.Rounding?a.style+("rounded=1;arcSize="+h.Rounding+";"):a.style+"rounded=0;";if("diagonal"!=h.Shape)if(null!=h.ElbowPoints)for(a.geometry.points=[],u=0;u<h.ElbowPoints.length;u++)a.geometry.points.push(new mxPoint(Math.round(.6*h.ElbowPoints[u].x+0),Math.round(.6*h.ElbowPoints[u].y+0)));else"elbow"==h.Shape?a.style=null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block?a.style+"edgeStyle=orthogonalEdgeStyle;":
+a.style+"edgeStyle=elbowEdgeStyle;":null!=h.Endpoint1.Block&&null!=h.Endpoint2.Block&&(a.style+="edgeStyle=orthogonalEdgeStyle;","curve"==h.Shape&&(a.style+="curved=1;"));null!=h.Endpoint1.Style&&(null!=Ja[h.Endpoint1.Style]?a.style+="startArrow="+Ja[h.Endpoint1.Style]+";":window.console&&console.log("Unknown endpoint style: "+h.Endpoint1.Style));null!=h.Endpoint2.Style&&(null!=Ja[h.Endpoint2.Style]?a.style+="endArrow="+Ja[h.Endpoint2.Style].replace(/startSize/g,"endSize")+";":window.console&&console.log("Unknown endpoint style: "+
+h.Endpoint2.Style));C=!1;if(null==h.ElbowPoints&&null!=h.Endpoint1.Block&&h.Endpoint1.Block==h.Endpoint2.Block)if(null!=h.ElbowControlPoints)for(a.geometry.points=[],u=0;u<h.ElbowControlPoints.length;u++)p=h.ElbowControlPoints[u],a.geometry.points.push(new mxPoint(Math.round(.6*p.x+0),Math.round(.6*p.y+0)));else null!=g&&null!=p&&(g=new mxPoint(Math.round(g.geometry.x+g.geometry.width*h.Endpoint1.LinkX),Math.round(g.geometry.y+g.geometry.height*h.Endpoint1.LinkY)),p=new mxPoint(Math.round(p.geometry.x+
+p.geometry.width*h.Endpoint2.LinkX),Math.round(p.geometry.y+p.geometry.height*h.Endpoint2.LinkY)),a.geometry.points=[new mxPoint(g.x+20,g.y),new mxPoint(p.x+20,p.y)],C=!0);ia(a,h.Endpoint1,!0,C);ia(a,h.Endpoint2,!1,C)}}}null!=b.id&&O(a,"lucidchartObjectId",b.id,d)}function Z(a,b){var d=n(a).Properties.BoundingBox;null==a.Class||"AWS"!==a.Class.substring(0,3)&&"Amazon"!==a.Class.substring(0,6)||a.Class.includes("AWS19")||(d.h-=20);v=new mxCell("",new mxGeometry(Math.round(.6*d.x+0),Math.round(.6*d.y+
+0),Math.round(.6*d.w),Math.round(.6*d.h)),"html=1;whiteSpace=wrap;");v.vertex=!0;ga(v,a,b);return v}function Y(a,b,d){var p=2*(parseFloat(a.Location)-.5);d=mxCell;var e=c(a),p=new mxGeometry(p,0,0,0),y="11",f="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var f=g(a.Value.m),x=0;x<a.Value.m.length;x++)"s"==a.Value.m[x].n?y=.6*parseFloat(a.Value.m[x].v):"c"==a.Value.m[x].n&&(f+="fontColor="+a.Value.m[x].v+";");a=new d(e,p,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+
+(f+";fontSize="+y+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function ca(a,b,d,g){null!=b&&null!=g&&(b=g(b));return null!=b&&b!=d?a+"="+b+";":""}function ia(a,b,d,g){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(d?"exitX":"entryX")+"="+b.LinkX+";"+(g?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function Ea(a,b,d,g,p,c){a.getModel().beginUpdate();try{var e=function(b,d){var g=null!=d.Endpoint1.Block?y[d.Endpoint1.Block]:null,p=null!=d.Endpoint2.Block?
+y[d.Endpoint2.Block]:null,c;c=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");c.geometry.relative=!0;c.edge=!0;ga(c,b,a,g,p);var e=n(b).Properties,f=null!=e?e.TextAreas:b.TextAreas;if(null!=f){for(var l=0;null!=f["t"+l];){var x=f["t"+l];c=Y(x,c);l++}for(l=0;null!=f["m"+l]||1>l;)x=f["m"+l],null!=x&&(c=Y(x,c,b)),l++;null!=f.Text&&(c=Y(f,c,b));f=null!=e?e.TextAreas:b.TextAreas;null!=f.Message&&(c=Y(f.Message,c,b))}null==g&&null!=d.Endpoint1&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*
+d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==p&&null!=d.Endpoint2&&c.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);h.push(a.addCell(c,null,null,g,p))},h=[],y={},f=[],x=[],z=0;if(null!=b.Groups)for(var k in b.Groups){var A=b.Groups[k];A.id=k;if(1==A.Hidden&&null!=A.Members){0>mxUtils.indexOf(x,k)&&x.push(k);for(var m in A.Members)x=Eb(m,b.Groups,x)}}if(null!=b.Blocks)for(k in b.Blocks)A=b.Blocks[k],A.id=k,0>mxUtils.indexOf(x,k)&&(m=!1,
+null!=Da[A.Class]&&"mxCompositeShape"==Da[A.Class]&&(y[A.id]=Pa(A,h,a),f.push(A),m=!0),m||(y[A.id]=Z(A,a),f.push(A)));else for(z=0;z<b.Objects.length;z++)A=b.Objects[z],null!=A.Action&&"mxCompositeShape"==Da[A.Action.Class]?y[A.id]=Pa(A,h,a):A.IsBlock&&null!=A.Action&&null!=A.Action.Properties&&(y[A.id]=Z(A,a)),f.push(A);if(null!=b.Lines)for(k in b.Lines)0>mxUtils.indexOf(x,k)&&(A=b.Lines[k],A.id=k,f.push(A));f.sort(function(a,b){a=n(a);b=n(b);var d=null!=a.Properties?a.Properties.ZOrder:a.ZOrder,
+g=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=g?d-g:0});for(z=0;z<f.length;z++){var A=f[z],u=y[A.id];null!=u?h.push(a.addCell(u)):A.IsLine&&null!=A.Action&&null!=A.Action.Properties?e(A,A.Action.Properties):null!=A.StrokeStyle&&e(A,A)}if(p&&null!=d&&null!=g){a.isGridEnabled()&&(d=a.snap(d),g=a.snap(g));var l=a.getBoundingBoxFromGeometry(h,!0);null!=l&&a.moveCells(h,d-l.x,g-l.y)}c||a.setSelectionCells(h)}finally{a.getModel().endUpdate()}}function da(){var a=new Graph;a.setExtendParents(!1);
+a.setExtendParentsOnAdd(!1);a.setConstrainChildren(!1);a.setHtmlLabels(!0);a.getModel().maintainEdgeParent=!1;return a}function Ka(a,b,d,g,p,c,e,y){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;e.insert(a);c=[a];d=d.clone();y.insertEdge(d,!1);a.insertEdge(d,!0);c.push(d);g.push(p.addCell(d,null,null,null,null))}function oa(a,b,d,g,p,c,e,y,f){a=new mxCell("",new mxGeometry(a,b,0,0),"strokeColor=none;fillColor=none;");a.vertex=!0;f.insert(a);d=new mxCell("",
+new mxGeometry(d,g,0,0),"strokeColor=none;fillColor=none;");d.vertex=!0;f.insert(d);y=[d];p=p.clone();a.insertEdge(p,!0);d.insertEdge(p,!1);y.push(p);c.push(e.addCell(p,null,null,null,null))}function fa(a,b,d,g,p,e){g.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";g.style+=f(g.style,p,e,g);b=c(p);g.vertex=!0;a=new mxCell(b,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+a+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
+a.style+=f(a.style,p,e,a);a.geometry.relative=!0;a.geometry.offset=new mxPoint(5,-12);a.vertex=!0;g.insert(a)}function ja(a,b,d,g,p,e,y,x){p="transparent"!=a?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";e.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";e.style+=f(e.style,y,x,e);e.value=c(y);e.vertex=!0;a=new mxCell(null,new mxGeometry(.5,0,.7*g*b,.7*g*d),p+a+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
+a.geometry.relative=!0;a.geometry.offset=new mxPoint(-b*g*.35,10+(1-d)*g*.35);a.vertex=!0;a.style+=f(a.style,y,x,a);e.insert(a)}function Pa(g,e,m){var u=n(g),h=u.Properties,O=h.BoundingBox,t=Math.round(.6*O.w),r=Math.round(.6*O.h),Z=Math.round(.6*O.x+0),Y=Math.round(.6*O.y+0);null==g.Class||"GCPInputDatabase"!==g.Class&&"GCPInputRecord"!==g.Class&&"GCPInputPayment"!==g.Class&&"GCPInputGateway"!==g.Class&&"GCPInputLocalCompute"!==g.Class&&"GCPInputBeacon"!==g.Class&&"GCPInputStorage"!==g.Class&&"GCPInputList"!==
+g.Class&&"GCPInputStream"!==g.Class&&"GCPInputMobileDevices"!==g.Class&&"GCPInputCircuitBoard"!==g.Class&&"GCPInputLive"!==g.Class&&"GCPInputUsers"!==g.Class&&"GCPInputLaptop"!==g.Class&&"GCPInputApplication"!==g.Class&&"GCPInputLightbulb"!==g.Class&&"GCPInputGame"!==g.Class&&"GCPInputDesktop"!==g.Class&&"GCPInputDesktopAndMobile"!==g.Class&&"GCPInputWebcam"!==g.Class&&"GCPInputSpeaker"!==g.Class&&"GCPInputRetail"!==g.Class&&"GCPInputReport"!==g.Class&&"GCPInputPhone"!==g.Class&&"GCPInputBlank"!==
+g.Class||(r+=20);v=new mxCell("",new mxGeometry(Z,Y,t,r),"html=1;whiteSpace=wrap;");v.vertex=!0;switch(null!=g.Class?g.Class:null!=u?u.Class:null){case "BraceNoteBlock":case "UI2BraceNoteBlock":var ia=!1;null!=h.BraceDirection&&"Right"==h.BraceDirection&&(ia=!0);var Ea=null,da=null;ia?(Ea=new mxCell("",new mxGeometry(t-.125*r,0,.125*r,r),"shape=curlyBracket;rounded=1;"),da=new mxCell("",new mxGeometry(0,0,t-.125*r,r),"strokeColor=none;fillColor=none;")):(Ea=new mxCell("",new mxGeometry(0,0,.125*r,
+r),"shape=curlyBracket;rounded=1;flipH=1;"),da=new mxCell("",new mxGeometry(.125*r,0,t-.125*r,r),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);Ea.vertex=!0;v.insert(Ea);Ea.style+=f(Ea.style,h,u,Ea);da.vertex=!0;da.value=c(h);v.insert(da);da.style+=f(da.style,h,u,da);break;case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":var ca=0;null!=h.Lanes&&(ca=h.Lanes.length);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,
+h,u,v);for(var tb=0,Da=[],l=0;l<ca;l++){var Pa=parseFloat(h.Lanes[l].p);Da.push(new mxCell("",new mxGeometry(t*tb,0,t*Pa,r),"shape=swimlane;startSize=25;"));Da[l].vertex=!0;v.insert(Da[l]);Da[l].value=c(h["Lane_"+l]);Da[l].style+=f(Da[l].style,h,u,Da[l])+b(h["Lane_"+l])+a(h["Lane_"+l])+d(h["Lane_"+l])+p(h["Lane_"+l],Da[l])+y(h["Lane_"+l])+z(h["Lane_"+l])+x(h["Lane_"+l])+A(h["Lane_"+l])+C(h["Lane_"+l])+H(h["Lane_"+l]);tb+=Pa}break;case "AndroidDevice":if(null!=h.AndroidDeviceName){v.style="fillColor=#000000;strokeColor=#000000;";
+var Ja=null,ob=null,Db=null;if("Tablet"==h.AndroidDeviceName||"Mini Tablet"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.tab2;",Ja=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.85*r),""),h.KeyboardShown&&(ob=new mxCell("",new mxGeometry(.112*t,.727*r,.77*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Db=new mxCell("",new mxGeometry(.112*t,.077*r,.77*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));else if("Large Phone"==
+h.AndroidDeviceName||"Phone"==h.AndroidDeviceName)v.style+="shape=mxgraph.android.phone2;",Ja=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.816*r),""),h.KeyboardShown&&(ob=new mxCell("",new mxGeometry(.04*t,.708*r,.92*t,.2*r),"shape=mxgraph.android.keyboard;")),h.FullScreen||(Db=new mxCell("",new mxGeometry(.04*t,.092*r,.92*t,.03*r),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*r+";"));Ja.vertex=!0;v.insert(Ja);"Dark"==h.Scheme?Ja.style+=
+"fillColor=#111111;":"Light"==h.Scheme&&(Ja.style+="fillColor=#ffffff;");null!=ob&&(ob.vertex=!0,v.insert(ob));null!=Db&&(Db.vertex=!0,v.insert(Db))}v.style+=f(v.style,h,u,v);break;case "AndroidAlertDialog":var Oa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Oa.vertex=!0;v.insert(Oa);var ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");ma.vertex=!0;v.insert(ma);var pb=new mxCell("",new mxGeometry(0,30,t,r-30),"strokeColor=none;fillColor=none;verticalAlign=top;");
+pb.vertex=!0;v.insert(pb);var qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);var ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);Oa.value=c(h.DialogTitle);Oa.style+=k(h.DialogTitle);pb.value=c(h.DialogText);pb.style+=k(h.DialogText);qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+=
+"strokeColor=#353535;",ra.style+="strokeColor=#353535;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;");v.style+=f(v.style,h,u,v);break;case "AndroidDateDialog":case "AndroidTimeDialog":Oa=new mxCell("",new mxGeometry(0,0,t,30),"strokeColor=none;fillColor=none;spacingLeft=9;");Oa.vertex=!0;v.insert(Oa);Oa.value=c(h.DialogTitle);Oa.style+=k(h.DialogTitle);ma=new mxCell("",new mxGeometry(0,25,t,10),"shape=line;strokeColor=#33B5E5;");
+ma.vertex=!0;v.insert(ma);qa=new mxCell("",new mxGeometry(0,r-25,.5*t,25),"fillColor=none;");qa.vertex=!0;v.insert(qa);qa.value=c(h.Button_0);qa.style+=k(h.Button_0);ra=new mxCell("",new mxGeometry(.5*t,r-25,.5*t,25),"fillColor=none;");ra.vertex=!0;v.insert(ra);ra.value=c(h.Button_1);ra.style+=k(h.Button_1);var sb=new mxCell("",new mxGeometry(.5*t-4,41,8,4),"shape=triangle;direction=north;");sb.vertex=!0;v.insert(sb);var ub=new mxCell("",new mxGeometry(.25*t-4,41,8,4),"shape=triangle;direction=north;");
+ub.vertex=!0;v.insert(ub);var vb=new mxCell("",new mxGeometry(.75*t-4,41,8,4),"shape=triangle;direction=north;");vb.vertex=!0;v.insert(vb);var Fb=new mxCell("",new mxGeometry(.375*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Fb.vertex=!0;v.insert(Fb);Fb.value=c(h.Label_1);Fb.style+=k(h.Label_1);var Gb=new mxCell("",new mxGeometry(.125*t,50,.2*t,15),"strokeColor=none;fillColor=none;");Gb.vertex=!0;v.insert(Gb);Gb.value=c(h.Label_0);Gb.style+=k(h.Label_0);var wb=null;"AndroidDateDialog"==g.Class&&
+(wb=new mxCell("",new mxGeometry(.625*t,50,.2*t,15),"strokeColor=none;fillColor=none;"),wb.vertex=!0,v.insert(wb),wb.value=c(h.Label_2),wb.style+=k(h.Label_2));var Qa=new mxCell("",new mxGeometry(.43*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var Ra=new mxCell("",new mxGeometry(.18*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Ra.vertex=!0;v.insert(Ra);var Eb=new mxCell("",new mxGeometry(.68*t,60,.14*t,10),"shape=line;strokeColor=#33B5E5;");Eb.vertex=!0;v.insert(Eb);
+var Hb=new mxCell("",new mxGeometry(.375*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Hb.vertex=!0;v.insert(Hb);Hb.value=c(h.Label_4);Hb.style+=k(h.Label_4);var xb=null;"AndroidTimeDialog"==g.Class&&(xb=new mxCell("",new mxGeometry(.3*t,65,.1*t,15),"strokeColor=none;fillColor=none;"),xb.vertex=!0,v.insert(xb),xb.value=c(h.Label_Colon),xb.style+=k(h.Label_Colon));var Ib=new mxCell("",new mxGeometry(.125*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Ib.vertex=!0;v.insert(Ib);Ib.value=c(h.Label_3);
+Ib.style+=k(h.Label_3);var Jb=new mxCell("",new mxGeometry(.625*t,65,.2*t,15),"strokeColor=none;fillColor=none;");Jb.vertex=!0;v.insert(Jb);Jb.value=c(h.Label_5);Jb.style+=k(h.Label_5);var jc=new mxCell("",new mxGeometry(.43*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");jc.vertex=!0;v.insert(jc);var kc=new mxCell("",new mxGeometry(.18*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");kc.vertex=!0;v.insert(kc);var lc=new mxCell("",new mxGeometry(.68*t,75,.14*t,10),"shape=line;strokeColor=#33B5E5;");
+lc.vertex=!0;v.insert(lc);var Kb=new mxCell("",new mxGeometry(.375*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Kb.vertex=!0;v.insert(Kb);Kb.value=c(h.Label_7);Kb.style+=k(h.Label_7);var Lb=new mxCell("",new mxGeometry(.125*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Lb.vertex=!0;v.insert(Lb);Lb.value=c(h.Label_6);Lb.style+=k(h.Label_6);var Mb=new mxCell("",new mxGeometry(.625*t,80,.2*t,15),"strokeColor=none;fillColor=none;");Mb.vertex=!0;v.insert(Mb);Mb.value=c(h.Label_8);Mb.style+=k(h.Label_8);
+var yb=new mxCell("",new mxGeometry(.5*t-4,99,8,4),"shape=triangle;direction=south;");yb.vertex=!0;v.insert(yb);var zb=new mxCell("",new mxGeometry(.25*t-4,99,8,4),"shape=triangle;direction=south;");zb.vertex=!0;v.insert(zb);var Ab=new mxCell("",new mxGeometry(.75*t-4,99,8,4),"shape=triangle;direction=south;");Ab.vertex=!0;v.insert(Ab);"Dark"==h.Scheme?(v.style+="strokeColor=#353535;fillColor=#282828;shadow=1;",qa.style+="strokeColor=#353535;",ra.style+="strokeColor=#353535;",sb.style+="strokeColor=none;fillColor=#7E7E7E;",
+ub.style+="strokeColor=none;fillColor=#7E7E7E;",vb.style+="strokeColor=none;fillColor=#7E7E7E;",yb.style+="strokeColor=none;fillColor=#7E7E7E;",zb.style+="strokeColor=none;fillColor=#7E7E7E;",Ab.style+="strokeColor=none;fillColor=#7E7E7E;"):(v.style+="strokeColor=none;fillColor=#ffffff;shadow=1;",qa.style+="strokeColor=#E2E2E2;",ra.style+="strokeColor=#E2E2E2;",sb.style+="strokeColor=none;fillColor=#939393;",ub.style+="strokeColor=none;fillColor=#939393;",vb.style+="strokeColor=none;fillColor=#939393;",
+yb.style+="strokeColor=none;fillColor=#939393;",zb.style+="strokeColor=none;fillColor=#939393;",Ab.style+="strokeColor=none;fillColor=#939393;");v.style+=f(v.style,h,u,v);break;case "AndroidListItems":var xa=r,gb=0;if(h.ShowHeader){var gb=8,Nb=new mxCell("",new mxGeometry(0,0,t,gb),"strokeColor=none;fillColor=none;");Nb.vertex=!0;v.insert(Nb);Nb.value=c(h.Header);Nb.style+=k(h.Header);var xa=xa-gb,mc=new mxCell("",new mxGeometry(0,gb-2,t,4),"shape=line;strokeColor=#999999;");mc.vertex=!0;v.insert(mc)}var Sa=
+parseInt(h.Items);0<Sa&&(xa/=Sa);for(var G=[],ma=[],l=0;l<Sa;l++)G[l]=new mxCell("",new mxGeometry(0,gb+l*xa,t,xa),"strokeColor=none;fillColor=none;"),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["Item_"+l]),G[l].style+=k(h["Item_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(0,gb+l*xa-2,t,4),"shape=line;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+"strokeColor=#ffffff;":ma[l].style+"strokeColor=#D9D9D9;");v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#111111;":
+v.style+"strokeColor=none;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidTabs":var Ta=parseInt(h.Tabs),Fa=t;0<Ta&&(Fa/=Ta);for(var ea=[],ma=[],l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;fillColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),0<l&&(ma[l]=new mxCell("",new mxGeometry(l*Fa-2,.2*r,4,.6*r),"shape=line;direction=north;"),ma[l].vertex=!0,v.insert(ma[l]),ma[l].style="Dark"==h.Scheme?ma[l].style+
+"strokeColor=#484848;":ma[l].style+"strokeColor=#CCCCCC;");var nc=new mxCell("",new mxGeometry(h.Selected*Fa+2,r-3,Fa-4,3),"strokeColor=none;fillColor=#33B5E5;");nc.vertex=!0;v.insert(nc);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#333333;":v.style+"strokeColor=none;fillColor=#DDDDDD;";v.style+=f(v.style,h,u,v);break;case "AndroidProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5*r)),"html=1;whiteSpace=wrap;");v.vertex=!0;var Ob=
+new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;fillColor=#33B5E5;");Ob.vertex=!0;v.insert(Ob);v.style="Dark"==h.Scheme?v.style+"strokeColor=none;fillColor=#474747;":v.style+"strokeColor=none;fillColor=#BBBBBB;";v.style+=f(v.style,h,u,v);break;case "AndroidImageBlock":v.style="Dark"==h.Scheme?v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#7E7E7E;fillColor=#111111;":v.style+"shape=mxgraph.mockup.graphics.simpleIcon;strokeColor=#939393;fillColor=#ffffff;";
+v.style+=f(v.style,h,u,v);break;case "AndroidTextBlock":v.style="Dark"==h.Scheme?h.ShowBorder?v.style+"fillColor=#111111;strokeColor=#ffffff;":v.style+"fillColor=#111111;strokeColor=none;":h.ShowBorder?v.style+"fillColor=#ffffff;strokeColor=#000000;":v.style+"fillColor=#ffffff;strokeColor=none;";v.value=c(h.Label);v.style+=k(h.Label);v.style+=f(v.style,h,u,v);break;case "AndroidActionBar":v.style+="strokeColor=none;";switch(h.BarBackground){case "Blue":v.style+="fillColor=#002E3E;";break;case "Gray":v.style+=
+"fillColor=#DDDDDD;";break;case "Dark Gray":v.style+="fillColor=#474747;";break;case "White":v.style+="fillColor=#ffffff;"}if(h.HighlightShow){var hb=null,hb=h.HighlightTop?new mxCell("",new mxGeometry(0,0,t,2),"strokeColor=none;"):new mxCell("",new mxGeometry(0,r-2,t,2),"strokeColor=none;");hb.vertex=!0;v.insert(hb);switch(h.HighlightColor){case "Blue":hb.style+="fillColor=#33B5E5;";break;case "Dark Gray":hb.style+="fillColor=#B0B0B0;";break;case "White":hb.style+="fillColor=#ffffff;"}}if(h.VlignShow){var Bb=
+new mxCell("",new mxGeometry(20,5,2,r-10),"shape=line;direction=north;");Bb.vertex=!0;v.insert(Bb);switch(h.VlignColor){case "Blue":Bb.style+="strokeColor=#244C5A;";break;case "White":Bb.style+="strokeColor=#ffffff;"}}v.style+=f(v.style,h,u,v);break;case "AndroidButton":v.value=c(h.Label);v.style+=k(h.Label)+"shape=partialRectangle;left=0;right=0;";v.style="Dark"==h.Scheme?v.style+"fillColor=#474747;strokeColor=#C6C5C6;bottom=0;":v.style+"fillColor=#DFE0DF;strokeColor=#C6C5C6;top=0;";v.style+=f(v.style,
+h,u,v);break;case "AndroidTextBox":v.value=c(h.Label);v.style+=k(h.Label);var Pb=new mxCell("",new mxGeometry(2,r-6,t-4,4),"shape=partialRectangle;top=0;fillColor=none;");Pb.vertex=!0;v.insert(Pb);v.style="Dark"==h.Scheme?v.style+"fillColor=#111111;strokeColor=none;":v.style+"fillColor=#ffffff;strokeColor=none;";Pb.style=h.TextFocused?Pb.style+"strokeColor=#33B5E5;":Pb.style+"strokeColor=#A9A9A9;";v.style+=f(v.style,h,u,v);break;case "AndroidRadioButton":var qb=null;h.Checked&&(qb=new mxCell("",new mxGeometry(.15*
+t,.15*r,.7*t,.7*r),"shape=ellipse;fillColor=#33B5E5;strokeWidth=0.6;"),qb.vertex=!0,v.insert(qb));"Dark"==h.Scheme?(v.style+="shape=ellipse;strokeWidth=0.6;strokeColor=#272727;",h.Checked?(qb.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;strokeWidth=0.6;fillColor=#ffffff;strokeColor=#5C5C5C;",h.Checked&&(qb.style+="strokeColor=#999999;"));v.style+=f(v.style,h,u,v);break;case "AndroidCheckBox":var cc=null;h.Checked&&(cc=new mxCell("",
+new mxGeometry(.25*t,.05*-r,t,.8*r),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),cc.vertex=!0,v.insert(cc));v.style="Dark"==h.Scheme?v.style+"strokeWidth=0.6;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=0.6;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=f(v.style,h,u,v);break;case "AndroidToggle":v.style="Dark"==h.Scheme?h.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":h.Checked?
+v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=f(v.style,h,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+h.BarPosition+";fillColor=#33b5e5;";v.style+=f(v.style,h,u,v);break;case "iOSSegmentedControl":Ta=parseInt(h.Tabs);Fa=t;v.style+="strokeColor=none;fillColor=none;";0<Ta&&(Fa/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor="+
+h.FillColor+";"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=k(h["Tab_"+l]),ea[l].style=h.Selected==l?ea[l].style+M(h,u):ea[l].style+"fillColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+h.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*h.BarPosition+";";v.style+=f(v.style,h,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(Y+.25*r),Math.round(t),Math.round(.5*
+r)),"html=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;Ob=new mxCell("",new mxGeometry(0,0,t*h.BarPosition,Math.round(.5*r)),"strokeColor=none;"+M(h,u));Ob.vertex=!0;v.insert(Ob);v.style+=f(v.style,h,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=f(v.style,h,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var R=new mxCell(c(h.Text),new mxGeometry(.35*t,0,.3*t,r),"strokeColor=none;fillColor=none;");
+R.vertex=!0;v.insert(R);R.style+=k(h.Text);var za=new mxCell(c(h.Carrier),new mxGeometry(.09*t,0,.2*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.Carrier);v.style+=f(v.style,h,u,v);break;case "iOSSearchBar":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v)+k(h.Search);v.value=c(h.Search);var V=new mxCell("",new mxGeometry(.3*t,.3*r,.4*r,.4*r),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");V.vertex=!0;v.insert(V);break;case "iOSNavBar":v.style+=
+"shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;";+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title);R=new mxCell(c(h.LeftText),new mxGeometry(.03*t,0,.3*t,r),"strokeColor=none;fillColor=none;");R.vertex=!0;v.insert(R);R.style+=k(h.LeftText);za=new mxCell(c(h.RightText),new mxGeometry(.65*t,0,.3*t,r),"strokeColor=none;fillColor=none;");za.vertex=!0;v.insert(za);za.style+=k(h.RightText);V=new mxCell("",new mxGeometry(.02*t,.2*r,.3*r,.5*r),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");
+V.vertex=!0;v.insert(V);break;case "iOSTabs":Ta=parseInt(h.Tabs);Fa=t;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=f(v.style,h,u,v);0<Ta&&(Fa/=Ta);ea=[];ma=[];for(l=0;l<Ta;l++)ea[l]=new mxCell("",new mxGeometry(l*Fa,0,Fa,r),"strokeColor=none;"),ea[l].vertex=!0,v.insert(ea[l]),ea[l].value=c(h["Tab_"+l]),ea[l].style+=b(h["Tab_"+l]),ea[l].style+=a(h["Tab_"+l])+d(h["Tab_"+l])+p(h["Tab_"+l])+y(h["Tab_"+l])+z(h["Tab_"+l])+x(h["Tab_"+l])+A(h["Tab_"+l])+C(h["Tab_"+
+l]),ea[l].style+="verticalAlign=bottom;",ea[l].style=h.Selected==l?ea[l].style+"fillColor=#BBBBBB;":ea[l].style+"fillColor=none;";break;case "iOSDatePicker":var Ua=new mxCell("",new mxGeometry(0,0,.5*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);var Va=new mxCell("",new mxGeometry(.5*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21);Va.style+=k(h.Option21);var Wa=new mxCell("",
+new mxGeometry(.65*t,0,.15*t,.2*r),"strokeColor=none;fillColor=none;");Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);var Xa=new mxCell("",new mxGeometry(0,.2*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);var Ya=new mxCell("",new mxGeometry(.5*t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);var Za=new mxCell("",new mxGeometry(.65*
+t,.2*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);var sa=new mxCell("",new mxGeometry(0,.4*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);var ta=new mxCell("",new mxGeometry(.5*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);var $a=new mxCell("",new mxGeometry(.65*t,.4*
+r,.15*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);var ua=new mxCell("",new mxGeometry(.8*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);var va=new mxCell("",new mxGeometry(0,.6*r,.5*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);var ab=new mxCell("",new mxGeometry(.5*t,.6*r,.15*
+t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option24);ab.style+=k(h.Option24);var bb=new mxCell("",new mxGeometry(.65*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);var cb=new mxCell("",new mxGeometry(.8*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option44);cb.style+=k(h.Option44);var wa=new mxCell("",new mxGeometry(0,.8*r,.5*t,.2*
+r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);var db=new mxCell("",new mxGeometry(.5*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=c(h.Option25);db.style+=k(h.Option25);var eb=new mxCell("",new mxGeometry(.65*t,.8*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");
+Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSTimePicker":Ua=new mxCell("",new mxGeometry(0,0,.25*t,.2*r),"strokeColor=none;fillColor=none;");Ua.vertex=!0;v.insert(Ua);Ua.value=c(h.Option11);Ua.style+=k(h.Option11);Va=new mxCell("",new mxGeometry(.25*t,0,.3*t,.2*r),"strokeColor=none;fillColor=none;");Va.vertex=!0;v.insert(Va);Va.value=c(h.Option21);
+Va.style+=k(h.Option21);Xa=new mxCell("",new mxGeometry(0,.2*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");Xa.vertex=!0;v.insert(Xa);Xa.value=c(h.Option12);Xa.style+=k(h.Option12);Ya=new mxCell("",new mxGeometry(.25*t,.2*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");Ya.vertex=!0;v.insert(Ya);Ya.value=c(h.Option22);Ya.style+=k(h.Option22);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);
+ta=new mxCell("",new mxGeometry(.25*t,.4*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);ta.value=c(h.Option23);ta.style+=k(h.Option23);ua=new mxCell("",new mxGeometry(.7*t,.4*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option33);ua.style+=k(h.Option33);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);va.style+=k(h.Option14);ab=new mxCell("",
+new mxGeometry(.25*t,.6*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");ab.vertex=!0;v.insert(ab);ab.value=c(h.Option24);ab.style+=k(h.Option24);cb=new mxCell("",new mxGeometry(.7*t,.6*r,.15*t,.2*r),"strokeColor=none;fillColor=none;");cb.vertex=!0;v.insert(cb);cb.value=c(h.Option34);cb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);db=new mxCell("",new mxGeometry(.25*
+t,.8*r,.3*t,.2*r),"strokeColor=none;fillColor=none;");db.vertex=!0;v.insert(db);db.value=c(h.Option25);db.style+=k(h.Option25);Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSCountdownPicker":Wa=new mxCell("",new mxGeometry(.45*t,0,.2*t,.2*r),"strokeColor=none;fillColor=none;");
+Wa.vertex=!0;v.insert(Wa);Wa.value=c(h.Option31);Wa.style+=k(h.Option31);Za=new mxCell("",new mxGeometry(.45*t,.2*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");Za.vertex=!0;v.insert(Za);Za.value=c(h.Option32);Za.style+=k(h.Option32);sa=new mxCell("",new mxGeometry(0,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");sa.vertex=!0;v.insert(sa);sa.value=c(h.Option13);sa.style+=k(h.Option13);ta=new mxCell("",new mxGeometry(.2*t,.4*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");ta.vertex=!0;v.insert(ta);
+ta.value=c(h.Option23);ta.style+=k(h.Option23);$a=new mxCell("",new mxGeometry(.45*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");$a.vertex=!0;v.insert($a);$a.value=c(h.Option33);$a.style+=k(h.Option33);ua=new mxCell("",new mxGeometry(.6*t,.4*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");ua.vertex=!0;v.insert(ua);ua.value=c(h.Option43);ua.style+=k(h.Option43);va=new mxCell("",new mxGeometry(0,.6*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");va.vertex=!0;v.insert(va);va.value=c(h.Option14);
+va.style+=k(h.Option14);bb=new mxCell("",new mxGeometry(.45*t,.6*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");bb.vertex=!0;v.insert(bb);bb.value=c(h.Option34);bb.style+=k(h.Option34);wa=new mxCell("",new mxGeometry(0,.8*r,.25*t,.2*r),"strokeColor=none;fillColor=none;");wa.vertex=!0;v.insert(wa);wa.value=c(h.Option15);wa.style+=k(h.Option15);eb=new mxCell("",new mxGeometry(.45*t,.8*r,.2*t,.2*r),"strokeColor=none;fillColor=none;");eb.vertex=!0;v.insert(eb);eb.value=c(h.Option35);eb.style+=k(h.Option35);
+Qa=new mxCell("",new mxGeometry(0,.4*r-2,t,4),"shape=line;strokeColor=#888888;");Qa.vertex=!0;v.insert(Qa);Ra=new mxCell("",new mxGeometry(0,.6*r-2,t,4),"shape=line;strokeColor=#888888;");Ra.vertex=!0;v.insert(Ra);v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);break;case "iOSBasicCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;spacing=0;align=left;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.text)+a(h.text)+d(h.text)+H(h.text);v.style+=
+f(v.style,h,u,v);v.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);var la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
+la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSSubtitleCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=top;spacingLeft="+
+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);var na=new mxCell("",new mxGeometry(0,.4*r,t,.6*r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=bottom;spacingLeft="+.6*h.SeparatorInset+";");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");
+V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=
+!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSRightDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;align=left;spacing=0;verticalAlign=middle;spacingLeft="+.6*h.SeparatorInset+";";v.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);v.style+=f(v.style,h,u,v);v.value=c(h.subtext);na=null;switch(h.AccessoryIndicatorType){case "Disclosure":V=
 new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);na=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
 la.vertex=!0;v.insert(la);na=new mxCell("",new mxGeometry(.45*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);na=new mxCell("",new mxGeometry(.52*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;");
-V.vertex=!0;v.insert(V);na=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:na=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=f(v.style,h,u,v);var Na=new mxCell("",
-new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Na.vertex=!0;v.insert(Na);Na.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);Na.value=c(h.subtext);na=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",
+V.vertex=!0;v.insert(V);na=new mxCell("",new mxGeometry(.55*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;");break;default:na=new mxCell("",new mxGeometry(.65*t,0,.3*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;")}na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);break;case "iOSLeftDetailCell":v.style+="shape=partialRectangle;left=0;top=0;right=0;fillColor=#ffffff;strokeColor=#C8C7CC;";v.style+=f(v.style,h,u,v);var Ma=new mxCell("",
+new mxGeometry(0,0,.25*t,r),"fillColor=none;strokeColor=none;spacing=0;align=right;verticalAlign=middle;spacingRight=3;");Ma.vertex=!0;v.insert(Ma);Ma.style+=b(h.subtext)+a(h.subtext)+d(h.subtext);Ma.value=c(h.subtext);na=new mxCell("",new mxGeometry(.25*t,0,.5*t,r),"fillColor=none;strokeColor=none;spacing=0;align=left;verticalAlign=middle;spacingLeft=3;");na.vertex=!0;v.insert(na);na.style+=b(h.text)+a(h.text)+d(h.text);na.value=c(h.text);switch(h.AccessoryIndicatorType){case "Disclosure":V=new mxCell("",
 new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);break;case "DetailDisclosure":V=new mxCell("",new mxGeometry(.91*t,.35*r,.15*r,.3*r),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");V.vertex=!0;v.insert(V);la=new mxCell("",new mxGeometry(.79*t,.25*r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "DetailIndicator":la=new mxCell("",new mxGeometry(.87*t,.25*
 r,.5*r,.5*r),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");la.vertex=!0;v.insert(la);break;case "CheckMark":V=new mxCell("",new mxGeometry(.89*t,.37*r,.4*r,.26*r),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),V.vertex=!0,v.insert(V)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";R=new mxCell("",new mxGeometry(0,0,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");
 R.vertex=!0;v.insert(R);R.style+=b(h.text)+a(h.text)+d(h.text);R.value=c(h.text);za=new mxCell("",new mxGeometry(0,.6*r,t,.4*r),"fillColor=none;strokeColor=none;spacing=10;align=left;");za.vertex=!0;v.insert(za);za.style+=b(h["bottom-text"])+a(h["bottom-text"])+d(h["bottom-text"]);za.value=c(h["bottom-text"]);break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.style+=b(h.text)+a(h.text)+d(h.text);v.value=c(h.text);v.style+=f(v.style,
@@ -100,10 +101,10 @@ q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.9*r),"part=1;");q.vertex=!0;v.insert
 !0;v.insert(jb);da=new mxCell("",new mxGeometry(.25*r,0,t-.5*r,r),"strokeColor=none;fillColor=none;");da.vertex=!0;da.value=c(h);v.insert(da);v.style="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);ib.style+=E(h,u,ib);jb.style+=E(h,u,jb);da.style+=a(h,da);ib.style+=f(ib.style,h,u,ib);jb.style+=f(jb.style,h,u,jb);da.style+=f(da.style,h,u,da);break;case "UMLTextBlock":v.style+="strokeColor=none;"+k(h.Text);v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "BPMNActivity":switch(h.bpmnActivityType){case 1:v.style+=
 k(h.Text);v.value=c(h.Text);break;case 2:v.style+="shape=ext;double=1;"+k(h.Text);v.value=c(h.Text);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 1;"+k(h.Text);v.value=c(h.Text);break;case 4:v.style+="shape=ext;strokeWidth=2;"+k(h.Text),v.value=c(h.Text)}if(0!=h.bpmnTaskType){switch(h.bpmnTaskType){case 1:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=new mxPoint(4,7);break;case 2:q=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");q.geometry.offset=
 new mxPoint(4,7);break;case 3:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");q.geometry.offset=new mxPoint(4,5);break;case 4:q=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");q.geometry.offset=new mxPoint(4,7);break;case 5:q=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");q.geometry.offset=new mxPoint(4,7);break;case 6:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");q.geometry.offset=
-new mxPoint(4,5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Pb=M(h,u),I=B(h,u),I=I.replace("strokeColor","fillColor"),Pb=Pb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Pb&&(Pb="strokeColor=#ffffff;");q.style+=Pb+I+"part=1;"}else q.style+=M(h,u)+B(h,u)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var Qb=0;0!=h.bpmnActivityMarker1&&Qb++;0!=h.bpmnActivityMarker2&&
-Qb++;var Aa=0;1==Qb?Aa=-7.5:2==Qb&&(Aa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Aa,
+new mxPoint(4,5);break;case 7:q=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),q.geometry.offset=new mxPoint(4,5)}if(1==h.bpmnTaskType){var Qb=M(h,u),I=B(h,u),I=I.replace("strokeColor","fillColor"),Qb=Qb.replace("fillColor","strokeColor");""==I&&(I="fillColor=#000000;");""==Qb&&(Qb="strokeColor=#ffffff;");q.style+=Qb+I+"part=1;"}else q.style+=M(h,u)+B(h,u)+"part=1;";q.geometry.relative=!0;q.vertex=!0;v.insert(q)}var Rb=0;0!=h.bpmnActivityMarker1&&Rb++;0!=h.bpmnActivityMarker2&&
+Rb++;var Aa=0;1==Rb?Aa=-7.5:2==Rb&&(Aa=-19);if(0!=h.bpmnActivityMarker1){switch(h.bpmnActivityMarker1){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Aa,
 -20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Aa,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),
-q.geometry.offset=new mxPoint(Aa,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}2==Qb&&(Aa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,
+q.geometry.offset=new mxPoint(Aa,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}2==Rb&&(Aa=5);if(0!=h.bpmnActivityMarker2){switch(h.bpmnActivityMarker2){case 1:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 2:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 3:q=new mxCell("",new mxGeometry(.5,
 1,15,15),"shape=parallelMarker;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 4:q=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");q.geometry.offset=new mxPoint(Aa,-20);q.style+=M(h,u)+B(h,u);break;case 5:q=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");q.geometry.offset=new mxPoint(Aa,-17);I=B(h,u);I=I.replace("strokeColor","fillColor");""==I&&(I="fillColor=#000000;");
 q.style+=I;break;case 6:q=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),q.geometry.offset=new mxPoint(Aa,-18),q.style+=M(h,u)+B(h,u)}q.geometry.relative=!0;q.vertex=!0;v.insert(q)}v.style+=f(v.style,h,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);if(1==h.bpmnDashed)switch(h.bpmnEventGroup){case 0:v.style+="outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;
 case 2:v.style+="outline=end;"}else switch(h.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(h.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";
@@ -117,7 +118,7 @@ k(h.Text);v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeom
 g.Class&&(q=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),q.geometry.relative=!0,q.geometry.offset=new mxPoint(4,-13),q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q));R=new mxCell("",new mxGeometry(0,0,t,15),"strokeColor=none;fillColor=none;part=1;");R.vertex=!0;v.insert(R);R.value=c(h.Title);R.style+=k(h.Title);break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=c(h.Text);
 v.style+=f(v.style,h,u,v);R=new mxCell("",new mxGeometry(.1*t,.3*r,.8*t,.6*r),"part=1;");R.vertex=!0;v.insert(R);R.value=c(h.Resource);R.style+=k(h.Resource);R.style+=f(R.style,h,u,R);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);var xa=r,Sa=parseInt(h.Cells),
 N=f("part=1;",h,u,v);0<Sa&&(xa/=Sa);G=[];ma=[];for(l=1;l<=Sa;l++)G[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),N),G[l].vertex=!0,v.insert(G[l]),G[l].value=c(h["cell_"+l]),G[l].style+=k(h["cell_"+l]);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);xa=r;Sa=parseInt(h.Cells);N=f("part=1;fillColor=none;",
-h,u,v);0<Sa&&(xa/=Sa);G=[];Na=[];for(l=1;l<=Sa;l++)G[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*xa,.5*t,xa),"shape=partialRectangle;left=0;"+N),G[l].vertex=!0,v.insert(G[l]),Na[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),"strokeColor=none;fillColor=none;part=1;"),Na[l].vertex=!0,v.insert(Na[l]),Na[l].value=c(h["cell_"+l]),Na[l].style+=k(h["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,h,u,v);v.value=
+h,u,v);0<Sa&&(xa/=Sa);G=[];Ma=[];for(l=1;l<=Sa;l++)G[l]=new mxCell("",new mxGeometry(.5*t,(l-1)*xa,.5*t,xa),"shape=partialRectangle;left=0;"+N),G[l].vertex=!0,v.insert(G[l]),Ma[l]=new mxCell("",new mxGeometry(0,(l-1)*xa,t,xa),"strokeColor=none;fillColor=none;part=1;"),Ma[l].vertex=!0,v.insert(Ma[l]),Ma[l].value=c(h["cell_"+l]),Ma[l].style+=k(h["cell_"+l]);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=f(v.style,h,u,v);v.value=
 "FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.17*t,.2*r,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";N="shape=card;size=18;flipH=1;part=1;";q=new mxCell("",new mxGeometry(.1*t,0,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+
 N);q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.05*t,.1*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+N);w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);var D=new mxCell("",new mxGeometry(0,.2*r,.9*t,.8*r),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+N);D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);D.value=c(h.Text);break;case "AWSRoundedRectangleContainerBlock2":v.style+=
 "strokeColor=none;fillColor=none;";h.Spotfleet?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,35,40),"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30,
@@ -128,17 +129,17 @@ new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=ce
 0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30,0),w.vertex=!0,v.insert(w)):h.Corporate?(q=new mxCell("",new mxGeometry(0,0,t,r-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),
 q.geometry.offset=new mxPoint(0,20),q.geometry.relative=!0,q.vertex=!0,v.insert(q),q.style+=f(q.style,h,u,q),q.value=c(h.Title),w=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(30,0),w.vertex=!0,v.insert(w)):(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.style+=f(v.style,h,u,v),v.value=c(h.Title));
 break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";
-v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var W=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");W.vertex=!0;v.insert(W);var aa=[W];W.style+=M(h,u);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;La(.5*t,0,S,e,m,aa,
-v,W);La(.855*t,.145*r,S,e,m,aa,v,W);La(t,.5*r,S,e,m,aa,v,W);La(.855*t,.855*r,S,e,m,aa,v,W);La(.5*t,r,S,e,m,aa,v,W);La(.145*t,.855*r,S,e,m,aa,v,W);La(0,.5*r,S,e,m,aa,v,W);La(.145*t,.145*r,S,e,m,aa,v,W);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";W=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");W.vertex=
-!0;v.insert(W);aa=[W];S=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;for(var aa=[W],Rb=t/h.NumTopNodes,l=0;l<h.NumTopNodes;l++)La(.5*Rb+l*Rb,0,S,e,m,aa,v,W);Rb=t/h.NumBottomNodes;for(l=0;l<h.NumBottomNodes;l++)La(.5*Rb+l*Rb,r,S,e,m,aa,v,W);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);h.ToggleCharge&&(v.style+=
+v.style+=f(v.style,h,u,v);v.value=c(h.Title);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";var W=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"html=1;shape=ellipse;perimeter=ellipsePerimeter;strokeColor=#29AAE1;strokeWidth=2;");W.vertex=!0;v.insert(W);var aa=[W];W.style+=M(h,u);var S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;Ka(.5*t,0,S,e,m,aa,
+v,W);Ka(.855*t,.145*r,S,e,m,aa,v,W);Ka(t,.5*r,S,e,m,aa,v,W);Ka(.855*t,.855*r,S,e,m,aa,v,W);Ka(.5*t,r,S,e,m,aa,v,W);Ka(.145*t,.855*r,S,e,m,aa,v,W);Ka(0,.5*r,S,e,m,aa,v,W);Ka(.145*t,.145*r,S,e,m,aa,v,W);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";W=new mxCell("",new mxGeometry(0,.5*r-10,t,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");W.vertex=
+!0;v.insert(W);aa=[W];S=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");S.geometry.relative=!0;S.edge=!0;for(var aa=[W],Sb=t/h.NumTopNodes,l=0;l<h.NumTopNodes;l++)Ka(.5*Sb+l*Sb,0,S,e,m,aa,v,W);Sb=t/h.NumBottomNodes;for(l=0;l<h.NumBottomNodes;l++)Ka(.5*Sb+l*Sb,r,S,e,m,aa,v,W);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.style+=f(v.style,h,u,v);v.value=c(h.Title);h.ToggleCharge&&(v.style+=
 "flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);"EIMessageChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDatatypeChannelBlock"==g.Class?(q=
 new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIInvalidMessageChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(.45*-t,0)):"EIDeadLetterChannelBlock"==g.Class?(q=new mxCell("",new mxGeometry(.5,.5,.9*t,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),q.geometry.offset=
 new mxPoint(.45*-t,0)):"EIGuaranteedDeliveryBlock"==g.Class&&(q=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),q.geometry.offset=new mxPoint(-10,-7));q.geometry.relative=!0;q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");S.geometry.relative=!0;S.edge=!0;oa(.15*t,.25*r,.85*t,.25*r,S,e,m,aa,v,W);break;case "EIChannelAdapterBlock":v.style+=
 "verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,.07*r,.21*t,.86*r),"fillColor=#FFFF33;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.26*t,.09*r,.2*t,.82*r),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("",new mxGeometry(1,.5,.35*t,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
 D.geometry.relative=!0;D.geometry.offset=new mxPoint(.4*-t,-10);D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");K.geometry.relative=!0;K.edge=!0;q.insertEdge(K,!0);w.insertEdge(K,!1);K.style+=B(h,u);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
-J.geometry.relative=!0;J.edge=!0;w.insertEdge(J,!0);D.insertEdge(J,!1);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var Sb=
-h.Messages,cc=(r-17)/Sb,w=[],S=[],l=0;l<Sb;l++){var Tb=cc*(l+1)-3;w[l]=new mxCell("",new mxGeometry(t-20,Tb,20,20),"part=1;");w[l].vertex=!0;v.insert(w[l]);switch(g.Class){case "EIMessageBlock":w[l].value=c(h["message_"+(l+1)]);w.style+=k(h["message_"+(l+1)]);break;case "EICommandMessageBlock":w[l].value="C";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":w[l].value="D";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":w[l].value="E",w[l].style+="fontStyle=1;fontSize=11;"}w[l].style+=
-f(w[l].style,h,u,w[l]);S[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S[l].geometry.relative=!0;S[l].edge=!0;q.insertEdge(S[l],!1);w[l].insertEdge(S[l],!0);S[l].style+=f(S[l].style,h,u,S[l]);var kb=[];kb.push(new mxPoint(Z+8.5,Y+Tb+10));S[l].geometry.points=kb;e.push(m.addCell(S[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,
+J.geometry.relative=!0;J.edge=!0;w.insertEdge(J,!0);D.insertEdge(J,!1);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var Tb=
+h.Messages,dc=(r-17)/Tb,w=[],S=[],l=0;l<Tb;l++){var Ub=dc*(l+1)-3;w[l]=new mxCell("",new mxGeometry(t-20,Ub,20,20),"part=1;");w[l].vertex=!0;v.insert(w[l]);switch(g.Class){case "EIMessageBlock":w[l].value=c(h["message_"+(l+1)]);w.style+=k(h["message_"+(l+1)]);break;case "EICommandMessageBlock":w[l].value="C";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIDocumentMessageBlock":w[l].value="D";w[l].style+="fontStyle=1;fontSize=11;";break;case "EIEventMessageBlock":w[l].value="E",w[l].style+="fontStyle=1;fontSize=11;"}w[l].style+=
+f(w[l].style,h,u,w[l]);S[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");S[l].geometry.relative=!0;S[l].edge=!0;q.insertEdge(S[l],!1);w[l].insertEdge(S[l],!0);S[l].style+=f(S[l].style,h,u,S[l]);var kb=[];kb.push(new mxPoint(Z+8.5,Y+Ub+10));S[l].geometry.points=kb;e.push(m.addCell(S[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,
 h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.45*t,.25*r,.3*t,.5*r),"part=1;fillColor=#ffffff");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);S=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");S.geometry.relative=!0;S.edge=!0;oa(0,.5*r,.4*t,.5*r,S,e,m,aa,v,W);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,
 u,v);v.value=c(h.Text);var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.85*t,.5*r,K,e,m,aa,v,W);var J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.85*t,.15*r,J,e,m,aa,v,W);var Q=new mxCell("",
 new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");Q.geometry.relative=!0;Q.edge=!0;oa(.05*t,.5*r,.85*t,.85*r,Q,e,m,aa,v,W);break;case "EIMessageBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=4;startArrow=block;startFill=1;startSize=4;");
@@ -153,21 +154,21 @@ Q.geometry.relative=!0;Q.edge=!0;q.insertEdge(Q,!1);D.insertEdge(Q,!0);Q.style+=
 w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("3",new mxGeometry(.7*t,.4*r,.1*t,.19*r),"fontStyle=1;fillColor=#ffffff;fontSize=11;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);K=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.geometry.points=[new mxPoint(Z+.375*t,Y+.15*r)];K.geometry.relative=!0;K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",
 new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");w.insertEdge(J,!1);D.insertEdge(J,!0);J.geometry.points=[new mxPoint(Z+.675*t,Y+.15*r)];J.geometry.relative=!0;J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.3*t,.2*r,.4*t,.6*r),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");
 q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.38*t,.42*r,.24*t,.16*r),"part=1;fillColor=#aefe7d;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);w=new mxCell("",new mxGeometry(.38*t,0,.24*t,.16*r),"part=1;");w.vertex=!0;v.insert(w);w.style+=f(w.style,h,u,w);D=new mxCell("",new mxGeometry(.76*
-t,.23*r,.24*t,.16*r),"");D.vertex=!0;v.insert(D);D.style=w.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=w.style;var Xb=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Xb.vertex=!0;v.insert(Xb);Xb.style=w.style;var Yb=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");Yb.vertex=!0;v.insert(Yb);Yb.style=w.style;var Zb=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");Zb.vertex=!0;v.insert(Zb);Zb.style=w.style;K=new mxCell("",
+t,.23*r,.24*t,.16*r),"");D.vertex=!0;v.insert(D);D.style=w.style;var P=new mxCell("",new mxGeometry(.76*t,.61*r,.24*t,.16*r),"");P.vertex=!0;v.insert(P);P.style=w.style;var Yb=new mxCell("",new mxGeometry(.38*t,.84*r,.24*t,.16*r),"");Yb.vertex=!0;v.insert(Yb);Yb.style=w.style;var Zb=new mxCell("",new mxGeometry(0,.61*r,.24*t,.16*r),"");Zb.vertex=!0;v.insert(Zb);Zb.style=w.style;var $b=new mxCell("",new mxGeometry(0,.23*r,.24*t,.16*r),"");$b.vertex=!0;v.insert($b);$b.style=w.style;K=new mxCell("",
 new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(K,!1);w.insertEdge(K,!0);K.edge=!0;K.style+=f(K.style,h,u,K);e.push(m.addCell(K,null,null,null,null));J=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(J,!1);D.insertEdge(J,!0);J.edge=!0;J.style+=f(J.style,h,u,J);e.push(m.addCell(J,null,null,null,null));Q=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(Q,!1);P.insertEdge(Q,!0);Q.edge=!0;Q.style+=f(Q.style,h,u,Q);e.push(m.addCell(Q,
-null,null,null,null));ka=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(ka,!1);Xb.insertEdge(ka,!0);ka.edge=!0;ka.style+=f(ka.style,h,u,ka);e.push(m.addCell(ka,null,null,null,null));var lb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(lb,!1);Yb.insertEdge(lb,!0);lb.edge=!0;lb.style+=f(lb.style,h,u,lb);e.push(m.addCell(lb,null,null,null,null));var mb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(mb,!1);Zb.insertEdge(mb,
+null,null,null,null));ka=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(ka,!1);Yb.insertEdge(ka,!0);ka.edge=!0;ka.style+=f(ka.style,h,u,ka);e.push(m.addCell(ka,null,null,null,null));var lb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(lb,!1);Zb.insertEdge(lb,!0);lb.edge=!0;lb.style+=f(lb.style,h,u,lb);e.push(m.addCell(lb,null,null,null,null));var mb=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");q.insertEdge(mb,!1);$b.insertEdge(mb,
 !0);mb.edge=!0;mb.style+=f(mb.style,h,u,mb);e.push(m.addCell(mb,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");K.geometry.relative=!0;K.edge=!0;oa(.05*t,.5*r,.6*t,.25*r,K,e,m,aa,v,W);J=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
 J.geometry.relative=!0;J.edge=!0;oa(.05*t,.5*r,.6*t,.75*r,J,e,m,aa,v,W);q=new mxCell("",new mxGeometry(.7*t,.1*r,.15*t,.32*r),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(.25*t,.25*r,.5*t,.5*r),"shape=mxgraph.eip.control_bus;part=1;");q.vertex=!0;v.insert(q);q.style+=
 f(q.style,h,u,q);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,0,17,17),"shape=ellipse;fillColor=#808080;part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);D=new mxCell("",new mxGeometry(t-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");D.vertex=!0;v.insert(D);D.style+=f(D.style,h,u,D);Q=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Q.geometry.relative=!0;Q.edge=!0;q.insertEdge(Q,!1);D.insertEdge(Q,!0);Q.style+=f(Q.style,h,u,Q);Q.geometry.points=[new mxPoint(Z+8.5,Y+40)];e.push(m.addCell(Q,null,null,null,null));P=new mxCell("",new mxGeometry(t-45,r-20,20,20),"part=1;");P.vertex=!0;v.insert(P);P.value=c(h.message_0);P.style+=k(h.message_0);P.style+=f(P.style,h,u,P);ka=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");
-ka.geometry.relative=!0;ka.edge=!0;q.insertEdge(ka,!1);P.insertEdge(ka,!0);ka.style+=f(ka.style,h,u,ka);ka.geometry.points=[new mxPoint(Z+8.5,Y+r-10)];e.push(m.addCell(ka,null,null,null,null));Sb=h.HistoryMessages;cc=(r-75)/Sb;w=[];S=[];for(l=0;l<Sb;l++)Tb=cc*(l+1)+30,w[l]=new mxCell("",new mxGeometry(t-20,Tb,20,20),"part=1;"),w[l].vertex=!0,w[l].value=c(h["message_"+(l+1)]),w.style+=k(h["message_"+(l+1)]),v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]),S[l]=new mxCell("",new mxGeometry(0,0,0,0),
-"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),S[l].geometry.relative=!0,S[l].edge=!0,D.insertEdge(S[l],!1),w[l].insertEdge(S[l],!0),S[l].style+=f(S[l].style,h,u,S[l]),kb=[],kb.push(new mxPoint(Z+t-30,Y+Tb+10)),S[l].geometry.points=kb,e.push(m.addCell(S[l],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";
-0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var w=[],pc=.02*t,dc=(t-2*pc)/h.LightCount,qc=.8*dc,l=0;l<h.LightCount;l++)w[l]=new mxCell("",new mxGeometry(pc+dc*l+(dc-qc)/2,.25*r,qc,.75*r),"part=1;shape=ellipse;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]);
+ka.geometry.relative=!0;ka.edge=!0;q.insertEdge(ka,!1);P.insertEdge(ka,!0);ka.style+=f(ka.style,h,u,ka);ka.geometry.points=[new mxPoint(Z+8.5,Y+r-10)];e.push(m.addCell(ka,null,null,null,null));Tb=h.HistoryMessages;dc=(r-75)/Tb;w=[];S=[];for(l=0;l<Tb;l++)Ub=dc*(l+1)+30,w[l]=new mxCell("",new mxGeometry(t-20,Ub,20,20),"part=1;"),w[l].vertex=!0,w[l].value=c(h["message_"+(l+1)]),w.style+=k(h["message_"+(l+1)]),v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]),S[l]=new mxCell("",new mxGeometry(0,0,0,0),
+"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),S[l].geometry.relative=!0,S[l].edge=!0,D.insertEdge(S[l],!1),w[l].insertEdge(S[l],!0),S[l].style+=f(S[l].style,h,u,S[l]),kb=[],kb.push(new mxPoint(Z+t-30,Y+Ub+10)),S[l].geometry.points=kb,e.push(m.addCell(S[l],null,null,null,null));break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";
+0<h.DoorAngle&&(v.style+="flipV=1;");v.style+=f(v.style,h,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=new mxCell("",new mxGeometry(0,0,t,.25*r),"part=1;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);for(var w=[],pc=.02*t,ec=(t-2*pc)/h.LightCount,qc=.8*ec,l=0;l<h.LightCount;l++)w[l]=new mxCell("",new mxGeometry(pc+ec*l+(ec-qc)/2,.25*r,qc,.75*r),"part=1;shape=ellipse;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=f(w[l].style,h,u,w[l]);
 break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);for(var q=[],rc=t/h.SinkCount,l=0;l<h.SinkCount;l++)q[l]=new mxCell("",new mxGeometry(rc*l,0,rc,r),"part=1;shape=mxgraph.floorplan.sink_2;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Ba=.1*t/h.StallCount,q=new mxCell("",new mxGeometry(0,0,Ba,r),"fillColor=#000000;part=1;");q.vertex=!0;v.insert(q);q.style+=
-f(q.style,h,u,q);for(var Ma=(t-Ba)/h.StallCount,ec=[],Ub=[],Vb=[],Wb=[],I=B(h,u),I=""==I?"#000000;":I.replace("stokreColor=",""),$b="part=1;fillColor="+I,$b=$b+f($b,h,u,v),fc=f("",h,u,v),l=0;l<h.StallCount;l++)ec[l]=new mxCell("",new mxGeometry((l+1)*Ma,0,Ba,r),$b),ec[l].vertex=!0,v.insert(ec[l]),Vb[l]=new mxCell("",new mxGeometry(Ba+l*Ma+.05*(Ma-Ba),r-.92*(Ma-Ba),.9*(Ma-Ba),.92*(Ma-Ba)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Vb[l].vertex=!0,v.insert(Vb[l]),Vb[l].style+=fc,Ub[l]=new mxCell("",
-new mxGeometry(Ba+l*Ma+.2*(Ma-Ba),0,.6*(Ma-Ba),.8*(Ma-Ba)),"shape=mxgraph.floorplan.toilet;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].style+=fc,Wb[l]=new mxCell("",new mxGeometry(Ba+l*Ma,.42*r,.15*(Ma-Ba),.12*(Ma-Ba)),"part=1;"),Wb[l].vertex=!0,v.insert(Wb[l]),Wb[l].style+=fc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Oa="edgeStyle=none;endArrow=none;part=1;";Oa.style+=f(Oa.style,h,u,Oa);var I=B(h,u),I=""==I?"#000000;":I.replace("strokeColor=",""),nb="shape=triangle;part=1;fillColor="+
-I,nb=nb+f(nb,h,u,v),K=new mxCell("",new mxGeometry(0,0,0,0),Oa);K.geometry.relative=!0;K.edge=!0;oa(0,.5*r,.65*t,.5*r,K,e,m,aa,v,W);for(var L=r/h.numLines,J=[],qb=[],l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Oa),J[l].geometry.relative=!0,J[l].edge=!0,oa(.65*t,.5*r,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),qb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),qb[l].vertex=!0,v.insert(qb[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Oa="edgeStyle=none;endArrow=none;part=1;";
-Oa.style+=f(Oa.style,h,u,Oa);I=B(h,u);I=""==I?"#000000;":I.replace("strokeColor=","");nb="shape=triangle;part=1;fillColor="+I;nb+=f(nb,h,u,v);L=r/h.numLines;J=[];qb=[];for(l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Oa),J[l].geometry.relative=!0,J[l].edge=!0,oa(0,(l+.5)*L,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),qb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),qb[l].vertex=!0,v.insert(qb[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
+f(q.style,h,u,q);for(var La=(t-Ba)/h.StallCount,fc=[],Vb=[],Wb=[],Xb=[],I=B(h,u),I=""==I?"#000000;":I.replace("stokreColor=",""),ac="part=1;fillColor="+I,ac=ac+f(ac,h,u,v),gc=f("",h,u,v),l=0;l<h.StallCount;l++)fc[l]=new mxCell("",new mxGeometry((l+1)*La,0,Ba,r),ac),fc[l].vertex=!0,v.insert(fc[l]),Wb[l]=new mxCell("",new mxGeometry(Ba+l*La+.05*(La-Ba),r-.92*(La-Ba),.9*(La-Ba),.92*(La-Ba)),"shape=mxgraph.floorplan.doorRight;flipV=1;part=1;"),Wb[l].vertex=!0,v.insert(Wb[l]),Wb[l].style+=gc,Vb[l]=new mxCell("",
+new mxGeometry(Ba+l*La+.2*(La-Ba),0,.6*(La-Ba),.8*(La-Ba)),"shape=mxgraph.floorplan.toilet;part=1;"),Vb[l].vertex=!0,v.insert(Vb[l]),Vb[l].style+=gc,Xb[l]=new mxCell("",new mxGeometry(Ba+l*La,.42*r,.15*(La-Ba),.12*(La-Ba)),"part=1;"),Xb[l].vertex=!0,v.insert(Xb[l]),Xb[l].style+=gc;break;case "PEOneToMany":v.style+="strokeColor=none;fillColor=none;";var Na="edgeStyle=none;endArrow=none;part=1;";Na.style+=f(Na.style,h,u,Na);var I=B(h,u),I=""==I?"#000000;":I.replace("strokeColor=",""),nb="shape=triangle;part=1;fillColor="+
+I,nb=nb+f(nb,h,u,v),K=new mxCell("",new mxGeometry(0,0,0,0),Na);K.geometry.relative=!0;K.edge=!0;oa(0,.5*r,.65*t,.5*r,K,e,m,aa,v,W);for(var L=r/h.numLines,J=[],rb=[],l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Na),J[l].geometry.relative=!0,J[l].edge=!0,oa(.65*t,.5*r,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEMultilines":v.style+="strokeColor=none;fillColor=none;";Na="edgeStyle=none;endArrow=none;part=1;";
+Na.style+=f(Na.style,h,u,Na);I=B(h,u);I=""==I?"#000000;":I.replace("strokeColor=","");nb="shape=triangle;part=1;fillColor="+I;nb+=f(nb,h,u,v);L=r/h.numLines;J=[];rb=[];for(l=0;l<h.numLines;l++)J[l]=new mxCell("",new mxGeometry(0,0,0,0),Na),J[l].geometry.relative=!0,J[l].edge=!0,oa(0,(l+.5)*L,.96*t,(l+.5)*L,J[l],e,m,aa,v,W),rb[l]=new mxCell("",new mxGeometry(.95*t,(l+.2)*L,.05*t,.6*L),nb),rb[l].vertex=!0,v.insert(rb[l]);break;case "PEVesselBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
 v.value=c(h.Text);switch(h.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=f(v.style,h,u,v);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);1==h.peakedRoof&&0==h.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==h.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");v.style+=f(v.style,
 h,u,v);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=c(h.Text);v.style=0==h.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=f(v.style,h,u,v);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);v.value=c(h.Text);q=new mxCell("",new mxGeometry(0,.2*r,t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
 q.vertex=!0;v.insert(q);q.style+=N;q.style+=f(q.style,h,u,q);N="endSize=4;endArrow=block;endFill=1;";0==h.compressorType?(K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=!0,K.style+=N,K.style+=f(K.style,h,u,K),oa(0,0,0,.2*r,K,e,m,aa,v,W),J=new mxCell("",new mxGeometry(0,0,0,0),""),J.geometry.relative=!0,J.edge=!0,J.style+=N,J.style+=f(J.style,h,u,J),oa(t,.67*r,t,r,J,e,m,aa,v,W)):(q.style+="flipH=1;",K=new mxCell("",new mxGeometry(0,0,0,0),""),K.geometry.relative=!0,K.edge=
@@ -175,7 +176,7 @@ q.vertex=!0;v.insert(q);q.style+=N;q.style+=f(q.style,h,u,q);N="endSize=4;endArr
 new mxGeometry(.2*t,.2*r,.6*t,.6*r),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");q.vertex=!0;v.insert(q);q.style+=f(q.style,h,u,q);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(g.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=inst;";
 break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=f(v.style,h,u,v);"PEIndicator2Block"==g.Class||"PESharedIndicator2Block"==g.Class?(q=new mxCell("",new mxGeometry(0,0,t,.5*t),"part=1;strokeColor=none;fillColor=none;"),
 q.vertex=!0,v.insert(q),q.style+=k(h.TopText),q.style+=f(q.style,h,u,q),q.value=c(h.TopText),w=new mxCell("",new mxGeometry(0,.5*t,t,.5*t),"part=1;strokeColor=none;fillColor=none;")):(q=new mxCell("",new mxGeometry(0,0,t,.5*r),"part=1;strokeColor=none;fillColor=none;"),q.vertex=!0,v.insert(q),q.style+=k(h.TopText),q.style+=f(q.style,h,u,q),q.value=c(h.TopText),w=new mxCell("",new mxGeometry(0,.5*r,t,.5*r),"part=1;strokeColor=none;fillColor=none;"));w.vertex=!0;v.insert(w);w.style+=k(h.BotText);w.style+=
-f(w.style,h,u,w);w.value=c(h.BotText);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var gc=!1;"PEPoweredValveBlock"==g.Class?1!=h.poweredHandOperated&&(gc=!0):1!=h.handOperated&&(gc=!0);if(gc){var h=n(g).Properties,O=h.BoundingBox,
+f(w.style,h,u,w);w.value=c(h.BotText);switch(h.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var hc=!1;"PEPoweredValveBlock"==g.Class?1!=h.poweredHandOperated&&(hc=!0):1!=h.handOperated&&(hc=!0);if(hc){var h=n(g).Properties,O=h.BoundingBox,
 tc=O.h;O.h="PEAngleValveBlock"==g.Class||"PEAngleGlobeValveBlock"==g.Class?.7*O.h:.6*O.h;v=new mxCell("",new mxGeometry(Math.round(.6*O.x+0),Math.round(.6*(O.y+tc-O.h)+0),Math.round(.6*O.w),Math.round(.6*O.h)),"");v.vertex=!0;ga(v,g)}if("PEPoweredValveBlock"==g.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=f(v.style,h,u,v),1==h.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",q=new mxCell("",new mxGeometry(.325*t,0,.35*t,.35*
 r),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),q.vertex=!0,v.insert(q),q.style+="fontSize=6;"+a(h.PoweredText)+d(h.PoweredText)+p(h.PoweredText)+y(h.PoweredText)+z(h.PoweredText)+A(h.PoweredText)+C(h.PoweredText)+H(h.PoweredText),q.style+=f(q.style,h,u,q),q.value=c(h.PoweredText)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=c(h.Text);switch(g.Class){case "PEGateValveBlock":v.style+="valveType=gate;";
 break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==h.handOperated&&(v.style+="actuator=man;")}v.style+=f(v.style,h,u,v);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==h.vScroll&&(D=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
@@ -188,15 +189,15 @@ new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.s
 r-(h.Panels-h.Selected)*L+(l-h.Selected)*L,t,L),"part=1;fillColor=#000000;fillOpacity=25;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Panel_"+(l+1)]),q[l].value=c(h["Panel_"+(l+1)]),0>q[l].style.indexOf(";align=")&&(q[l].style+="align=left;spacingLeft=5;");var ha=B(h,u),ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
 new mxCell("",new mxGeometry(1,0,20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,h.Selected*L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,
 1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20-(h.Panels-h.Selected)*L),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));P=1==h.vScroll?new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-20-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,h.Selected*L,t-20,r-h.Selected*L-(h.Panels-h.Selected)*L),"part=1;fillColor=none;strokeColor=none;");
-P.vertex=!0;v.insert(P);P.style+=k(h.Content_1);0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");P.value=c(h.Content_1);v.style+=f(v.style,h,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var q=[],w=[],L=25,Ha=3,U=(t+Ha)/(h.Tabs+1),pa=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ha,L),""),w[l].vertex=
-!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ha,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ha,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");
+P.vertex=!0;v.insert(P);P.style+=k(h.Content_1);0>P.style.indexOf(";align=")&&(P.style+="align=left;spacingLeft=5;");P.value=c(h.Content_1);v.style+=f(v.style,h,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";var q=[],w=[],L=25,Ga=3,U=(t+Ga)/(h.Tabs+1),pa=new mxCell("",new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ga,L),""),w[l].vertex=
+!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(10+l*U,0,U-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");
 ""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&
-(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];L=25;Ha=3;U=(t+Ha)/h.Tabs;pa=new mxCell("",
-new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*U,0,U-Ha,L),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*U,0,U-Ha,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ha,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=
+(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];L=25;Ga=3;U=(t+Ga)/h.Tabs;pa=new mxCell("",
+new mxGeometry(0,L,t,r-L),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(l*U,0,U-Ga,L),""),w[l].vertex=!0,v.insert(w[l])):(q[l]=new mxCell("",new mxGeometry(l*U,0,U-Ga,L),"strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U-Ga,L),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=
 f(w[l].style,h,u,w[l]),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;");ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,0,20,r-20-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r-L),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
 w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,L),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(0,1,t-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,t,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=
-ha,D.style+=f(D.style,h,u,D));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Ha=3;L=25+Ha;U=80;gb=10;pa=new mxCell("",new mxGeometry(U,0,t-U,r),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ha),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ha),"strokeColor=none;"),
-q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U,L-Ha),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)])),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,
+ha,D.style+=f(D.style,h,u,D));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";q=[];w=[];Ga=3;L=25+Ga;U=80;gb=10;pa=new mxCell("",new mxGeometry(U,0,t-U,r),"part=1;");pa.vertex=!0;v.insert(pa);pa.style+=f(pa.style,h,u,pa);for(l=0;l<=h.Tabs-1;l++)l==h.Selected-1?(w[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ga),""),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)]),w[l].style+=f(w[l].style,h,u,w[l])):(q[l]=new mxCell("",new mxGeometry(0,gb+l*L,U,L-Ga),"strokeColor=none;"),
+q[l].vertex=!0,v.insert(q[l]),q[l].style+=f(q[l].style,h,u,q[l]),w[l]=new mxCell("",new mxGeometry(0,0,U,L-Ga),"fillColor=#000000;fillOpacity=25;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=k(h["Tab_"+(l+1)])),w[l].value=c(h["Tab_"+(l+1)]),0>w[l].style.indexOf(";align=")&&(w[l].style+="align=left;spacingLeft=2;"),w[l].style+=f(w[l].style,h,u,w[l]);ha=B(h,u);ha=ha.replace("strokeColor","fillColor2");""==ha&&(ha="fillColor2=#000000;");1==h.vScroll&&(w=1==h.hScroll?new mxCell("",new mxGeometry(1,
 0,20,r-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,r),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),w.geometry.relative=!0,w.geometry.offset=new mxPoint(-20,0),w.vertex=!0,v.insert(w),v.style+="spacingRight=20;",w.style+=ha,w.style+=f(w.style,h,u,w));1==h.hScroll&&(D=1==h.vScroll?new mxCell("",new mxGeometry(U,1,t-20-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):
 new mxCell("",new mxGeometry(U,1,t-U,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),D.geometry.relative=!0,D.geometry.offset=new mxPoint(0,-20),D.vertex=!0,v.insert(D),D.style+=ha,D.style+=f(D.style,h,u,D));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";L=r/h.Options;q=[];w=[];for(l=0;l<h.Options;l++)q[l]=new mxCell("",new mxGeometry(0,l*L+.5*L-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),
 q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Option_"+(l+1)]),q[l].style+=f(q[l].style,h,u,q[l]),null!=h.Selected[l+1]&&1==h.Selected[l+1]&&(I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),w[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),w[l].vertex=!0,q[l].insert(w[l]),w[l].style+=I,w[l].style+=f(w[l].style,h,u,w[l])),q[l].value=c(h["Option_"+(l+1)]);break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
@@ -212,33 +213,33 @@ w[l].vertex=!0,q[l].insert(w[l])),w[l].style+=k(h["Button_"+(l+1)]),w[l].style+=
 U,0,U,r),"fillColor=none;strokeColor=none;"),w[l].vertex=!0,v.insert(w[l]),w[l].style+=k(h["Link_"+(l+1)]),w[l].value=c(h["Link_"+(l+1)]);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=f(v.style,h,u,v);q=[];w=[];U=t/h.Links;for(l=0;l<h.Links;l++)q[l]=new mxCell("",new mxGeometry(l*U,0,U,r),"fillColor=none;strokeColor=none;"),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["Link_"+(l+1)]),q[l].value=c(h["Link_"+(l+1)]);for(l=1;l<h.Links;l++)w[l]=new mxCell("",new mxGeometry(l/
 h.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),w[l].geometry.relative=!0,w[l].geometry.offset=new mxPoint(-3,-5),w[l].vertex=!0,v.insert(w[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=f(v.style,h,u,v);q=[];U=t/(h.Buttons+1);for(l=0;l<=h.Buttons-1;l++)q[l]=l!=h.Selected-1?new mxCell("",new mxGeometry(0,0,U,r),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,U,r),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),q[l].geometry.relative=
 !0,q[l].geometry.offset=new mxPoint(l*U,0),q[l].vertex=!0,v.insert(q[l]),q[l].style+=k(h["MenuItem_"+(l+1)]),q[l].value=c(h["MenuItem_"+(l+1)]);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+k(h.Text_prev);v.value=c(h.Text_prev)+" ";for(l=0;l<h.Links;l++)v.value+=c(h["Link_"+(l+1)])+" ";v.value+=c(h.Text_next);break;case "UI2ContextMenuBlock":v.style+=
-f(v.style,h,u,v);for(var G=[],fb=[],Bb=[],L=r/h.Lines,N=null,l=0;l<h.Lines;l++)null!=h["Item_"+(l+1)]&&(null==N&&(N=""+b(h["Item_"+(l+1)])+a(h["Item_"+(l+1)])+d(h["Item_"+(l+1)])),G[l]=new mxCell("",new mxGeometry(0,l*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N,G[l].value=c(h["Item_"+(l+1)])),null!=h.Icons[l+1]&&null!=G[l]&&("dot"==h.Icons[l+1]?(fb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),
+f(v.style,h,u,v);for(var G=[],fb=[],Cb=[],L=r/h.Lines,N=null,l=0;l<h.Lines;l++)null!=h["Item_"+(l+1)]&&(null==N&&(N=""+b(h["Item_"+(l+1)])+a(h["Item_"+(l+1)])+d(h["Item_"+(l+1)])),G[l]=new mxCell("",new mxGeometry(0,l*r/h.Lines,t,L),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N,G[l].value=c(h["Item_"+(l+1)])),null!=h.Icons[l+1]&&null!=G[l]&&("dot"==h.Icons[l+1]?(fb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"shape=ellipse;strokeColor=none;"),
 fb[l].geometry.offset=new mxPoint(6,-4)):"check"==h.Icons[l+1]&&(fb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),fb[l].geometry.offset=new mxPoint(6.5,-4)),null!=fb[l]&&(fb[l].geometry.relative=!0,fb[l].vertex=!0,G[l].insert(fb[l]),I=B(h,u),I=I.replace("strokeColor","fillColor"),""==I&&(I="fillColor=#000000;"),fb[l].style+=I)),null!=h["Shortcut_"+(l+1)]&&(null==N&&(N=""+b(h["Shortcut_"+(l+1)])+a(h["Shortcut_"+(l+1)])+d(h["Shortcut_"+(l+1)])),
-Bb[l]=new mxCell("",new mxGeometry(.6*t,l*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Bb[l].vertex=!0,v.insert(Bb[l]),Bb[l].style+=N,Bb[l].value=c(h["Shortcut_"+(l+1)])),null!=h.Dividers[l+1]&&(G[l]=new mxCell("",new mxGeometry(.05*t,l*r/h.Lines,.9*t,L),"shape=line;strokeWidth=0.25;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=B(h,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+
+Cb[l]=new mxCell("",new mxGeometry(.6*t,l*r/h.Lines,.4*t,L),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),Cb[l].vertex=!0,v.insert(Cb[l]),Cb[l].style+=N,Cb[l].value=c(h["Shortcut_"+(l+1)])),null!=h.Dividers[l+1]&&(G[l]=new mxCell("",new mxGeometry(.05*t,l*r/h.Lines,.9*t,L),"shape=line;strokeWidth=0.25;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=B(h,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*h.ScrollVal+
 ";";break;case "UI2TooltipSquareBlock":v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+h.RoundCorners+";"+k(h.Tip);v.style+=f(v.style,h,u,v);v.value=c(h.Tip);break;case "UI2CalloutBlock":v.style+="shape=ellipse;"+k(h.Txt);v.style+=f(v.style,h,u,v);v.value=c(h.Txt);break;case "UI2AlertBlock":v.style+=k(h.Txt);v.style+=f(v.style,h,u,v);v.value=c(h.Txt);q=new mxCell("",new mxGeometry(0,0,t,30),"part=1;resizeHeight=0;");q.vertex=!0;v.insert(q);q.style+=
 k(h.Title);q.style+=f(q.style,h,u,q);q.value=c(h.Title);w=new mxCell("",new mxGeometry(1,.5,20,20),"part=1;shape=ellipse;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");w.geometry.relative=!0;w.geometry.offset=new mxPoint(-25,-10);w.vertex=!0;q.insert(w);for(var uc=45*h.Buttons+(10*h.Buttons-1),D=[],l=0;l<h.Buttons;l++)D[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),D[l].geometry.relative=!0,D[l].geometry.offset=new mxPoint(.5*-uc+55*l,-40),D[l].vertex=!0,v.insert(D[l]),D[l].style+=
 k(h["Button_"+(l+1)]),D[l].style+=f(D[l].style,h,u,D[l]),D[l].value=c(h["Button_"+(l+1)]);break;case "UMLClassBlock":if(0==h.Simple){var N=M(h,u),Ca=Math.round(.6*h.TitleHeight),N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Title);v.style+=f(v.style,h,u,v);v.value=c(h.Title);
-for(var G=[],hc=[],ya=Ca/r,l=0;l<=h.Attributes;l++)0<l&&(hc[l]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),hc[l].vertex=!0,v.insert(hc[l])),L=0,l<h.Attributes?(L=h["Text"+(l+1)+"Percent"],ya+=L):L=1-ya,G[l]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ca)*L)),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+for(var G=[],ic=[],ya=Ca/r,l=0;l<=h.Attributes;l++)0<l&&(ic[l]=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),ic[l].vertex=!0,v.insert(ic[l])),L=0,l<h.Attributes?(L=h["Text"+(l+1)+"Percent"],ya+=L):L=1-ya,G[l]=new mxCell("",new mxGeometry(0,0,t,Math.round((r-Ca)*L)),"part=1;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
 G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+E(h,u,G[l])+b(h["Text"+(l+1)])+a(h["Text"+(l+1)])+d(h["Text"+(l+1)]),G[l].value=c(h["Text"+(l+1)])}else v.style+=k(h.Title),v.style+=f(v.style,h,u,v),v.value=c(h.Title);break;case "ERDEntityBlock":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+
 N+"startSize="+Ca+";"+k(h.Name);v.style+=f(v.style,h,u,v);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.value=c(h.Name);G=[];ya=Ca/r;for(l=0;l<h.Fields;l++)L=0,G[l]=new mxCell("",new mxGeometry(0,0,t,.6*h["Field"+(l+1)+"_h"]),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+
 (l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;opacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]);break;case "ERDEntityBlock2":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+
-M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],ya=Ca,Ia=30;null!=h.Column1&&(Ia=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ia,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&&
-0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ia,ya,t-Ia,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+
+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],ya=Ca,Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&&
+0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+
 1)]),v.style+=f(v.style,h,u,v),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].value=c(h["Field"+(l+1)]),ya+=.6*h["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+
-"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);G=[];X=[];ya=Ca;Ia=30;null!=h.Column1&&(Ia=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ia,.6*h["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+
-(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Field"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ia,ya,t-Ia,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),
+"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);G=[];X=[];ya=Ca;Ha=30;null!=h.Column1&&(Ha=.6*h.Column1);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+
+(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Field"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),G[l].vertex=!0,v.insert(G[l]),
 G[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Type"+(l+1)]),ya+=.6*h["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":N=M(h,u);Ca=.6*h.Name_h;N=N.replace("fillColor","swimlaneFillColor");""==N&&(N="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"+
-N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],Ja=[],ya=Ca,Ia=30,ac=40;null!=h.Column1&&(Ia=.6*h.Column1);null!=h.Column2&&(ac=.6*h.Column2);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ia,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ia,ya,t-Ia-ac,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Field"+(l+1)]),Ja[l]=new mxCell("",new mxGeometry(t-ac,ya,ac,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-Ja[l].vertex=!0,v.insert(Ja[l]),Ja[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),Ja[l].style=1==h.AltRows&&0!=l%2?Ja[l].style+"fillColor=#000000;fillOpacity=5;":Ja[l].style+("fillColor=none;"+E(h,u,Ja[l])),Ja[l].style+=f(Ja[l].style,h,u,Ja[l]),Ja[l].value=c(h["Type"+(l+1)]),ya+=.6*h["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":fa("application_system",t,r,v,h,u);break;case "GCPServiceCardAuthorizationBlock":fa("internal_payment_authorization",t,r,v,h,u);
+N+"startSize="+Ca+";"+k(h.Name);v.style=h.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+M(h,u);v.style+=f(v.style,h,u,v);v.value=c(h.Name);var G=[],X=[],Ia=[],ya=Ca,Ha=30,bc=40;null!=h.Column1&&(Ha=.6*h.Column1);null!=h.Column2&&(bc=.6*h.Column2);for(l=0;l<h.Fields;l++)L=0,X[l]=new mxCell("",new mxGeometry(0,ya,Ha,.6*h["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=N+b(h["Key"+(l+1)])+a(h["Key"+(l+1)])+d(h["Key"+(l+1)]),X[l].style=1==h.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+E(h,u,X[l])),X[l].style+=f(X[l].style,h,u,X[l]),X[l].value=c(h["Key"+(l+1)]),G[l]=new mxCell("",new mxGeometry(Ha,ya,t-Ha-bc,.6*h["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+G[l].vertex=!0,v.insert(G[l]),G[l].style+=N+b(h["Field"+(l+1)])+a(h["Field"+(l+1)])+d(h["Field"+(l+1)]),G[l].style=1==h.AltRows&&0!=l%2?G[l].style+"fillColor=#000000;fillOpacity=5;":G[l].style+("fillColor=none;"+E(h,u,G[l])),G[l].style+=f(G[l].style,h,u,G[l]),G[l].value=c(h["Field"+(l+1)]),Ia[l]=new mxCell("",new mxGeometry(t-bc,ya,bc,.6*h["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+Ia[l].vertex=!0,v.insert(Ia[l]),Ia[l].style+=N+b(h["Type"+(l+1)])+a(h["Type"+(l+1)])+d(h["Type"+(l+1)]),Ia[l].style=1==h.AltRows&&0!=l%2?Ia[l].style+"fillColor=#000000;fillOpacity=5;":Ia[l].style+("fillColor=none;"+E(h,u,Ia[l])),Ia[l].style+=f(Ia[l].style,h,u,Ia[l]),Ia[l].value=c(h["Type"+(l+1)]),ya+=.6*h["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":fa("application_system",t,r,v,h,u);break;case "GCPServiceCardAuthorizationBlock":fa("internal_payment_authorization",t,r,v,h,u);
 break;case "GCPServiceCardBlankBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardReallyBlankBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardBucketBlock":fa("bucket",t,r,v,h,u);break;case "GCPServiceCardCDNInterconnectBlock":fa("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardCloudDNSBlock":fa("blank",t,r,v,h,u);break;case "GCPServiceCardClusterBlock":fa("cluster",t,r,v,h,u);break;case "GCPServiceCardDiskSnapshotBlock":fa("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardEdgePopBlock":fa("google_network_edge_cache",
 t,r,v,h,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":fa("frontend_platform_services",t,r,v,h,u);break;case "GCPServiceCardGatewayBlock":fa("gateway",t,r,v,h,u);break;case "GCPServiceCardGoogleNetworkBlock":fa("google_network_edge_cache",t,r,v,h,u);break;case "GCPServiceCardImageServicesBlock":fa("image_services",t,r,v,h,u);break;case "GCPServiceCardLoadBalancerBlock":fa("network_load_balancer",t,r,v,h,u);break;case "GCPServiceCardLocalComputeBlock":fa("dedicated_game_server",t,r,v,
 h,u);break;case "GCPServiceCardLocalStorageBlock":fa("persistent_disk_snapshot",t,r,v,h,u);break;case "GCPServiceCardLogsAPIBlock":fa("logs_api",t,r,v,h,u);break;case "GCPServiceCardMemcacheBlock":fa("memcache",t,r,v,h,u);break;case "GCPServiceCardNATBlock":fa("nat",t,r,v,h,u);break;case "GCPServiceCardPaymentFormBlock":fa("external_payment_form",t,r,v,h,u);break;case "GCPServiceCardPushNotificationsBlock":fa("push_notification_service",t,r,v,h,u);break;case "GCPServiceCardScheduledTasksBlock":fa("scheduled_tasks",
 t,r,v,h,u);break;case "GCPServiceCardServiceDiscoveryBlock":fa("service_discovery",t,r,v,h,u);break;case "GCPServiceCardSquidProxyBlock":fa("squid_proxy",t,r,v,h,u);break;case "GCPServiceCardTaskQueuesBlock":fa("task_queues",t,r,v,h,u);break;case "GCPServiceCardVirtualFileSystemBlock":fa("virtual_file_system",t,r,v,h,u);break;case "GCPServiceCardVPNGatewayBlock":fa("gateway",t,r,v,h,u);break;case "GCPInputDatabase":ja("database",1,.9,t,r,v,h,u);break;case "GCPInputRecord":ja("record",1,.66,t,r,v,
 h,u);break;case "GCPInputPayment":ja("payment",1,.8,t,r,v,h,u);break;case "GCPInputGateway":ja("gateway_icon",1,.44,t,r,v,h,u);break;case "GCPInputLocalCompute":ja("compute_engine_icon",1,.89,t,r,v,h,u);break;case "GCPInputBeacon":ja("beacon",.73,1,t,r,v,h,u);break;case "GCPInputStorage":ja("storage",1,.8,t,r,v,h,u);break;case "GCPInputList":ja("list",.89,1,t,r,v,h,u);break;case "GCPInputStream":ja("stream",1,.82,t,r,v,h,u);break;case "GCPInputMobileDevices":ja("mobile_devices",1,.73,t,r,v,h,u);break;
 case "GCPInputCircuitBoard":ja("circuit_board",1,.9,t,r,v,h,u);break;case "GCPInputLive":ja("live",.74,1,t,r,v,h,u);break;case "GCPInputUsers":ja("users",1,.63,t,r,v,h,u);break;case "GCPInputLaptop":ja("laptop",1,.66,t,r,v,h,u);break;case "GCPInputApplication":ja("application",1,.8,t,r,v,h,u);break;case "GCPInputLightbulb":ja("lightbulb",.7,1,t,r,v,h,u);break;case "GCPInputGame":ja("game",1,.54,t,r,v,h,u);break;case "GCPInputDesktop":ja("desktop",1,.9,t,r,v,h,u);break;case "GCPInputDesktopAndMobile":ja("desktop_and_mobile",
-1,.66,t,r,v,h,u);break;case "GCPInputWebcam":ja("webcam",.5,1,t,r,v,h,u);break;case "GCPInputSpeaker":ja("speaker",.7,1,t,r,v,h,u);break;case "GCPInputRetail":ja("retail",1,.89,t,r,v,h,u);break;case "GCPInputReport":ja("report",1,1,t,r,v,h,u);break;case "GCPInputPhone":ja("phone",.64,1,t,r,v,h,u);break;case "GCPInputBlank":ja("transparent",1,1,t,r,v,h,u)}return v}var sb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],ob=["fpDoor"],Ka={None:"none;",Arrow:"block;endFill=1;",
+1,.66,t,r,v,h,u);break;case "GCPInputWebcam":ja("webcam",.5,1,t,r,v,h,u);break;case "GCPInputSpeaker":ja("speaker",.7,1,t,r,v,h,u);break;case "GCPInputRetail":ja("retail",1,.89,t,r,v,h,u);break;case "GCPInputReport":ja("report",1,1,t,r,v,h,u);break;case "GCPInputPhone":ja("phone",.64,1,t,r,v,h,u);break;case "GCPInputBlank":ja("transparent",1,1,t,r,v,h,u)}return v}var tb=["AEUSBBlock","AGSCutandpasteBlock","iOSDeviceiPadLandscape","iOSDeviceiPadProLandscape"],ob=["fpDoor"],Ja={None:"none;",Arrow:"block;endFill=1;",
 "Hollow Arrow":"block;endFill=0;","Open Arrow":"open;","CFN ERD Zero Or More Arrow":"ERzeroToMany;startSize=10;","CFN ERD One Or More Arrow":"ERoneToMany;startSize=10;","CFN ERD Many Arrow":"ERmany;startSize=10;","CFN ERD Exactly One Arrow":"ERmandOne;startSize=10;","CFN ERD Zero Or One Arrow":"ERzeroToOne;startSize=10;","CFN ERD One Arrow":"ERone;startSize=16;",Generalization:"block;endFill=0;startSize=12;","Big Open Arrow":"open;startSize=10;",Asynch1:"openAsync;flipH=1;startSize=10;",Asynch2:"openAsync;startSize=10;",
 Aggregation:"diamond;endFill=0;startSize=16;",Composition:"diamond;endFill=1;startSize=16;",BlockEnd:"none;endFill=1;startSize=16;",Measure:"ERone;startSize=10;"},Da={DefaultTextBlockNew:"text;strokeColor=none;fillColor=none",DefaultTextBlock:"text;strokeColor=none;fillColor=none",DefaultSquareBlock:"",DefaultNoteBlock:"shape=note;size=15",DefaultNoteBlockV2:"shape=note;size=15",HotspotBlock:"strokeColor=none;opacity=50",ImageSearchBlock2:"shape=image",UserImage2Block:"shape=image",ProcessBlock:"",
 DecisionBlock:"rhombus",TerminatorBlock:"rounded=1;arcSize=50",PredefinedProcessBlock:"shape=process",DocumentBlock:"shape=document",MultiDocumentBlock:"shape=mxgraph.flowchart.multi-document",ManualInputBlock:"shape=manualInput;size=15",PreparationBlock:"shape=hexagon;perimeter=hexagonPerimeter2",DataBlock:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DataBlockNew:"shape=parallelogram;perimeter=parallelogramPerimeter;anchorPointDirection=0",DatabaseBlock:"shape=cylinder;size=0.1;anchorPointDirection=0;boundedLbl=1;",
@@ -708,9 +709,9 @@ GCPInputPhone:"mxCompositeShape",GCPInputBlank:"mxCompositeShape",SMHome:"shape=
 SMPrint:"shape=mxgraph.sitemap.print;strokeColor=#000000;fillColor=#E6E6E6",SMScript:"shape=mxgraph.sitemap.script;strokeColor=#000000;fillColor=#E6E6E6",SMSearch:"shape=mxgraph.sitemap.search;strokeColor=#000000;fillColor=#E6E6E6",SMSettings:"shape=mxgraph.sitemap.settings;strokeColor=#000000;fillColor=#E6E6E6",SMSitemap:"shape=mxgraph.sitemap.sitemap;strokeColor=#000000;fillColor=#E6E6E6",SMSuccess:"shape=mxgraph.sitemap.success;strokeColor=#000000;fillColor=#E6E6E6",SMVideo:"shape=mxgraph.sitemap.video;strokeColor=#000000;fillColor=#E6E6E6",
 SMAudio:"shape=mxgraph.sitemap.audio;strokeColor=#000000;fillColor=#E6E6E6",SMBlog:"shape=mxgraph.sitemap.blog;strokeColor=#000000;fillColor=#E6E6E6",SMCalendar:"shape=mxgraph.sitemap.calendar;strokeColor=#000000;fillColor=#E6E6E6",SMChart:"shape=mxgraph.sitemap.chart;strokeColor=#000000;fillColor=#E6E6E6",SMCloud:"shape=mxgraph.sitemap.cloud;strokeColor=#000000;fillColor=#E6E6E6",SMDocument:"shape=mxgraph.sitemap.document;strokeColor=#000000;fillColor=#E6E6E6",SMDownload:"shape=mxgraph.sitemap.download;strokeColor=#000000;fillColor=#E6E6E6",
 SMError:"shape=mxgraph.sitemap.error;strokeColor=#000000;fillColor=#E6E6E6",SMForm:"shape=mxgraph.sitemap.form;strokeColor=#000000;fillColor=#E6E6E6",SMGame:"shape=mxgraph.sitemap.game;strokeColor=#000000;fillColor=#E6E6E6",SMJobs:"shape=mxgraph.sitemap.jobs;strokeColor=#000000;fillColor=#E6E6E6",SMLucid:"shape=mxgraph.sitemap.home;strokeColor=#000000;fillColor=#E6E6E6",SMNewspress:"shape=mxgraph.sitemap.news;strokeColor=#000000;fillColor=#E6E6E6",SMPhoto:"shape=mxgraph.sitemap.photo;strokeColor=#000000;fillColor=#E6E6E6",
-SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6"},Fa=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var p in g.Members)d=
-Fa(p,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)g.push(a.Pages[b]);g.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],g=[];null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):g.push(a);a=da();for(var p=new mxCodec,e=0;e<g.length;e++){d.push("<diagram");null!=g[e].Properties&&null!=g[e].Properties.Title&&d.push(' name="'+
-mxUtils.htmlEntities(g[e].Properties.Title)+'"');Ea(a,g[e],null,null,null,!0);var c=p.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(c))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(c){function n(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
+SMPortfolio:"shape=mxgraph.sitemap.portfolio;strokeColor=#000000;fillColor=#E6E6E6",SMPricing:"shape=mxgraph.sitemap.pricing;strokeColor=#000000;fillColor=#E6E6E6",SMProfile:"shape=mxgraph.sitemap.profile;strokeColor=#000000;fillColor=#E6E6E6",SMSlideshow:"shape=mxgraph.sitemap.slideshow;strokeColor=#000000;fillColor=#E6E6E6",SMUpload:"shape=mxgraph.sitemap.upload;strokeColor=#000000;fillColor=#E6E6E6"},pb=RegExp("{{(date{.*}|[^%^{^}]+)}}","g"),Eb=function(a,b,d){0>mxUtils.indexOf(d,a)&&d.push(a);
+if(a in b){var g=b[a];g.id=a;if(null!=g.Members)for(var p in g.Members)d=Eb(p,b,d)}return d};LucidImporter.importState=function(a){function b(a){for(var b in a.Pages)g.push(a.Pages[b]);g.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}var d=['<?xml version="1.0" encoding="UTF-8"?>',"<mxfile>"],g=[];null!=a.state?b(JSON.parse(a.state)):null==a.Page&&null!=a.Pages?b(a):g.push(a);a=da();for(var p=new mxCodec,e=0;e<g.length;e++){d.push("<diagram");
+null!=g[e].Properties&&null!=g[e].Properties.Title&&d.push(' name="'+mxUtils.htmlEntities(g[e].Properties.Title)+'"');Ea(a,g[e],null,null,null,!0);var c=p.encode(a.getModel());a.getModel().clear();d.push(">"+Graph.compress(mxUtils.getXml(c))+"</diagram>")}d.push("</mxfile>");return d.join("")}})();function VsdxExport(c){function n(a,b){var d={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
 "_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
 "docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>",
 "docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>",
@@ -740,7 +741,7 @@ c));O.appendChild(b("NameUniv",T[F].name,c));O.appendChild(b("ColorTrans","0",c)
 p=m(g,E.RELS_XMLNS,"Relationships"),c=m(g,E.RELS_XMLNS,"Relationship");c.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");c.setAttribute("Id","rId1");c.setAttribute("Target","../masters/master1.xml");p.appendChild(c);var e=F.images;if(0<e.length)for(var y=0;y<e.length;y++)c=m(g,E.RELS_XMLNS,"Relationship"),c.setAttribute("Type",E.XMLNS_R+"/image"),c.setAttribute("Id","rId"+(y+2)),c.setAttribute("Target","../media/"+e[y]),p.appendChild(c);g.appendChild(p);C(a,d,g)}
 var E=this,F=new mxVsdxCanvas2D,M={},ba=1;this.exportCurrentDiagrams=function(){try{if(c.spinner.spin(document.body,mxResources.get("exporting"))){var a=function(a,b){var d=a.model.getChildCells(a.model.root);g[b]=[];for(var p=0;p<d.length;p++)d[p].visible&&g[b].push({name:d[p].value||"Background",visible:d[p].visible,locked:d[p].style&&0<=d[p].style.indexOf("locked=1")})},b=new JSZip;F.init(b);M={};ba=1;var d={},g={},p={},e=null!=c.pages?c.pages.length:1;if(null!=c.pages){for(var y=c.editor.graph.getSelectionCells(),
 x=c.currentPage,z=0;z<c.pages.length;z++){var k=c.pages[z];c.currentPage!=k&&c.selectPage(k,!0);var m=k.getName(),C=c.editor.graph,E=null;null!=C.themes&&"darkTheme"==C.defaultThemeName&&(E=C.stylesheet,C.stylesheet=C.getDefaultStylesheet(),C.refresh());try{var Pa=f(C);d[m]=A(C,Pa);a(C,m);B(b,z+1);p[m]=Pa}finally{null!=E&&(C.stylesheet=E,C.refresh())}}x!=c.currentPage&&c.selectPage(x,!0);c.editor.graph.setSelectionCells(y)}else C=c.editor.graph,Pa=f(C),m="Page1",d[m]=A(C,Pa),a(C,m),B(b,1),p[m]=Pa;
-n(b,e);H(b,d,g,p);a=function(){b.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<F.filesLoading?F.onFilesLoaded=a:a()}return!0}catch(sb){return console.log(sb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
+n(b,e);H(b,d,g,p);a=function(){b.generateAsync({type:"base64"}).then(function(a){c.spinner.stop();var b=c.getBaseFilename();c.saveData(b+".vsdx","vsdx",a,"application/vnd.visio2013",!0)})};0<F.filesLoading?F.onFilesLoaded=a:a()}return!0}catch(tb){return console.log(tb),c.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
 VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";
 VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
 VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(c){this.filesLoading=0;this.zip=c};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(c){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,c):this.xmlDoc.createElement(c)};
@@ -1027,7 +1028,7 @@ m=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),m=d-m,n=this.c*c.
 e;e.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
 (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,g,c,e,f,k,m){a=b.call(this,a,g,c)||this;a.a=e;a.b=f;a.c=k;a.d=m;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=b.getHeight(),g=b.getWidth(),e=this.x*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=this.y*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),f=d-f,k=this.a*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
 m=this.b*c.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),n=this.c,B=this.d,e=100*e/g,f=100*f/d,E=b.getLastX()*g/100,F=b.getLastY()*d/100,M=e*g/100,ba=f*d/100,T=d-m,O=-n,n=Math.sqrt(E*E+F*F)*Math.cos(Math.atan2(F,E)-O),m=Math.sqrt(E*E+F*F)*Math.sin(Math.atan2(F,E)-O),ga=Math.sqrt(M*M+ba*ba)*Math.cos(Math.atan2(ba,M)-O),Z=Math.sqrt(M*M+ba*ba)*Math.sin(Math.atan2(ba,M)-O),Y=Math.sqrt(k*k+T*T)*Math.cos(Math.atan2(T,k)-O),ca=Math.sqrt(k*k+T*T)*Math.sin(Math.atan2(T,k)-O),ia=((n-ga)*(n+ga)*(Z-ca)-
-(ga-Y)*(ga+Y)*(m-Z)+B*B*(m-Z)*(Z-ca)*(m-ca))/(2*((n-ga)*(Z-ca)-(ga-Y)*(m-Z))),Ea=((n-ga)*(ga-Y)*(n-Y)/(B*B)+(ga-Y)*(m-Z)*(m+Z)-(n-ga)*(Z-ca)*(Z+ca))/(2*((ga-Y)*(m-Z)-(n-ga)*(Z-ca))),da=n-ia,La=m-Ea,da=Math.sqrt(da*da+La*La*B*B),B=da/B,O=180*O/Math.PI,e=Math.round(100*e)/100,f=Math.round(100*f)/100,da=Math.round(100*da/g*100)/100,B=Math.round(100*B/d*100)/100,O=Math.round(100*O)/100,d=0<(M-E)*(T-F)-(ba-F)*(k-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ia,Ea,n,m,ga,Z,Y,ca)&&this.isReflexAngle(ia,
+(ga-Y)*(ga+Y)*(m-Z)+B*B*(m-Z)*(Z-ca)*(m-ca))/(2*((n-ga)*(Z-ca)-(ga-Y)*(m-Z))),Ea=((n-ga)*(ga-Y)*(n-Y)/(B*B)+(ga-Y)*(m-Z)*(m+Z)-(n-ga)*(Z-ca)*(Z+ca))/(2*((ga-Y)*(m-Z)-(n-ga)*(Z-ca))),da=n-ia,Ka=m-Ea,da=Math.sqrt(da*da+Ka*Ka*B*B),B=da/B,O=180*O/Math.PI,e=Math.round(100*e)/100,f=Math.round(100*f)/100,da=Math.round(100*da/g*100)/100,B=Math.round(100*B/d*100)/100,O=Math.round(100*O)/100,d=0<(M-E)*(T-F)-(ba-F)*(k-E)?"0":"1",g="0";c.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ia,Ea,n,m,ga,Z,Y,ca)&&this.isReflexAngle(ia,
 Ea,n,m,ga,Z,Y,ca)&&(g="1");b.setLastX(e);b.setLastY(f);return'<arc rx="'+(new String(da)).toString()+'" ry="'+(new String(B)).toString()+'" x="'+(new String(e)).toString()+'" y="'+(new String(f)).toString()+'" x-axis-rotation="'+(new String(O)).toString()+'" large-arc-flag="'+g+'" sweep-flag="'+d+'"/>'}return""};a.prototype.isReflexAngle=function(a,b,c,e,f,k,m,n){c-=a;e-=b;k-=b;f=m-a;n-=b;b=a=0;c=180*(Math.atan2(e,c)-Math.atan2(b,a))/Math.PI;f=180*(Math.atan2(k,f)-Math.atan2(b,a))/Math.PI;a=180*(Math.atan2(n,
 m)-Math.atan2(b,a))/Math.PI;c=(c-a)%360;f=(f-a)%360;180<c?c-=360:-180>c&&(c+=360);180<f?f-=360:-180>f&&(f+=360);return(0<c&&0>f||0>c&&0<f)&&180<Math.abs(c-f)?!0:!1};return a}(c.mxgraph.io.vsdx.geometry.Row);f.EllipticalArcTo=e;e.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
 (function(c){(function(n){(function(m){(function(k){(function(f){var e=function(b){function a(a,g,c,e,f){a=b.call(this,a,g,c)||this;a.a=e;a.b=f;return a}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(c.mxgraph.io.vsdx.geometry.Row);f.InfiniteLine=e;e.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(k.geometry||(k.geometry={}))})(m.vsdx||(m.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={}));
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index 7efe6680dda81cbf5a42b621b72546e959e705ed..515ea83e76171387c2dab48528a9d3a79cd2b2ed 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -4281,36 +4281,65 @@ HoverIcons.prototype.setCurrentState = function(state)
 /**
  * Returns true if the given cell is a table.
  */
-Graph.prototype.createTable = function(rows, cols)
+Graph.prototype.createParent = function(parent, child, childCount)
 {
-	var w = 40;
-	var h = 30;
+	parent = this.cloneCell(parent);
 	
-	var table = new mxCell('', new mxGeometry(0, 0, cols * w, rows * h),
-		'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;');
-    table.vertex = true;
-    
-    for (var i = 0; i < rows; i++)
+	for (var i = 0; i < childCount; i++)
     {
-    	var row = new mxCell('', new mxGeometry(0, i * h, cols * w, h),
-			'html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;' +
-			'childLayout=rowLayout;points=[[0,0.5],[1,0.5]];');
-	    row.vertex = true;
-	    
-	    for (var j = 0; j < cols; j++)
-	    {
-	    	var cell = new mxCell('', new mxGeometry(j * w, i * h, w, h),
-				'html=1;whiteSpace=wrap;part=1;connectable=0;');
-		    cell.vertex = true;
-		    row.insert(cell);
-	    }
-	    
-	    table.insert(row);
+		parent.insert(this.cloneCell(child));
     }
-    
-	console.log('createTable', rows, cols, table);
 	
-    return table;
+	return parent;
+};
+
+/**
+ * Returns true if the given cell is a table.
+ */
+Graph.prototype.createTable = function(rowCount, colCount, w, h)
+{
+	w = (w != null) ? w : 40;
+	h = (h != null) ? h : 30;
+	
+	return this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, rowCount * h,
+		'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;'),
+		this.createParent(this.createVertex(null, null, '', 0, 0, colCount * w, h,
+    		'html=1;whiteSpace=wrap;container=1;collapsible=0;' +
+			'childLayout=rowLayout;points=[[0,0.5],[1,0.5]];'),
+			this.createVertex(null, null, '', 0, 0, w, h,
+				'html=1;whiteSpace=wrap;connectable=0;'),
+			colCount),
+		rowCount);
+};
+
+/**
+ * 
+ */
+Graph.prototype.createCrossFunctionalSwimlane = function(rowCount, colCount, w, h)
+{
+	w = (w != null) ? w : 120;
+	h = (h != null) ? h : 120;
+	
+	var table = this.createVertex(null, null, '', 0, 0, colCount * w, rowCount * h,
+		'html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;');
+	var row = this.createVertex(null, null, '', 0, 0, colCount * w, h,
+		'swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;' +
+		'childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;');
+	table.insert(this.createParent(row, this.createVertex(null, null,  '', 0, 0, w, h,
+		'swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;'),
+		colCount));
+	
+	if (rowCount > 1)
+	{
+		return this.createParent(table, this.createParent(row,
+			this.createVertex(null, null,  '', 0, 0, w, h,
+			'html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;'),
+			colCount), rowCount - 1);
+	}
+	else
+	{
+		return table;
+	}
 };
 
 /**
diff --git a/src/main/webapp/js/mxgraph/Sidebar.js b/src/main/webapp/js/mxgraph/Sidebar.js
index 68fcde4cae1115770e34387ea958466b8f9c3620..b8460b660ac08c2d6bbe2d3e324e4cfe323c7b83 100644
--- a/src/main/webapp/js/mxgraph/Sidebar.js
+++ b/src/main/webapp/js/mxgraph/Sidebar.js
@@ -367,7 +367,8 @@ Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
 				}
 				
 				this.tooltip.style.height = height + 'px';
-				var x0 = -Math.round(bounds.x - this.tooltipBorder) + (w2 - width) / 2;
+				var x0 = -Math.round(bounds.x - this.tooltipBorder) +
+					((w2 > width) ? (w2 - width) / 2 : 0);
 				var y0 = -Math.round(bounds.y - this.tooltipBorder);
 				
 				var b = document.body;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index fd79b0479749979018148250052b9f77fa0806fc..343b92824445b580d3e82907f5ebea8e900ae90e 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -98,7 +98,7 @@ var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456
 "");l<a.length;)d=this._keyStr.indexOf(a.charAt(l++)),e=this._keyStr.indexOf(a.charAt(l++)),g=this._keyStr.indexOf(a.charAt(l++)),k=this._keyStr.indexOf(a.charAt(l++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
 String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};window.urlParams=window.urlParams||{};window.isLocalStorage=window.isLocalStorage||!1;window.mxLoadSettings=window.mxLoadSettings||"1"!=urlParams.configure;window.isSvgBrowser=window.isSvgBrowser||0>navigator.userAgent.indexOf("MSIE")||9<=document.documentMode;window.DRAWIO_BASE_URL=window.DRAWIO_BASE_URL||"https://app.diagrams.net";window.EXPORT_URL=window.EXPORT_URL||"https://exp.draw.io/ImageExport4/export";window.PLANT_URL=window.PLANT_URL||"https://exp-plant.draw.io/plantuml-1-2020-2";
 window.DRAW_MATH_URL=window.DRAW_MATH_URL||window.DRAWIO_BASE_URL+"/math";window.VSD_CONVERT_URL=window.VSD_CONVERT_URL||"https://convert.draw.io/VsdConverter/api/converter";window.EMF_CONVERT_URL=window.EMF_CONVERT_URL||"https://convert.draw.io/emf2png/convertEMF";window.REALTIME_URL=window.REALTIME_URL||"cache";window.DRAWIO_GITLAB_URL=window.DRAWIO_GITLAB_URL||"https://gitlab.com";window.DRAWIO_GITLAB_ID=window.DRAWIO_GITLAB_ID||"5cdc018a32acddf6eba37592d9374945241e644b8368af847422d74c8709bc44";
-window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"open";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");
+window.SAVE_URL=window.SAVE_URL||"save";window.OPEN_URL=window.OPEN_URL||"import";window.PROXY_URL=window.PROXY_URL||"proxy";window.DRAWIO_VIEWER_URL=window.DRAWIO_VIEWER_URL||null;window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":"https://app.diagrams.net/iconSearch");
 window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
 window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null)}catch(c){isLocalStorage=!1}return a}();
 window.mxLanguageMap=window.mxLanguageMap||{i18n:"",id:"Bahasa Indonesia",ms:"Bahasa Melayu",bs:"Bosanski",bg:"Bulgarian",ca:"Català",cs:"Čeština",da:"Dansk",de:"Deutsch",et:"Eesti",en:"English",es:"Español",fil:"Filipino",fr:"Français",gl:"Galego",it:"Italiano",hu:"Magyar",nl:"Nederlands",no:"Norsk",pl:"Polski","pt-br":"Português (Brasil)",pt:"Português (Portugal)",ro:"Română",fi:"Suomi",sv:"Svenska",vi:"Tiếng Việt",tr:"Türkçe",el:"Ελληνικά",ru:"Русский",sr:"Српски",uk:"Українська",he:"עברית",ar:"العربية",
@@ -2040,15 +2040,15 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
 this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
 a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
 Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){var c=a.getSelectionCellsForChanges(e.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<c.length){a.getModel();for(var k=[],t=0;t<
-c.length;t++)null!=a.view.getState(c[t])&&k.push(c[t]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){var c=a.getSelectionCellsForChanges(e.getProperty("edit").changes,function(a){return!(a instanceof mxChildChange)});if(0<c.length){a.getModel();for(var k=[],u=0;u<
+c.length;u++)null!=a.view.getState(c[u])&&k.push(c[u]);a.setSelectionCells(k)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};
 OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,c,k,m,p,t,v,A,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,q=c,n=mxUtils.getDocumentSize();null!=window.innerHeight&&(n.height=window.innerHeight);var l=n.height,B=Math.max(1,Math.round((n.width-e-64)/2)),x=Math.max(1,Math.round((l-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,l-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=l+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";B+=n.x;x+=n.y;k&&document.body.appendChild(this.bg);var u=a.createDiv(v?"geTransDialog":
-"geDialog");k=this.getPosition(B,x,e,c);B=k.x;x=k.y;u.style.width=e+"px";u.style.height=c+"px";u.style.left=B+"px";u.style.top=x+"px";u.style.zIndex=this.zIndex;u.appendChild(b);document.body.appendChild(u);!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=x+14+"px",m.style.left=B+e+38-f+"px",m.style.zIndex=
-this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!d)){var H=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(d){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var d=A();null!=d&&(g=e=d.w,q=c=d.h)}d=mxUtils.getDocumentSize();l=d.height;this.bg.style.height=l+"px";B=Math.max(1,Math.round((d.width-e-64)/2));x=Math.max(1,
-Math.round((l-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(q,l-64);d=this.getPosition(B,x,e,c);B=d.x;x=d.y;u.style.left=B+"px";u.style.top=x+"px";u.style.width=e+"px";u.style.height=c+"px";!t&&b.clientHeight>u.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=x+14+"px",this.dialogImg.style.left=B+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=
-u;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,c,k,m,p,u,x,A,d){var f=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(f=80);e+=f;c+=f;var g=e,q=c,n=mxUtils.getDocumentSize();null!=window.innerHeight&&(n.height=window.innerHeight);var l=n.height,B=Math.max(1,Math.round((n.width-e-64)/2)),v=Math.max(1,Math.round((l-c-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;c=Math.min(c,l-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=l+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));n=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=n.x+"px";this.bg.style.top=n.y+"px";B+=n.x;v+=n.y;k&&document.body.appendChild(this.bg);var y=a.createDiv(x?"geTransDialog":
+"geDialog");k=this.getPosition(B,v,e,c);B=k.x;v=k.y;y.style.width=e+"px";y.style.height=c+"px";y.style.left=B+"px";y.style.top=v+"px";y.style.zIndex=this.zIndex;y.appendChild(b);document.body.appendChild(y);!u&&b.clientHeight>y.clientHeight-64&&(b.style.overflowY="auto");if(m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=v+14+"px",m.style.left=B+e+38-f+"px",m.style.zIndex=
+this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(m),this.dialogImg=m,!d)){var H=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(a){H=!0}),null,mxUtils.bind(this,function(d){H&&(a.hideDialog(!0),H=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var d=A();null!=d&&(g=e=d.w,q=c=d.h)}d=mxUtils.getDocumentSize();l=d.height;this.bg.style.height=l+"px";B=Math.max(1,Math.round((d.width-e-64)/2));v=Math.max(1,
+Math.round((l-c-a.footerHeight)/3));e=null!=document.body?Math.min(g,document.body.scrollWidth-64):g;c=Math.min(q,l-64);d=this.getPosition(B,v,e,c);B=d.x;v=d.y;y.style.left=B+"px";y.style.top=v+"px";y.style.width=e+"px";y.style.height=c+"px";!u&&b.clientHeight>y.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=v+14+"px",this.dialogImg.style.left=B+e+38-f+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=
+y;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
 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+
@@ -2057,32 +2057,32 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
 "/locked.png";
 Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))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(a,b,e,c,k,m,p,t,v,A,d){v=null!=v?v:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=d&&d()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(c,function(){v&&a.hideDialog();null!=k&&k()});
-q.className="geBtn";e.appendChild(q);null!=p&&(c=mxUtils.button(p,function(){v&&a.hideDialog();null!=t&&t()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var b=t.checked||A.checked,c=parseInt(f.value)/100;isNaN(c)&&(c=1,f.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var u=t.checked?1:parseInt(d.value);isNaN(u)||(q=mxUtils.getScaleForPageCount(u,e,g))}e.getGraphBounds();var k=u=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);q*=c;!b&&e.pageVisible?(c=e.getPageLayout(),u-=c.x*g.width,k-=c.y*g.height):
-b=!0;b=PrintDialog.createPrintPreview(e,q,g,0,u,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,c,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var t=document.createElement("input");t.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(t);var v=document.createElement("span");mxUtils.write(v," "+mxResources.get("fitPage"));
-k.appendChild(v);mxEvent.addListener(v,"click",function(a){t.checked=!t.checked;A.checked=!t.checked;mxEvent.consume(a)});mxEvent.addListener(t,"change",function(){A.checked=!t.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(A);v=document.createElement("span");mxUtils.write(v," "+mxResources.get("posterPrint")+":");k.appendChild(v);mxEvent.addListener(v,
-"click",function(a){A.checked=!A.checked;t.checked=!A.checked;mxEvent.consume(a)});c.appendChild(k);var d=document.createElement("input");d.setAttribute("value","1");d.setAttribute("type","number");d.setAttribute("min","1");d.setAttribute("size","4");d.setAttribute("disabled","disabled");d.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(A,"change",
-function(){A.checked?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled");t.checked=!A.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
-k.style.paddingTop="20px";k.setAttribute("align","right");v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst&&k.appendChild(v);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst||
-k.appendChild(v);c.appendChild(k);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
-PrintDialog.createPrintPreview=function(a,b,e,c,k,m,p){b=new mxPrintPreview(a,b,e,c,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var t=b.writeHead;b.writeHead=function(a){t.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+var ErrorDialog=function(a,b,e,c,k,m,p,u,x,A,d){x=null!=x?x:!0;var f=document.createElement("div");f.style.textAlign="center";if(null!=b){var g=document.createElement("div");g.style.padding="0px";g.style.margin="0px";g.style.fontSize="18px";g.style.paddingBottom="16px";g.style.marginBottom="10px";g.style.borderBottom="1px solid #c0c0c0";g.style.color="gray";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,b);g.setAttribute("title",b);f.appendChild(g)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=e;f.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=m&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();m()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=A&&(A=mxUtils.button(A,function(){null!=d&&d()}),A.className="geBtn",e.appendChild(A));var q=mxUtils.button(c,function(){x&&a.hideDialog();null!=k&&k()});
+q.className="geBtn";e.appendChild(q);null!=p&&(c=mxUtils.button(p,function(){x&&a.hideDialog();null!=u&&u()}),c.className="geBtn gePrimaryBtn",e.appendChild(c));this.init=function(){q.focus()};f.appendChild(e);this.container=f},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(a){var b=u.checked||A.checked,c=parseInt(f.value)/100;isNaN(c)&&(c=1,f.value="100%");var c=.75*c,g=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,q=1/e.pageScale;if(b){var y=u.checked?1:parseInt(d.value);isNaN(y)||(q=mxUtils.getScaleForPageCount(y,e,g))}e.getGraphBounds();var k=y=0,g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*c);g.height=Math.ceil(g.height*c);q*=c;!b&&e.pageVisible?(c=e.getPageLayout(),y-=c.x*g.width,k-=c.y*g.height):
+b=!0;b=PrintDialog.createPrintPreview(e,q,g,0,y,k,b);b.open();a&&PrintDialog.printPreview(b)}var e=a.editor.graph,c,k,m=document.createElement("table");m.style.width="100%";m.style.height="100%";var p=document.createElement("tbody");c=document.createElement("tr");var u=document.createElement("input");u.setAttribute("type","checkbox");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";k.appendChild(u);var x=document.createElement("span");mxUtils.write(x," "+mxResources.get("fitPage"));
+k.appendChild(x);mxEvent.addListener(x,"click",function(a){u.checked=!u.checked;A.checked=!u.checked;mxEvent.consume(a)});mxEvent.addListener(u,"change",function(){A.checked=!u.checked});c.appendChild(k);p.appendChild(c);c=c.cloneNode(!1);var A=document.createElement("input");A.setAttribute("type","checkbox");k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(A);x=document.createElement("span");mxUtils.write(x," "+mxResources.get("posterPrint")+":");k.appendChild(x);mxEvent.addListener(x,
+"click",function(a){A.checked=!A.checked;u.checked=!A.checked;mxEvent.consume(a)});c.appendChild(k);var d=document.createElement("input");d.setAttribute("value","1");d.setAttribute("type","number");d.setAttribute("min","1");d.setAttribute("size","4");d.setAttribute("disabled","disabled");d.style.width="50px";k=document.createElement("td");k.style.fontSize="10pt";k.appendChild(d);mxUtils.write(k," "+mxResources.get("pages")+" (max)");c.appendChild(k);p.appendChild(c);mxEvent.addListener(A,"change",
+function(){A.checked?d.removeAttribute("disabled"):d.setAttribute("disabled","disabled");u.checked=!A.checked});c=c.cloneNode(!1);k=document.createElement("td");mxUtils.write(k,mxResources.get("pageScale")+":");c.appendChild(k);k=document.createElement("td");var f=document.createElement("input");f.setAttribute("value","100 %");f.setAttribute("size","5");f.style.width="50px";k.appendChild(f);c.appendChild(k);p.appendChild(c);c=document.createElement("tr");k=document.createElement("td");k.colSpan=2;
+k.style.paddingTop="20px";k.setAttribute("align","right");x=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});x.className="geBtn";a.editor.cancelFirst&&k.appendChild(x);if(PrintDialog.previewEnabled){var g=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});g.className="geBtn";k.appendChild(g)}g=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});g.className="geBtn gePrimaryBtn";k.appendChild(g);a.editor.cancelFirst||
+k.appendChild(x);c.appendChild(k);p.appendChild(c);m.appendChild(p);this.container=m};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(e){}};
+PrintDialog.createPrintPreview=function(a,b,e,c,k,m,p){b=new mxPrintPreview(a,b,e,c,k,m);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var u=b.writeHead;b.writeHead=function(a){u.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
 PrintDialog.previewEnabled=!0;
 var PageSetupDialog=function(a){function b(){null==d||d==mxConstants.NONE?(A.style.backgroundColor="",A.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(A.style.backgroundColor=d,A.style.backgroundImage="")}function e(){null==q?(g.removeAttribute("title"),g.style.fontSize="",g.innerHTML=mxResources.get("change")+"..."):(g.setAttribute("title",q.src),g.style.fontSize="11px",g.innerHTML=q.src.substring(0,42)+"...")}var c=a.editor.graph,k,m,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var t=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var v=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");
+"100%";p.style.height="100%";var u=document.createElement("tbody");k=document.createElement("tr");m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("paperSize")+":");k.appendChild(m);m=document.createElement("td");m.style.verticalAlign="top";m.style.fontSize="10pt";var x=PageSetupDialog.addPageFormatPanel(m,"pagesetupdialog",c.pageFormat);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");
 mxUtils.write(m,mxResources.get("background")+":");k.appendChild(m);m=document.createElement("td");m.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var A=document.createElement("button");A.style.width="18px";A.style.height="18px";A.style.marginRight="20px";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";var d=c.background;b();mxEvent.addListener(A,"click",function(f){a.pickColor(d||"none",function(a){d=a;b()});mxEvent.consume(f)});
-m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
-":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var q=c.backgroundImage;mxEvent.addListener(g,"click",function(d){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(d)});e();m.appendChild(g);k.appendChild(m);t.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,d,q,v.get());b.ignoreColor=c.background==d;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=q?q.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&&
-b.ignoreColor&&b.ignoreImage||c.model.execute(b)});l.className="geBtn gePrimaryBtn";m.appendChild(l);a.editor.cancelFirst||m.appendChild(n);k.appendChild(m);t.appendChild(k);p.appendChild(t);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,b,c){if(c||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<n.length;b++)c=n[b],u?"custom"==c.key&&(t.value=c.key,u=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
-e.height==c.format.height?(t.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(t.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(v.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"),
-t.value="custom",v.style.display="none",d.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var t=document.createElement("select");t.style.marginBottom="8px";t.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px";
-v.style.height="24px";m.style.marginRight="6px";v.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";v.appendChild(p);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));v.appendChild(A);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input");
-f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");v.style.display="none";d.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),l=0;l<n.length;l++){var B=n[l];q[B.key]=B;var x=document.createElement("option");x.setAttribute("value",B.key);mxUtils.write(x,B.title);t.appendChild(x)}var u=!1;k();a.appendChild(t);mxUtils.br(a);
-a.appendChild(v);a.appendChild(d);var H=e,z=function(a,b){var l=q[t.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",v.style.display=""):(v.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=t.value&&p.checked&&(l=new mxRectangle(0,0,
-l.height,l.width));b&&u||l.width==H.width&&l.height==H.height||(H=l,null!=c&&c(H))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(t,"change",function(a){u="custom"==t.value;
+m.appendChild(A);mxUtils.write(m,mxResources.get("gridSize")+":");var f=document.createElement("input");f.setAttribute("type","number");f.setAttribute("min","0");f.style.width="40px";f.style.marginLeft="6px";f.value=c.getGridSize();m.appendChild(f);mxEvent.addListener(f,"change",function(){var a=parseInt(f.value);f.value=Math.max(1,isNaN(a)?c.getGridSize():a)});k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");mxUtils.write(m,mxResources.get("image")+
+":");k.appendChild(m);m=document.createElement("td");var g=document.createElement("a");g.style.textDecoration="underline";g.style.cursor="pointer";g.style.color="#a0a0a0";var q=c.backgroundImage;mxEvent.addListener(g,"click",function(d){a.showBackgroundImageDialog(function(a){q=a;e()});mxEvent.consume(d)});e();m.appendChild(g);k.appendChild(m);u.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.colSpan=2;m.style.paddingTop="16px";m.setAttribute("align","right");var n=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&m.appendChild(n);var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c.gridSize!==f.value&&c.setGridSize(parseInt(f.value));var b=new ChangePageSetup(a,d,q,x.get());b.ignoreColor=c.background==d;b.ignoreImage=(null!=c.backgroundImage?c.backgroundImage.src:null)===(null!=q?q.src:null);c.pageFormat.width==b.previousFormat.width&&c.pageFormat.height==b.previousFormat.height&&
+b.ignoreColor&&b.ignoreImage||c.model.execute(b)});l.className="geBtn gePrimaryBtn";m.appendChild(l);a.editor.cancelFirst||m.appendChild(n);k.appendChild(m);u.appendChild(k);p.appendChild(u);this.container=p};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,c){function k(a,b,c){if(c||f!=document.activeElement&&g!=document.activeElement){a=!1;for(b=0;b<n.length;b++)c=n[b],y?"custom"==c.key&&(u.value=c.key,y=!1):null!=c.format&&("a4"==c.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==c.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==c.format.width&&
+e.height==c.format.height?(u.value=c.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==c.format.height&&e.height==c.format.width&&(u.value=c.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(x.style.display="",d.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"),
+u.value="custom",x.style.display="none",d.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var u=document.createElement("select");u.style.marginBottom="8px";u.style.width="202px";var x=document.createElement("div");x.style.marginLeft="4px";x.style.width="210px";
+x.style.height="24px";m.style.marginRight="6px";x.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));x.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";x.appendChild(p);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));x.appendChild(A);var d=document.createElement("div");d.style.marginLeft="4px";d.style.width="210px";d.style.height="24px";var f=document.createElement("input");
+f.setAttribute("size","7");f.style.textAlign="right";d.appendChild(f);mxUtils.write(d," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";d.appendChild(g);mxUtils.write(d," in");x.style.display="none";d.style.display="none";for(var q={},n=PageSetupDialog.getFormats(),l=0;l<n.length;l++){var B=n[l];q[B.key]=B;var v=document.createElement("option");v.setAttribute("value",B.key);mxUtils.write(v,B.title);u.appendChild(v)}var y=!1;k();a.appendChild(u);mxUtils.br(a);
+a.appendChild(x);a.appendChild(d);var H=e,z=function(a,b){var l=q[u.value];null!=l.format?(f.value=l.format.width/100,g.value=l.format.height/100,d.style.display="none",x.style.display=""):(x.style.display="none",d.style.display="");l=parseFloat(f.value);if(isNaN(l)||0>=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=u.value&&p.checked&&(l=new mxRectangle(0,0,
+l.height,l.width));b&&y||l.width==H.width&&l.height==H.height||(H=l,null!=c&&c(H))};mxEvent.addListener(b,"click",function(a){m.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){p.checked=!0;z(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",z);mxEvent.addListener(f,"click",z);mxEvent.addListener(g,"blur",z);mxEvent.addListener(g,"click",z);mxEvent.addListener(p,"change",z);mxEvent.addListener(m,"change",z);mxEvent.addListener(u,"change",function(a){y="custom"==u.value;
 z(a,!0)});z();return{set:function(a){e=a;k(null,null,!0)},get:function(){return H},widthInput:f,heightInput:g}};
 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)},
@@ -2095,8 +2095,8 @@ d="url("+this.gridImage+")";var g=c=0;null!=a.view.backgroundPageShape&&(g=this.
 b,a.container.className="geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=f,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],f=1;f<this.gridSteps;f++){var g=f*b;d.push("M 0 "+g+" L "+c+" "+g+" M "+g+" 0 L "+g+" "+c)}return'<svg width="'+
 c+'" height="'+c+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var e=
 this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";e.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,g=this.pageFormat,e=d*this.pageScale,n=this.view.getBackgroundPageBounds();b=n.width;c=n.height;var l=
-new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,x=a?Math.ceil(b/l.width)-1:0,u=n.x+b,t=n.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<x&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:x,b=0;b<=d;b++){var f=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(b+1)*l.height)),
-new mxPoint(Math.round(u),Math.round(n.y+(b+1)*l.height))]:[new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(t))];null!=a[b]?(a[b].points=f,a[b].redraw()):(f=new mxPolyline(f,this.pageBreakColor),f.dialect=this.dialect,f.isDashed=this.pageBreakDashed,f.pointerEvents=!1,f.init(this.view.backgroundPane),f.redraw(),a[b]=f)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
+new mxRectangle(d*f.x,d*f.y,g.width*e,g.height*e),k=(a=a&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(c/l.height)-1:0,v=a?Math.ceil(b/l.width)-1:0,y=n.x+b,u=n.y+c;null==this.horizontalPageBreaks&&0<k&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var d=a==this.horizontalPageBreaks?k:v,b=0;b<=d;b++){var c=a==this.horizontalPageBreaks?[new mxPoint(Math.round(n.x),Math.round(n.y+(b+1)*l.height)),
+new mxPoint(Math.round(y),Math.round(n.y+(b+1)*l.height))]:[new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(n.y)),new mxPoint(Math.round(n.x+(b+1)*l.width),Math.round(u))];null!=a[b]?(a[b].points=c,a[b].redraw()):(c=new mxPolyline(c,this.pageBreakColor),c.dialect=this.dialect,c.isDashed=this.pageBreakDashed,c.pointerEvents=!1,c.init(this.view.backgroundPane),c.redraw(),a[b]=c)}for(b=d;b<a.length;b++)a[b].destroy();a.splice(d,a.length-d)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};
 var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,e){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var f=this.graph.getCellGeometry(c[d]);if(null!=f&&f.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?
 !0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,g=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,b)/g),e=Math.floor(Math.min(0,
 c)/d);return new mxRectangle(this.scale*(this.translate.x+f*g),this.scale*(this.translate.y+e*d),this.scale*(Math.ceil(Math.max(1,b+a.width/this.scale)/g)-f)*g,this.scale*(Math.ceil(Math.max(1,c+a.height/this.scale)/d)-e)*d)};var c=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,b){c.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=
@@ -2109,19 +2109,19 @@ k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this
 (b=function(a){if(null!=a){var d=mxEvent.getSource(a);if("A"==d.nodeName)for(;null!=d;){if("geHint"==d.className)return!0;d=d.parentNode}}return k(a)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):c.panningHandler.usePopupTrigger=!1;c.init(this.diagramContainer);mxClient.IS_SVG&&null!=c.view.getDrawPane()&&(b=c.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position=
 "absolute"));this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var d=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-d.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-d.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var m=!1,p=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=
 function(a,d){return m||p.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32!=a.which||c.isEditing()?mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog(null,!0):(m=!0,this.hoverIcons.reset(),c.container.style.cursor="move",c.isEditing()||mxEvent.getSource(a)!=c.container||mxEvent.consume(a))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){c.container.style.cursor="";m=!1});mxEvent.addListener(document,"keyup",
-this.keyupHandler);var t=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return t.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var v=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return v.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var A=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return m||A.apply(this,arguments)};var d=!1,f=null,g=null,q=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var l=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=l}a=this.toolbar.fontMenu;
-l=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var e=0;e<q.length;e++)this.toolbar.container.appendChild(q[e]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=l;q=b}}),l=this,B=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){B.apply(this,arguments);n();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=
-d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=l.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));l.toolbar.setFontName(b);l.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var x=
-c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{x.apply(this,arguments),n()}catch(N){l.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(M){}var u=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=
+this.keyupHandler);var u=c.panningHandler.isForcePanningEvent;c.panningHandler.isForcePanningEvent=function(a){return u.apply(this,arguments)||m||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};var x=c.cellEditor.isStopEditingEvent;c.cellEditor.isStopEditingEvent=function(a){return x.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&
+mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var A=c.isZoomWheelEvent;c.isZoomWheelEvent=function(){return m||A.apply(this,arguments)};var d=!1,f=null,g=null,q=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&d!=c.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;
+e=this.toolbar.sizeMenu;if(null==q)this.toolbar.createTextToolbar();else{for(var l=0;l<q.length;l++)this.toolbar.container.appendChild(q[l]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}d=c.cellEditor.isContentEditing();f=a;g=e;q=b}}),l=this,B=c.cellEditor.startEditing;c.cellEditor.startEditing=function(){B.apply(this,arguments);n();if(c.cellEditor.isContentEditing()){var a=!1,d=function(){a||(a=!0,window.setTimeout(function(){for(var d=c.getSelectedElement();null!=d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=
+d.parentNode;if(null!=d&&(d=mxUtils.getCurrentStyle(d),null!=d&&null!=l.toolbar)){var b=d.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));l.toolbar.setFontName(b);l.toolbar.setFontSize(parseInt(d.fontSize))}a=!1},0))};mxEvent.addListener(c.cellEditor.textarea,"input",d);mxEvent.addListener(c.cellEditor.textarea,"touchend",d);mxEvent.addListener(c.cellEditor.textarea,"mouseup",d);mxEvent.addListener(c.cellEditor.textarea,"keyup",d);d()}};var v=
+c.cellEditor.stopEditing;c.cellEditor.stopEditing=function(a,d){try{v.apply(this,arguments),n()}catch(N){l.handleError(N)}};c.container.setAttribute("tabindex","0");c.container.style.cursor="default";if(window.self===window.top&&null!=c.container.parentNode)try{c.container.focus()}catch(M){}var y=c.fireMouseEvent;c.fireMouseEvent=function(a,d,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();y.apply(this,arguments)};c.popupMenuHandler.autoExpand=!0;null!=this.menus&&(c.popupMenuHandler.factoryMethod=
 mxUtils.bind(this,function(a,d,b){this.menus.createPopupMenu(a,d,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){c.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var H="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),z="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){try{var d=c.view.getState(a);if(null!=d){var b=
-a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var l=c.getModel().getStyle(d.cell),e=null!=l?l.split(";"):[],l=0;l<e.length;l++){var n=e[l],y=n.indexOf("=");if(0<=y){g=n.substring(0,y);var q=n.substring(y+1);null!=f[g]&&"none"==q&&(a.push(q),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}};
-this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),y=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
-["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<y.length;a++)for(b=0;b<y[a].length;b++)H.push(y[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(H,z[a])&&H.push(z[a]);var I=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],l;if(d)l=["fontSize","fontFamily","fontColor"];else{var e=b.getStyle(g),n=null!=e?e.split(";"):[];l=H.slice();for(var q=0;q<n.length;q++){var u=n[q],k=u.indexOf("=");if(0<=k){var x=u.substring(0,k),B=mxUtils.indexOf(l,
-x);0<=B&&l.splice(B,1);for(var U=0;U<y.length;U++){var I=y[U];if(0<=mxUtils.indexOf(I,x))for(var t=0;t<I.length;t++){var m=mxUtils.indexOf(l,I[t]);0<=m&&l.splice(m,1)}}}}}for(var J=b.isEdge(g),p=J?c.currentEdgeStyle:c.currentVertexStyle,v=b.getStyle(g),q=0;q<l.length;q++){var x=l[q],M=p[x];null==M||"shape"==x&&!J||J&&!(0>mxUtils.indexOf(z,x))||(v=mxUtils.setStyle(v,x,M))}b.setStyle(g,v)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){I(d.getProperty("cells"))});c.addListener("textInserted",
-function(a,d){I(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));I(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var l=0;l<b.length&&(f=c.getModel().isVertex(b[l])||f,!(g=c.getModel().isEdge(b[l])||g)||!f);l++);else g=f=!0;for(var b=d.getProperty("keys"),e=d.getProperty("values"),
-l=0;l<b.length;l++){var n=0<=mxUtils.indexOf(F,b[l]);if("strokeColor"!=b[l]||null!=e[l]&&"none"!=e[l])if(0<=mxUtils.indexOf(z,b[l]))g||0<=mxUtils.indexOf(C,b[l])?null==e[l]?delete c.currentEdgeStyle[b[l]]:c.currentEdgeStyle[b[l]]=e[l]:f&&0<=mxUtils.indexOf(H,b[l])&&(null==e[l]?delete c.currentVertexStyle[b[l]]:c.currentVertexStyle[b[l]]=e[l]);else if(0<=mxUtils.indexOf(H,b[l])){if(f||n)null==e[l]?delete c.currentVertexStyle[b[l]]:c.currentVertexStyle[b[l]]=e[l];if(g||n||0<=mxUtils.indexOf(C,b[l]))null==
-e[l]?delete c.currentEdgeStyle[b[l]]:c.currentEdgeStyle[b[l]]=e[l]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||
+a.clone();b.style="";var f=c.getCellStyle(b);a=[];var b=[],g;for(g in d.style)f[g]!=d.style[g]&&(a.push(d.style[g]),b.push(g));for(var e=c.getModel().getStyle(d.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var t=l[e],n=t.indexOf("=");if(0<=n){g=t.substring(0,n);var q=t.substring(n+1);null!=f[g]&&"none"==q&&(a.push(q),b.push(g))}}c.getModel().isEdge(d.cell)?c.currentEdgeStyle={}:c.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",b,"values",a,"cells",[d.cell]))}}catch(T){this.handleError(T)}};
+this.clearDefaultStyle=function(){c.currentEdgeStyle=mxUtils.clone(c.defaultEdgeStyle);c.currentVertexStyle=mxUtils.clone(c.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var F=["fontFamily","fontSize","fontColor"],C="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),t=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],
+["fillColor","gradientColor"],F,["opacity"],["align"],["html"]];for(a=0;a<t.length;a++)for(b=0;b<t[a].length;b++)H.push(t[a][b]);for(a=0;a<z.length;a++)0>mxUtils.indexOf(H,z[a])&&H.push(z[a]);var I=function(a,d){var b=c.getModel();b.beginUpdate();try{for(var f=0;f<a.length;f++){var g=a[f],e;if(d)e=["fontSize","fontFamily","fontColor"];else{var l=b.getStyle(g),n=null!=l?l.split(";"):[];e=H.slice();for(var q=0;q<n.length;q++){var y=n[q],k=y.indexOf("=");if(0<=k){var v=y.substring(0,k),B=mxUtils.indexOf(e,
+v);0<=B&&e.splice(B,1);for(var U=0;U<t.length;U++){var I=t[U];if(0<=mxUtils.indexOf(I,v))for(var u=0;u<I.length;u++){var m=mxUtils.indexOf(e,I[u]);0<=m&&e.splice(m,1)}}}}}for(var J=b.isEdge(g),p=J?c.currentEdgeStyle:c.currentVertexStyle,x=b.getStyle(g),q=0;q<e.length;q++){var v=e[q],M=p[v];null==M||"shape"==v&&!J||J&&!(0>mxUtils.indexOf(z,v))||(x=mxUtils.setStyle(x,v,M))}b.setStyle(g,x)}}finally{b.endUpdate()}};c.addListener("cellsInserted",function(a,d){I(d.getProperty("cells"))});c.addListener("textInserted",
+function(a,d){I(d.getProperty("cells"),!0)});c.connectionHandler.addListener(mxEvent.CONNECT,function(a,d){var b=[d.getProperty("cell")];d.getProperty("terminalInserted")&&b.push(d.getProperty("terminal"));I(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,d){var b=d.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=c.getModel().isVertex(b[e])||f,!(g=c.getModel().isEdge(b[e])||g)||!f);e++);else g=f=!0;for(var b=d.getProperty("keys"),l=d.getProperty("values"),
+e=0;e<b.length;e++){var n=0<=mxUtils.indexOf(F,b[e]);if("strokeColor"!=b[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(z,b[e]))g||0<=mxUtils.indexOf(C,b[e])?null==l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]:f&&0<=mxUtils.indexOf(H,b[e])&&(null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e]);else if(0<=mxUtils.indexOf(H,b[e])){if(f||n)null==l[e]?delete c.currentVertexStyle[b[e]]:c.currentVertexStyle[b[e]]=l[e];if(g||n||0<=mxUtils.indexOf(C,b[e]))null==
+l[e]?delete c.currentEdgeStyle[b[e]]:c.currentEdgeStyle[b[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(c.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(c.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==c.currentEdgeStyle.edgeStyle&&"1"==c.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==c.currentEdgeStyle.edgeStyle||
 "none"==c.currentEdgeStyle.edgeStyle||null==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==c.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==c.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),
 null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==c.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==c.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==c.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("start",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_STARTARROW],
 mxUtils.getValue(c.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",c.currentEdgeStyle.shape,c.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(c.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=c.currentVertexStyle.fontFamily||"Helvetica",d=String(c.currentVertexStyle.fontSize||"12"),b=c.getView().getState(c.getSelectionCell());
@@ -2144,33 +2144,33 @@ EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipb
 0),g=0;g<m.length;g++)d.add(f,m[g]);b.updateCustomLinks(b.createCellMapping(e,k),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return c};var e=mxClipboard.paste;mxClipboard.paste=function(b){var c=null;b.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):c=e.apply(this,arguments);a.updatePasteActionStates();return c};var c=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){c.apply(this,arguments);a.updatePasteActionStates()};
 var k=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){k.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
 EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),d=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*d.width),this.scale*(this.translate.y+a.y*d.height),this.scale*a.width*d.width,
-this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),l=mxUtils.hasScrollbars(a.container),e=a.view.translate,n=a.view.scale,y=mxRectangle.fromRectangle(g);
-y.x=y.x/n-e.x;y.y=y.y/n-e.y;y.width/=n;y.height/=n;var e=a.container.scrollTop,q=a.container.scrollLeft,E=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)E+=3;var u=a.container.offsetWidth-E,E=a.container.offsetHeight-E;d=d?Math.max(.3,Math.min(b||1,u/y.width)):n;b=(u-d*y.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(E-d*y.height)/this.lightboxVerticalDivider/d;l&&(b=Math.max(b,0),k=Math.max(k,0));if(l||g.width<u||g.height<E)a.view.scaleAndTranslate(d,
-Math.floor(b-y.x),Math.floor(k-y.y)),a.container.scrollTop=e*d/n,a.container.scrollLeft=q*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
+this.scale*a.height*d.height)};a.getPreferredPageSize=function(a,d,b){a=this.getPageLayout();d=this.getPageSize();return new mxRectangle(0,0,a.width*d.width,a.height*d.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(d,b,c,f){if(null!=a.container&&!a.isViewer()){c=null!=c?c:0;f=null!=f?f:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,n=a.view.scale,t=mxRectangle.fromRectangle(g);
+t.x=t.x/n-l.x;t.y=t.y/n-l.y;t.width/=n;t.height/=n;var l=a.container.scrollTop,q=a.container.scrollLeft,E=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)E+=3;var y=a.container.offsetWidth-E,E=a.container.offsetHeight-E;d=d?Math.max(.3,Math.min(b||1,y/t.width)):n;b=(y-d*t.width)/2/d;var k=0==this.lightboxVerticalDivider?0:(E-d*t.height)/this.lightboxVerticalDivider/d;e&&(b=Math.max(b,0),k=Math.max(k,0));if(e||g.width<y||g.height<E)a.view.scaleAndTranslate(d,
+Math.floor(b-t.x),Math.floor(k-t.y)),a.container.scrollTop=l*d/n,a.container.scrollLeft=q*d/n;else if(0!=c||0!=f)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+c/n),Math.floor(g.y+f/n))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var c=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",c);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",c)});this.editor.addListener("resetGraphView",
 mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(d){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(d){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=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.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var m=mxUtils.bind(this,function(){var d=
 mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=d?parseInt(d["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",m);m();var p=0,m=mxUtils.bind(this,function(a,d,b){p++;var c=document.createElement("span");c.style.paddingLeft="8px";c.style.paddingRight="8px";c.style.cursor="pointer";mxEvent.addListener(c,"click",a);null!=b&&c.setAttribute("title",
-b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var t=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),v=document.createElement("div");
-v.style.display="inline-block";v.style.verticalAlign="top";v.style.fontFamily="Helvetica,Arial";v.style.marginTop="8px";v.style.fontSize="14px";v.style.color="#ffffff";this.chromelessToolbar.appendChild(v);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(v.innerHTML="",mxUtils.write(v,mxUtils.indexOf(this.pages,
-this.currentPage)+1+" / "+this.pages.length))});t.style.paddingLeft="0px";t.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",t.style.display="",v.style.display="inline-block"):(A.style.display="none",t.style.display="none",v.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);m(mxUtils.bind(this,
+b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",d);c.appendChild(a);this.chromelessToolbar.appendChild(c);return c});null!=k.backBtn&&m(mxUtils.bind(this,function(a){window.location.href=k.backBtn.url;mxEvent.consume(a)}),Editor.backLargeImage,mxResources.get("back",null,"Back"));var u=m(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),x=document.createElement("div");
+x.style.display="inline-block";x.style.verticalAlign="top";x.style.fontFamily="Helvetica,Arial";x.style.marginTop="8px";x.style.fontSize="14px";x.style.color="#ffffff";this.chromelessToolbar.appendChild(x);var A=m(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),d=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(x.innerHTML="",mxUtils.write(x,mxUtils.indexOf(this.pages,
+this.currentPage)+1+" / "+this.pages.length))});u.style.paddingLeft="0px";u.style.paddingRight="4px";A.style.paddingLeft="4px";A.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(A.style.display="",u.style.display="",x.style.display="inline-block"):(A.style.display="none",u.style.display="none",x.style.display="none");d()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",d);m(mxUtils.bind(this,
 function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");m(mxUtils.bind(this,function(d){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(d)}),Editor.actualSizeLargeImage,
 mxResources.get("fit"));var g=null,q=null,n=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q),fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;q=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";q=null}),600)}),a||200)}),l=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=q&&(window.clearTimeout(q),
 fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var B=m(mxUtils.bind(this,function(d){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
 null}));var b=B.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
-this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),x=a.getModel();x.addListener(mxEvent.CHANGE,function(){B.style.display=1<x.getChildCount(x.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(d){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var u=this.lightboxToolbarActions[f];m(u.fn,u.icon,u.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(d)}),Editor.layersLargeImage,mxResources.get("layers")),v=a.getModel();v.addListener(mxEvent.CHANGE,function(){B.style.display=1<v.getChildCount(v.root)?"":"none"})}this.addChromelessToolbarItems(m);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||m(mxUtils.bind(this,function(d){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(d)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(f=0;f<this.lightboxToolbarActions.length;f++){var y=this.lightboxToolbarActions[f];m(y.fn,y.icon,y.tooltip)}null!=k.refreshBtn&&m(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
 window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&m(mxUtils.bind(this,function(d){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(d)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&m(mxUtils.bind(this,
 function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
 l(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():l(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
 l(30)}));var H=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(d,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,d){},mouseUp:function(d,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<H&&Math.abs(this.scrollTop-a.container.scrollTop)<H&&Math.abs(this.startX-b.getGraphX())<H&&Math.abs(this.startY-b.getGraphY())<
 H&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?n():l(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var z=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),d=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*d.width;this.translate.y=a.y-(this.y0||0)*d.height}z.apply(this,arguments)};if(!a.isViewer()){var F=a.sizeDidChange;a.sizeDidChange=
-function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),l=a.minimumGraphSize;if(null==l||l.width!=f||l.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?F.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=
-d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),y=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,M=null,J=null,N=null,D=function(d){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
-function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),y.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(y.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){y.style.transform="";C.style.transform=""},0)):(y.style.transform=
+function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var d=this.getPageLayout(),b=this.getPagePadding(),c=this.getPageSize(),f=Math.ceil(2*b.x+d.width*c.width),g=Math.ceil(2*b.y+d.height*c.height),e=a.minimumGraphSize;if(null==e||e.width!=f||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,f,g);f=b.x-d.x*c.width;b=b.y-d.y*c.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==b?F.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=d.x,this.view.y0=
+d.y,d=a.view.translate.x,c=a.view.translate.y,a.view.setTranslate(f,b),a.container.scrollLeft+=Math.round((f-d)*a.view.scale),a.container.scrollTop+=Math.round((b-c)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var C=a.view.getBackgroundPane(),t=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,M=null,J=null,N=null,D=function(d){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
+function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),t.style.transformOrigin="",C.style.transformOrigin="",mxClient.IS_SF?(t.style.transform="scale(1)",C.style.transform="scale(1)",window.setTimeout(function(){t.style.transform="";C.style.transform=""},0)):(t.style.transform=
 "",C.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var d=new mxPoint(a.container.scrollLeft,a.container.scrollTop),c=mxUtils.getOffset(a.container),f=a.view.scale,g=0,l=0;null!=M&&(g=a.container.offsetWidth/2-M.x+c.x,l=a.container.offsetHeight/2-M.y+c.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=f&&(null!=J&&(g+=d.x-J.x,l+=d.y-J.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
-0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&y.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=M=J=I=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=N&&t.setAttribute("filter",N);a.cumulativeZoomFactor=1;N=M=J=I=null}),null!=d?d:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(d,b,c){(b=b||!a.scrollbars)&&(M=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));d?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
 (this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
-this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=y.getAttribute("filter")&&(N=y.getAttribute("filter"),y.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;y.style.transformOrigin=d+"px "+f+"px";y.style.transform="scale("+
+this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==N&&""!=t.getAttribute("filter")&&(N=t.getAttribute("filter"),t.removeAttribute("filter"));J=new mxPoint(a.container.scrollLeft,a.container.scrollTop);d=b?a.container.scrollLeft+a.container.clientWidth/2:M.x+a.container.scrollLeft-a.container.offsetLeft;var f=b?a.container.scrollTop+a.container.clientHeight/2:M.y+a.container.scrollTop-a.container.offsetTop;t.style.transformOrigin=d+"px "+f+"px";t.style.transform="scale("+
 this.cumulativeZoomFactor+")";C.style.transformOrigin=d+"px "+f+"px";C.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(d=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(d.style,"transform-origin",(b?a.container.clientWidth/2+a.container.scrollLeft-d.offsetLeft+"px":M.x+a.container.scrollLeft-d.offsetLeft-a.container.offsetLeft+"px")+" "+(b?a.container.clientHeight/2+a.container.scrollTop-d.offsetTop+"px":M.y+
 a.container.scrollTop-d.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(d.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}D(c)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(d){1!=a.cumulativeZoomFactor&&D(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
 D(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(d,b,c){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(d)){c=a.view.getTranslate();var f=40/a.view.scale;mxEvent.isShiftDown(d)?a.view.setTranslate(c.x+(b?-f:f),c.y):a.view.setTranslate(c.x,c.y+(b?f:-f))}else if(c||a.isZoomWheelEvent(d))for(c=mxEvent.getSource(d);null!=c;){if(c==a.container)return a.tooltipHandler.hideTooltip(),M=new mxPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)),a.lazyZoom(b),
@@ -2204,12 +2204,12 @@ this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell(
 this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&
 e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
 EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,c=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,c=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var k=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var t=0;if(null!=this.sidebarFooterContainer){var v=
-this.footerHeight+k,t=Math.max(0,Math.min(c-p-v,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=t+"px";this.sidebarFooterContainer.style.bottom=v+"px"}v=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=v+"px";this.formatContainer.style.display=null!=this.format?"":"none";var A=this.getDiagramContainerOffset(),
+(k=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var m=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var u=0;if(null!=this.sidebarFooterContainer){var x=
+this.footerHeight+k,u=Math.max(0,Math.min(c-p-x,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=m+"px";this.sidebarFooterContainer.style.height=u+"px";this.sidebarFooterContainer.style.bottom=x+"px"}x=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=m+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=x+"px";this.formatContainer.style.display=null!=this.format?"":"none";var A=this.getDiagramContainerOffset(),
 d=null!=this.hsplit.parentNode?m+this.splitSize:0;this.diagramContainer.style.left=d+A.x+"px";this.diagramContainer.style.top=p+A.y+"px";this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+k+"px";this.hsplit.style.left=m+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=d+"px");b?(this.menubarContainer.style.width=e+"px",
-this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-t+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-v)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,t=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
-this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",t-=this.tabContainer.clientHeight),this.diagramContainer.style.height=t+"px",this.hsplit.style.height=t+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=v+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
-this.footerHeight+t+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.toolbarContainer.style.width=this.menubarContainer.style.width,b=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-u+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-m-this.splitSize-x)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,u=Math.max(0,c-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=
+this.diagramContainer.style.width,this.tabContainer.style.bottom=this.footerHeight+k+"px",u-=this.tabContainer.clientHeight),this.diagramContainer.style.height=u+"px",this.hsplit.style.height=u+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=k+"px"),this.diagramContainer.style.right=x+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+k+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=
+this.footerHeight+u+k+"px",this.formatContainer.style.bottom=this.footerHeight+k+"px",this.diagramContainer.style.bottom=this.footerHeight+k+e+"px");a&&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-2;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()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2218,10 +2218,10 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
 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(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
 EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,t+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);t!=d()&&(v=!0,A=null)}}function m(a){k(a);p=t=null}var p=null,t=null,v=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var d=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));t=d();v=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!v&&this.hsplitClickEnabled){var b=null!=A?A-e:0;A=d();c(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
+EditorUi.prototype.addSplitHandler=function(a,b,e,c){function k(a){if(null!=p){var f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));c(Math.max(0,u+(b?f.x-p.x:p.y-f.y)-e));mxEvent.consume(a);u!=d()&&(x=!0,A=null)}}function m(a){k(a);p=u=null}var p=null,u=null,x=!0,A=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var d=mxUtils.bind(this,function(){var d=parseInt(b?a.style.left:a.style.bottom);b||(d=d+e-this.footerHeight);return d});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));u=d();x=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){if(!x&&this.hsplitClickEnabled){var b=null!=A?A-e:0;A=d();c(b);mxEvent.consume(a)}}));mxEvent.addGestureListeners(document,null,k,m);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,k,m)})};
 EditorUi.prototype.handleError=function(a,b,e,c,k){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));var m=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(k=mxUtils.htmlEntities(a.message));this.showError(b,k,m,e,null,null,null,null,null,null,null,null,c?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,c,k,m,p,t,v,A,d,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),c,k,m,p,f,t,v);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,d||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,c,k,m,p,t,v,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,m,p,t,v,A);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(a,b,e,c,k,m,p,u,x,A,d,f,g){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),c,k,m,p,f,u,x);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,A||340,d||100+20*b,!0,!1,g);a.init()};EditorUi.prototype.showDialog=function(a,b,e,c,k,m,p,u,x,A){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,c,k,m,p,u,x,A);this.dialogs.push(this.dialog)};
 EditorUi.prototype.hideDialog=function(a,b){if(null!=this.dialogs&&0<this.dialogs.length){var e=this.dialogs.pop();0==e.close(a,b)?this.dialogs.push(e):(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.pickColor=function(a,b){var e=this.editor.graph,c=e.cellEditor.saveSelection(),k=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12)),m=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(c);b(a)},function(){e.cellEditor.restoreSelection(c)});this.showDialog(m.container,230,k,!0,!1);m.init()};
 EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
@@ -2238,10 +2238,10 @@ EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroun
 EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize"};
 EditorUi.prototype.createKeyHandler=function(a){function b(a,d,b){p.push(function(){if(!c.isSelectionEmpty()&&c.isEnabled())if(d=null!=d?d:1,b){c.getModel().beginUpdate();try{for(var f=c.getSelectionCells(),g=0;g<f.length;g++)if(c.getModel().isVertex(f[g])&&c.isCellResizable(f[g])){var e=c.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-d):38==a?e.height=Math.max(0,e.height-d):39==a?e.width+=d:40==a&&(e.height+=d),c.getModel().setGeometry(f[g],e))}}finally{c.getModel().endUpdate()}}else{var e=
 c.getSelectionCell(),n=c.model.getParent(e),f=null;1==c.getSelectionCount()&&c.model.isVertex(e)&&null!=c.layoutManager&&!c.isCellLocked(e)&&(f=c.layoutManager.getLayout(n));if(null!=f&&f.constructor==mxStackLayout)f=n.getIndex(e),37==a||38==a?c.model.add(n,e,Math.max(0,f-1)):39!=a&&40!=a||c.model.add(n,e,Math.min(c.model.getChildCount(n),f+1));else{f=c.getMovableCells(c.getSelectionCells());e=[];for(g=0;g<f.length;g++)n=c.view.getState(f[g]),n=null!=n?n.style:c.getCellStyle(f[g]),"1"==mxUtils.getValue(n,
-"part","0")?(n=c.model.getParent(f[g]),c.model.isVertex(n)&&0>mxUtils.indexOf(f,n)&&e.push(n)):e.push(f[g]);0<e.length&&(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(e,f,g))}}});null!=t&&window.clearTimeout(t);t=window.setTimeout(function(){if(0<p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&
+"part","0")?(n=c.model.getParent(f[g]),c.model.isVertex(n)&&0>mxUtils.indexOf(f,n)&&e.push(n)):e.push(f[g]);0<e.length&&(g=f=0,37==a?f=-d:38==a?g=-d:39==a?f=d:40==a&&(g=d),c.moveCells(e,f,g))}}});null!=u&&window.clearTimeout(u);u=window.setTimeout(function(){if(0<p.length){c.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{c.getModel().endUpdate()}}},200)}var e=this,c=this.editor.graph,k=new mxKeyHandler(c),m=k.isEventIgnored;k.isEventIgnored=function(a){return!(mxEvent.isShiftDown(a)&&
 9==a.keyCode)&&(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&m.apply(this,arguments)};k.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()&&(null==e.dialogs||0==e.dialogs.length)};k.isControlDown=function(a){return mxEvent.isControlDown(a)||
-mxClient.IS_MAC&&a.metaKey};var p=[],t=null,v={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return c.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:
-mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=v[a.keyCode]&&!c.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),v[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),
+mxClient.IS_MAC&&a.metaKey};var p=[],u=null,x={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},A=k.getFunction;mxKeyHandler.prototype.getFunction=function(a){if(c.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var d=e.actions.get(e.altShiftActions[a.keyCode]);if(null!=d)return d.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return c.cellEditor.isContentEditing()?function(){document.execCommand("outdent",!1,null)}:
+mxEvent.isShiftDown(a)?function(){c.selectParentCell()}:function(){c.selectChildCell()};if(null!=x[a.keyCode]&&!c.isSelectionEmpty())if(!this.isControlDown(a)&&mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(c.model.isVertex(c.getSelectionCell()))return function(){var d=c.connectVertex(c.getSelectionCell(),x[a.keyCode],c.defaultEdgeLength,a,!0);null!=d&&0<d.length&&(1==d.length&&c.model.isEdge(d[0])?c.setSelectionCell(c.model.getTerminal(d[0],!1)):c.setSelectionCell(d[d.length-1]),c.scrollCellToVisible(c.getSelectionCell()),
 null!=e.hoverIcons&&e.hoverIcons.update(c.view.getState(c.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?c.gridSize:null)}}return A.apply(this,arguments)};k.bindAction=mxUtils.bind(this,function(a,d,b,c){var f=this.actions.get(b);null!=f&&(b=function(){f.isEnabled()&&f.funct()},d?c?k.bindControlShiftKey(a,b):k.bindControlKey(a,b):c?k.bindShiftKey(a,b):k.bindKey(a,b))});var d=
 this,f=k.escape;k.escape=function(a){f.apply(this,arguments)};k.enter=function(){};k.bindControlShiftKey(36,function(){c.exitGroup()});k.bindControlShiftKey(35,function(){c.enterGroup()});k.bindKey(36,function(){c.home()});k.bindKey(35,function(){c.refresh()});k.bindAction(107,!0,"zoomIn");k.bindAction(109,!0,"zoomOut");k.bindAction(80,!0,"print");k.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)k.bindControlKey(36,function(){c.isEnabled()&&c.foldCells(!0)}),k.bindControlKey(35,
 function(){c.isEnabled()&&c.foldCells(!1)}),k.bindControlKey(13,function(){if(c.isEnabled())try{c.setSelectionCells(c.duplicateCells(c.getSelectionCells(),!1))}catch(g){d.handleError(g)}}),k.bindAction(8,!1,"delete"),k.bindAction(8,!0,"deleteAll"),k.bindAction(46,!1,"delete"),k.bindAction(46,!0,"deleteAll"),k.bindAction(72,!0,"resetView"),k.bindAction(72,!0,"fitWindow",!0),k.bindAction(74,!0,"fitPage"),k.bindAction(74,!0,"fitTwoPages",!0),k.bindAction(48,!0,"customZoom"),k.bindAction(82,!0,"turn"),
@@ -2256,24 +2256,24 @@ mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHAD
 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.gridColor=mxGraphView.prototype.defaultGridColor;
 mxGraphView.prototype.unit=mxConstants.POINTS;mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,e){return null};
 Graph=function(a,b,e,c,k,m){mxGraph.call(this,a,b,e,c);this.themes=k||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=m?m:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var d=this.view.getState(a);a=
-null!=d?d.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,t=null,v=null,A=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(p=new mxPoint(c.getGraphX(),c.getGraphY()),
-d=this.isCellSelected(f.cell),v=f,t=c,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?A=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(A=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var f=this.selectionCellsHandler.handlers.map,c;for(c in f)if(null!=f[c].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
-!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(c=this.tolerance,null!=p&&null!=v&&null!=t){if(f=v,Math.abs(p.x-b.getGraphX())>c||Math.abs(p.y-b.getGraphY())>c){this.isCellSelected(f.cell)||this.setSelectionCell(f.cell);var g=this.selectionCellsHandler.getHandler(f.cell);if(null!=g&&null!=g.bends&&0<g.bends.length){var e=g.getHandleForEvent(t),l=this.view.getEdgeStyle(f);c=l==mxEdgeStyle.EntityRelation;d||A!=mxEvent.LABEL_HANDLE||(e=A);
-if(c&&0!=e&&e!=g.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!c||null==f.visibleSourceState&&null==f.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=f.visibleSourceState||e==g.bends.length-1||null!=f.visibleTargetState)c||e==mxEvent.LABEL_HANDLE||(c=f.absolutePoints,null!=c&&(null==l&&null==e||l==mxEdgeStyle.OrthConnector)&&(e=A,null==e&&(e=new mxRectangle(p.x,p.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,c[0].x,c[0].y)?
-e=0:mxUtils.contains(e,c[c.length-1].x,c[c.length-1].y)?e=g.bends.length-1:null!=l&&(2==c.length||3==c.length&&(0==Math.round(c[0].x-c[1].x)&&0==Math.round(c[1].x-c[2].x)||0==Math.round(c[0].y-c[1].y)&&0==Math.round(c[1].y-c[2].y)))?e=2:(e=mxUtils.findNearestSegment(f,p.x,p.y),e=null==l?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),g.start(b.getGraphX(),b.getGraphX(),e),A=p=t=v=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(f=b.getState(),null!=f&&this.model.isEdge(f.cell)){g=
-null;c=f.absolutePoints;if(null!=c)if(e=new mxRectangle(b.getGraphX(),b.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,b.getGraphX(),b.getGraphY()))g="move";else if(mxUtils.contains(e,c[0].x,c[0].y)||mxUtils.contains(e,c[c.length-1].x,c[c.length-1].y))g="pointer";else if(null!=f.visibleSourceState||null!=f.visibleTargetState)l=this.view.getEdgeStyle(f),g="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(f)&&
-(l=mxUtils.findNearestSegment(f,b.getGraphX(),b.getGraphY()),l<c.length-1&&0<=l&&(g=0==Math.round(c[l].x-c[l+1].x)?"col-resize":"row-resize"));null!=g&&f.setCursor(g)}}),mouseUp:mxUtils.bind(this,function(a,d){A=p=t=v=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
+null!=d?d.style:this.getCellStyle(a);return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var p=null,u=null,x=null,A=null,d=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var c=b.getProperty("event");if(!mxEvent.isControlDown(c.getEvent())&&!mxEvent.isShiftDown(c.getEvent())){var f=c.getState();null!=f&&this.model.isEdge(f.cell)&&(p=new mxPoint(c.getGraphX(),c.getGraphY()),
+d=this.isCellSelected(f.cell),x=f,u=c,null!=f.text&&null!=f.text.boundingBox&&mxUtils.contains(f.text.boundingBox,c.getGraphX(),c.getGraphY())?A=mxEvent.LABEL_HANDLE:(f=this.selectionCellsHandler.getHandler(f.cell),null!=f&&null!=f.bends&&0<f.bends.length&&(A=f.getHandleForEvent(c))))}}}));this.addMouseListener({mouseDown:function(a,d){},mouseMove:mxUtils.bind(this,function(a,b){var c=this.selectionCellsHandler.handlers.map,f;for(f in c)if(null!=c[f].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&
+!mxEvent.isControlDown(b.getEvent())&&!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(f=this.tolerance,null!=p&&null!=x&&null!=u){if(c=x,Math.abs(p.x-b.getGraphX())>f||Math.abs(p.y-b.getGraphY())>f){this.isCellSelected(c.cell)||this.setSelectionCell(c.cell);var e=this.selectionCellsHandler.getHandler(c.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var g=e.getHandleForEvent(u),l=this.view.getEdgeStyle(c);f=l==mxEdgeStyle.EntityRelation;d||A!=mxEvent.LABEL_HANDLE||(g=A);
+if(f&&0!=g&&g!=e.bends.length-1&&g!=mxEvent.LABEL_HANDLE)!f||null==c.visibleSourceState&&null==c.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(g==mxEvent.LABEL_HANDLE||0==g||null!=c.visibleSourceState||g==e.bends.length-1||null!=c.visibleTargetState)f||g==mxEvent.LABEL_HANDLE||(f=c.absolutePoints,null!=f&&(null==l&&null==g||l==mxEdgeStyle.OrthConnector)&&(g=A,null==g&&(g=new mxRectangle(p.x,p.y),g.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(g,f[0].x,f[0].y)?
+g=0:mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y)?g=e.bends.length-1:null!=l&&(2==f.length||3==f.length&&(0==Math.round(f[0].x-f[1].x)&&0==Math.round(f[1].x-f[2].x)||0==Math.round(f[0].y-f[1].y)&&0==Math.round(f[1].y-f[2].y)))?g=2:(g=mxUtils.findNearestSegment(c,p.x,p.y),g=null==l?mxEvent.VIRTUAL_HANDLE-g:g+1))),null==g&&(g=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),g),A=p=u=x=null,d=!1,b.consume(),this.graphHandler.reset()}}}else if(c=b.getState(),null!=c&&this.model.isEdge(c.cell)){e=
+null;f=c.absolutePoints;if(null!=f)if(g=new mxRectangle(b.getGraphX(),b.getGraphY()),g.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=c.text&&null!=c.text.boundingBox&&mxUtils.contains(c.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(g,f[0].x,f[0].y)||mxUtils.contains(g,f[f.length-1].x,f[f.length-1].y))e="pointer";else if(null!=c.visibleSourceState||null!=c.visibleTargetState)l=this.view.getEdgeStyle(c),e="crosshair",l!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(c)&&
+(l=mxUtils.findNearestSegment(c,b.getGraphX(),b.getGraphY()),l<f.length-1&&0<=l&&(e=0==Math.round(f[l].x-f[l+1].x)?"col-resize":"row-resize"));null!=e&&c.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,d){A=p=u=x=null})})}this.cellRenderer.getLabelValue=function(a){var d=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(d=1!=a.style.html?mxUtils.htmlEntities(d,!1):a.view.graph.sanitizeHtml(d));return d};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(a,d){return!1};this.alternateEdgeStyle="vertical";null==c&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,e=b.width*c,b=b.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),n=0;n<l.width;n++)d.push(new mxRectangle(((l.x+n)*e+c.x)*g,(l.y*b+c.y)*g,e*g,b*g));for(n=1;n<l.height;n++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+n)*b+c.y)*g,e*g,b*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=
+this.graphHandler.getGuideStates=function(){var a=f.apply(this,arguments);if(this.graph.pageVisible){for(var d=[],b=this.graph.pageFormat,c=this.graph.pageScale,e=b.width*c,b=b.height*c,c=this.graph.view.translate,g=this.graph.view.scale,l=this.graph.getPageLayout(),t=0;t<l.width;t++)d.push(new mxRectangle(((l.x+t)*e+c.x)*g,(l.y*b+c.y)*g,e*g,b*g));for(t=1;t<l.height;t++)d.push(new mxRectangle((l.x*e+c.x)*g,((l.y+t)*b+c.y)*g,e*g,b*g));a=d.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=
 mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,d){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var g=this.graphHandler.getCells;this.graphHandler.getCells=function(a){for(var d=g.apply(this,arguments),b=[],c=0;c<d.length;c++){var f=this.graph.view.getState(d[c]),
 f=null!=f?f.style:this.graph.getCellStyle(d[c]);"1"==mxUtils.getValue(f,"part","0")?(f=this.graph.model.getParent(d[c]),this.graph.model.isVertex(f)&&0>mxUtils.indexOf(d,f)&&b.push(f)):b.push(d[c])}return b};var q=this.graphHandler.start;this.graphHandler.start=function(a,d,b,c){var f=this.graph.view.getState(a);null!=f&&mxUtils.getValue(f.style,"part",!1)&&(a=this.graph.model.getParent(a));q.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(a,d){var b=this.graph.view.getState(d),
-b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);this.getRubberband=function(){return n};var l=(new Date).getTime(),B=0,x=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;x.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),B=0):
-B=(new Date).getTime()-l};var u=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<B||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&u.apply(this,arguments)};var H=this.isToggleEvent;this.isToggleEvent=function(a){return H.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=n.isForceRubberbandEvent;n.isForceRubberbandEvent=
+b=null!=b?b.style:this.graph.getCellStyle(d);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(d),this.graph.model.isVertex(b)&&(d=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);this.getRubberband=function(){return n};var l=(new Date).getTime(),B=0,v=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;v.apply(this,arguments);a!=this.currentState?(l=(new Date).getTime(),B=0):
+B=(new Date).getTime()-l};var y=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<B||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&y.apply(this,arguments)};var H=this.isToggleEvent;this.isToggleEvent=function(a){return H.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var z=n.isForceRubberbandEvent;n.isForceRubberbandEvent=
 function(a){return z.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var F=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(F=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=F)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var C=this.click;this.click=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!d||a.isConsumed())return C.apply(this,arguments);var b=d?a.sourceState.cell:a.getCell();null!=b&&(b=this.getClickableLinkForCell(b),null!=b&&(this.isCustomLink(b)?
-this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var y=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";
-if(this.isCellLocked(a))return"default"}return y.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,g){g=null!=g?g:[];if(0<b||0<c){var e=this.getModel(),l=a+b,n=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=e.getRoot()));if(null!=f)for(var y=e.getChildCount(f),q=0;q<y;q++){var U=e.getChildAt(f,q),k=this.view.getState(U);if(null!=k&&this.isCellVisible(U)&&"1"!=mxUtils.getValue(k.style,
-"locked","0")){var u=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=u&&(k=mxUtils.getBoundingBox(k,u));(e.isEdge(U)||e.isVertex(U))&&k.x>=a&&k.y+k.height<=n&&k.y>=d&&k.x+k.width<=l&&g.push(U);this.getAllCells(a,d,b,c,U,g)}}}return g};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
+this.customLinkClicked(b):this.openLink(b)));this.isEnabled()&&d&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var d=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(d?a.sourceState.cell:a.getCell())};var t=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";
+if(this.isCellLocked(a))return"default"}return t.apply(this,arguments)};this.selectRegion=function(a,d){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,d);return b};this.getAllCells=function(a,d,b,c,f,e){e=null!=e?e:[];if(0<b||0<c){var g=this.getModel(),l=a+b,t=d+c;null==f&&(f=this.getCurrentRoot(),null==f&&(f=g.getRoot()));if(null!=f)for(var n=g.getChildCount(f),q=0;q<n;q++){var U=g.getChildAt(f,q),k=this.view.getState(U);if(null!=k&&this.isCellVisible(U)&&"1"!=mxUtils.getValue(k.style,
+"locked","0")){var y=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=y&&(k=mxUtils.getBoundingBox(k,y));(g.isEdge(U)||g.isVertex(U))&&k.x>=a&&k.y+k.height<=t&&k.y>=d&&k.x+k.width<=l&&e.push(U);this.getAllCells(a,d,b,c,U,e)}}}return e};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,d,b){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,
 "locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var M=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")){var b=d.getProperty("event").getState();M=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,d){if(!mxEvent.isMultiTouchEvent(d)){var b=d.getProperty("event"),c=d.getProperty("cell");
 null==c?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),n.start(b.x,b.y)):null!=M?this.addSelectionCells(M):1<this.getSelectionCount()&&this.isCellSelected(c)&&this.removeSelectionCell(c);M=null;d.consume()}}));this.connectionHandler.selectCells=function(a,d){this.graph.setSelectionCell(d||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,d){return d&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
 function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
@@ -2285,24 +2285,24 @@ Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)
 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=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";
 Graph.prototype.defaultPageBorderColor="#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=/^(?:[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.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,p=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),t=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),v=mxUtils.bind(this,function(b){if(k)for(var d=mxEvent.getSource(b);null!=
-d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,t,v);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
-(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,p,t,v){this.useCssTransforms&&
-(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,p,t,v){p=null!=p?p:!0;t=null!=t?t:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,p,t,v);if(null!=f)return f;if(this.isCellVisible(d)&&(t&&this.model.isEdge(d)||
-p&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==v||!v(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,k=!0,m=null,p=mxUtils.bind(this,function(a){k=!0;m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),u=mxUtils.bind(this,function(a){k=k&&null!=m&&Math.abs(m.x-mxEvent.getClientX(a))<b&&Math.abs(m.y-mxEvent.getClientY(a))<b}),x=mxUtils.bind(this,function(b){if(k)for(var d=mxEvent.getSource(b);null!=
+d&&d!=e.node;){if("a"==d.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,d,b);break}d=d.parentNode}});mxEvent.addGestureListeners(e.node,p,u,x);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};
+(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&this.isCssTransformsSupported()};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(a,b,e,p,u,x){this.useCssTransforms&&
+(a=a/this.currentScale-this.currentTranslate.x,b=b/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(a,b,e,p,u,x){p=null!=p?p:!0;u=null!=u?u:!0;null==e&&(e=this.getCurrentRoot(),null==e&&(e=this.getModel().getRoot()));if(null!=e)for(var c=this.model.getChildCount(e)-1;0<=c;c--){var d=this.model.getChildAt(e,c),f=this.getScaledCellAt(a,b,d,p,u,x);if(null!=f)return f;if(this.isCellVisible(d)&&(u&&this.model.isEdge(d)||
+p&&this.model.isVertex(d))&&(f=this.view.getState(d),null!=f&&(null==x||!x(f,a,b))&&this.intersects(f,a,b)))return d}return null};Graph.prototype.isRecursiveVertexResize=function(a){return!this.isSwimlane(a.cell)&&0<this.model.getChildCount(a.cell)&&!this.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxCellHighlight.prototype.getStrokeWidth=function(a){a=this.strokeWidth;this.graph.useCssTransforms&&(a/=this.graph.currentScale);
 return a};mxGraphView.prototype.getGraphBounds=function(){var a=this.graphBounds;if(this.graph.useCssTransforms)var b=this.graph.currentTranslate,e=this.graph.currentScale,a=new mxRectangle((a.x+b.x)*e,(a.y+b.y)*e,a.width*e,a.height*e);return a};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var a=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(b){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);a.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)};Graph.prototype.updateCssTransform=function(){var a=this.view.getDrawPane();if(null!=a)if(a=a.parentNode,this.useCssTransforms){var b=
-a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(t){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
-mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var c=this.useCssTransforms,k=this.view.scale,v=this.view.translate;c&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
-!1);e.apply(this,arguments);c&&(this.view.scale=k,this.view.translate=v,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+a.getAttribute("transform");a.setAttribute("transformOrigin","0 0");var e=Math.round(100*this.currentScale)/100;a.setAttribute("transform","scale("+e+","+e+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");if(b!=a.getAttribute("transform"))try{if(mxClient.IS_EDGE){var p=a.style.display;a.style.display="none";a.getBBox();a.style.display=p}}catch(u){}}else a.removeAttribute("transformOrigin"),a.removeAttribute("transform")};var b=mxGraphView.prototype.validateBackgroundPage;
+mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph.useCssTransforms,e=this.scale,m=this.translate;a&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);b.apply(this,arguments);a&&(this.scale=e,this.translate=m)};var e=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(a,b,m){var c=this.useCssTransforms,k=this.view.scale,x=this.view.translate;c&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=
+!1);e.apply(this,arguments);c&&(this.view.scale=k,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
 Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e)){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(e)}};
 Graph.prototype.openLink=function(a,b,e){var c=window;try{if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var k=a.split("#")[1];window.location.hash=="#"+k&&(window.location.hash="");window.location.hash=k}else c=window.open(a,null!=b?b:"_blank"),null==c||e||(c.opener=null)}catch(m){}return c};
 Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
 Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
-Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new mxFastOrganicLayout(this),b=new mxStackLayout(this,!0),e=new mxCompactTreeLayout(this),c=new mxCircleLayout(this),k=new TableRowLayout(this),m=new TableLayout(this);this.layoutManager.getLayout=function(p,t){if(t!=mxEvent.BEGIN_UPDATE){var v=this.graph.getCellStyle(p);if(null!=v){if("stackLayout"==v.childLayout)return b.resizeParentMax="1"==mxUtils.getValue(v,"resizeParentMax","1"),b.horizontal="1"==
-mxUtils.getValue(v,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(v,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(v,"resizeLast","0"),b.spacing=v.stackSpacing||b.spacing,b.border=v.stackBorder||b.border,b.marginLeft=v.marginLeft||0,b.marginRight=v.marginRight||0,b.marginTop=v.marginTop||0,b.marginBottom=v.marginBottom||0,b.fill=!0,b;if("treeLayout"==v.childLayout)return e.horizontal="1"==mxUtils.getValue(v,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(v,"resizeParent",
-"1"),e.groupPadding=mxUtils.getValue(v,"parentPadding",20),e.levelDistance=mxUtils.getValue(v,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==v.childLayout){var A=new mxHierarchicalLayout(this.graph,mxUtils.getValue(v,"flowOrientation",mxConstants.DIRECTION_EAST));A.resizeParent="1"==mxUtils.getValue(v,"resizeParent","1");A.parentBorder=mxUtils.getValue(v,"parentPadding",20);A.maintainParentLocation=!0;A.intraCellSpacing=mxUtils.getValue(v,"intraCellSpacing",
-mxHierarchicalLayout.prototype.intraCellSpacing);A.interRankCellSpacing=mxUtils.getValue(v,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing);A.interHierarchySpacing=mxUtils.getValue(v,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing);A.parallelEdgeSpacing=mxUtils.getValue(v,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing);return A}if("circleLayout"==v.childLayout)return c;if("organicLayout"==v.childLayout)return a;if(this.graph.isTableRow(p))return k;
+Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);var a=new mxFastOrganicLayout(this),b=new mxStackLayout(this,!0),e=new mxCompactTreeLayout(this),c=new mxCircleLayout(this),k=new TableRowLayout(this),m=new TableLayout(this);this.layoutManager.getLayout=function(p,u){if(u!=mxEvent.BEGIN_UPDATE){var x=this.graph.getCellStyle(p);if(null!=x){if("stackLayout"==x.childLayout)return b.resizeParentMax="1"==mxUtils.getValue(x,"resizeParentMax","1"),b.horizontal="1"==
+mxUtils.getValue(x,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(x,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(x,"resizeLast","0"),b.spacing=x.stackSpacing||b.spacing,b.border=x.stackBorder||b.border,b.marginLeft=x.marginLeft||0,b.marginRight=x.marginRight||0,b.marginTop=x.marginTop||0,b.marginBottom=x.marginBottom||0,b.fill=!0,b;if("treeLayout"==x.childLayout)return e.horizontal="1"==mxUtils.getValue(x,"horizontalTree","1"),e.resizeParent="1"==mxUtils.getValue(x,"resizeParent",
+"1"),e.groupPadding=mxUtils.getValue(x,"parentPadding",20),e.levelDistance=mxUtils.getValue(x,"treeLevelDistance",30),e.maintainParentLocation=!0,e.edgeRouting=!1,e.resetEdges=!1,e;if("flowLayout"==x.childLayout){var A=new mxHierarchicalLayout(this.graph,mxUtils.getValue(x,"flowOrientation",mxConstants.DIRECTION_EAST));A.resizeParent="1"==mxUtils.getValue(x,"resizeParent","1");A.parentBorder=mxUtils.getValue(x,"parentPadding",20);A.maintainParentLocation=!0;A.intraCellSpacing=mxUtils.getValue(x,"intraCellSpacing",
+mxHierarchicalLayout.prototype.intraCellSpacing);A.interRankCellSpacing=mxUtils.getValue(x,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing);A.interHierarchySpacing=mxUtils.getValue(x,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing);A.parallelEdgeSpacing=mxUtils.getValue(x,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing);return A}if("circleLayout"==x.childLayout)return c;if("organicLayout"==x.childLayout)return a;if(this.graph.isTableRow(p))return k;
 if(this.graph.isTable(p))return m}}return null}};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 a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),c=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(e,c,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-e,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
 c)};Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
@@ -2312,27 +2312,27 @@ Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b
 Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,e){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 c=this.dateFormatCache,k=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,m=/[^-+\dA-Z]/g,p=function(a,d){a=String(a);for(d=d||2;a.length<d;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var t=e?"getUTC":"get",v=a[t+"Date"](),A=a[t+"Day"](),d=a[t+"Month"](),f=a[t+"FullYear"](),g=a[t+"Hours"](),q=a[t+"Minutes"](),n=a[t+"Seconds"](),t=a[t+"Milliseconds"](),l=e?0:a.getTimezoneOffset(),B={d:v,dd:p(v),ddd:c.i18n.dayNames[A],dddd:c.i18n.dayNames[A+7],m:d+1,mm:p(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+
-12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:p(g%12||12),H:g,HH:p(g),M:q,MM:p(q),s:n,ss:p(n),l:p(t,3),L:p(99<t?Math.round(t/10):t),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<l?"-":"+")+p(100*Math.floor(Math.abs(l)/60)+Math.abs(l)%60,4),S:["th","st","nd","rd"][3<v%10?0:(10!=v%100-v%10)*v%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in B?B[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(c.masks[b]||b||c.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var u=e?"getUTC":"get",x=a[u+"Date"](),A=a[u+"Day"](),d=a[u+"Month"](),f=a[u+"FullYear"](),g=a[u+"Hours"](),q=a[u+"Minutes"](),n=a[u+"Seconds"](),u=a[u+"Milliseconds"](),l=e?0:a.getTimezoneOffset(),B={d:x,dd:p(x),ddd:c.i18n.dayNames[A],dddd:c.i18n.dayNames[A+7],m:d+1,mm:p(d+1),mmm:c.i18n.monthNames[d],mmmm:c.i18n.monthNames[d+
+12],yy:String(f).slice(2),yyyy:f,h:g%12||12,hh:p(g%12||12),H:g,HH:p(g),M:q,MM:p(q),s:n,ss:p(n),l:p(u,3),L:p(99<u?Math.round(u/10):u),t:12>g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0<l?"-":"+")+p(100*Math.floor(Math.abs(l)/60)+Math.abs(l)%60,4),S:["th","st","nd","rd"][3<x%10?0:(10!=x%100-x%10)*x%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in B?B[a]:a.slice(1,
 a.length-1)})};
 Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),c=0;c<e;c++)mxUtils.bind(this,function(c){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var k=document.createElement("input");k.style.display="inline-block";k.setAttribute("type","checkbox");b.isVisible(c)&&(k.setAttribute("checked","checked"),
-k.defaultChecked=!0);e.appendChild(k);var t=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",t);mxUtils.write(e,t);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a};
-Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var t=a;null==m&&null!=t;)null!=t.value&&"object"==typeof t.value&&(m=t.hasAttribute(p)?null!=t.getAttribute(p)?t.getAttribute(p):"":null),t=this.model.getParent(t);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c,
+k.defaultChecked=!0);e.appendChild(k);var u=this.convertValueToString(c)||mxResources.get("background")||"Background";e.setAttribute("title",u);mxUtils.write(e,u);a.appendChild(e);mxEvent.addListener(k,"click",function(){null!=k.getAttribute("checked")?k.removeAttribute("checked"):k.setAttribute("checked","checked");b.setVisible(c,k.checked)})})(b.getChildAt(b.root,c));return a};
+Graph.prototype.replacePlaceholders=function(a,b){var e=[];if(null!=b){for(var c=0;match=this.placeholderPattern.exec(b);){var k=match[0];if(2<k.length&&"%label%"!=k&&"%tooltip%"!=k){var m=null;if(match.index>c&&"%"==b.charAt(match.index-1))m=k.substring(1);else{var p=k.substring(1,k.length-1);if(0>p.indexOf("{"))for(var u=a;null==m&&null!=u;)null!=u.value&&"object"==typeof u.value&&(m=u.hasAttribute(p)?null!=u.getAttribute(p)?u.getAttribute(p):"":null),u=this.model.getParent(u);null==m&&(m=this.getGlobalVariable(p))}e.push(b.substring(c,
 match.index)+(null!=m?m:k));c=match.index+k.length}}e.push(b.substring(c))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],e=0;e<a.length;e++){var c=this.model.getCell(a[e].id);null!=c&&b.push(c)}this.setSelectionCells(b)}else this.clearSelection()};
 Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};
 Graph.prototype.connectVertex=function(a,b,e,c,k,m){if(a.geometry.relative&&this.model.isEdge(a.parent))return[];m=m?m:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+
-e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var t=this.view.scale,v=this.view.translate,A=v.x*t,v=v.y*t;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,v=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(A+p.x*t,v+p.y*t);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),
-t=this.view.getState(m),null!=e&&null!=t&&mxUtils.intersects(e,t)&&(m=null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];
-this.model.beginUpdate();try{var d=null!=m&&this.isSwimlane(m),t=d?null:m;if(null==t&&k){for(var A=a,f=this.getCellGeometry(a);null!=f&&f.relative;)A=this.getModel().getParent(A),f=this.getCellGeometry(A);var g=this.view.getState(A),q=null!=g?g.style:this.getCellStyle(A);if(mxUtils.getValue(q,"part",!1)){var n=this.model.getParent(A);this.model.isVertex(n)&&(A=n)}t=this.duplicateCells([A],!1)[0];f=this.getCellGeometry(t);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2);d&&(this.addCells([t],m,null,
-null,null,!0),m=null)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(c)&&k||null==m&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,t,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var B=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&&
-(B=c.parent.getIndex(c),this.model.add(c.parent,l,B))}null==m&&null!=t&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(B=a.parent.getIndex(a),this.model.add(a.parent,t,B));null!=l&&e.push(l);null==m&&null!=t&&e.push(t);null==t&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));var u=this.view.scale,x=this.view.translate,A=x.x*u,x=x.y*u;null!=e&&this.model.isVertex(e.cell)&&(A=e.x,x=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);m=m||mxEvent.isControlDown(c)&&!k?null:this.getCellAt(A+p.x*u,x+p.y*u);this.model.isAncestor(m,a)&&(m=null);for(e=m;null!=e;){if(this.isCellLocked(e)){m=null;break}e=this.model.getParent(e)}null!=m&&(e=this.view.getState(a),
+u=this.view.getState(m),null!=e&&null!=u&&mxUtils.intersects(e,u)&&(m=null));if(k=!mxEvent.isShiftDown(c)||k)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==m||this.isCellConnectable(m)||(e=this.getModel().getParent(m),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(m=e));if(m==a||this.model.isEdge(m)||!this.isCellConnectable(m))m=null;e=[];
+this.model.beginUpdate();try{var d=null!=m&&this.isSwimlane(m),u=d?null:m;if(null==u&&k){for(var A=a,f=this.getCellGeometry(a);null!=f&&f.relative;)A=this.getModel().getParent(A),f=this.getCellGeometry(A);var g=this.view.getState(A),q=null!=g?g.style:this.getCellStyle(A);if(mxUtils.getValue(q,"part",!1)){var n=this.model.getParent(A);this.model.isVertex(n)&&(A=n)}u=this.duplicateCells([A],!1)[0];f=this.getCellGeometry(u);null!=f&&(f.x=p.x-f.width/2,f.y=p.y-f.height/2);d&&(this.addCells([u],m,null,
+null,null,!0),m=null)}d=null;null!=this.layoutManager&&(d=this.layoutManager.getLayout(this.model.getParent(a)));var l=mxEvent.isControlDown(c)&&k||null==m&&null!=d&&d.constructor==mxStackLayout?null:this.insertEdge(this.model.getParent(a),null,"",a,u,this.createCurrentEdgeStyle());if(null!=l&&this.connectionHandler.insertBeforeSource){var B=null;for(c=a;null!=c.parent&&null!=c.geometry&&c.geometry.relative&&c.parent!=l.parent;)c=this.model.getParent(c);null!=c&&null!=c.parent&&c.parent==l.parent&&
+(B=c.parent.getIndex(c),this.model.add(c.parent,l,B))}null==m&&null!=u&&null!=d&&null!=a.parent&&d.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(B=a.parent.getIndex(a),this.model.add(a.parent,u,B));null!=l&&e.push(l);null==m&&null!=u&&e.push(u);null==u&&null!=l&&l.geometry.setTerminalPoint(p,!1);null!=l&&this.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{this.model.endUpdate()}return e};
 Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,c;for(c in this.model.cells)if(e=this.model.cells[c],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
 Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,c=null;null==c&&null!=e;)null!=e.value&&"object"==typeof e.value&&(c=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return c||""}return b.getAttribute("label")||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
 Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
 Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
 Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var c=this.layoutManager.getLayout(this.model.getParent(a));null!=c&&c.constructor==mxStackLayout&&(c.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),t=this.getCellGeometry(e[m]);if(null!=p&&null!=t){var v=Math.round(t.width-p.width/this.view.scale),A=Math.round(t.height-p.height/this.view.scale);if(0!=A||0!=v){var d=this.model.getParent(e[m]),f=this.layoutManager.getLayout(d);
-null==f?null!=k&&this.isMoveCellsEvent(k,p)&&this.moveSiblings(p,d,v,A):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(d,f,v,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.foldCells=function(a,b,e,c,k){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var m=0;m<e.length;m++){var p=this.view.getState(e[m]),u=this.getCellGeometry(e[m]);if(null!=p&&null!=u){var x=Math.round(u.width-p.width/this.view.scale),A=Math.round(u.height-p.height/this.view.scale);if(0!=A||0!=x){var d=this.model.getParent(e[m]),f=this.layoutManager.getLayout(d);
+null==f?null!=k&&this.isMoveCellsEvent(k,p)&&this.moveSiblings(p,d,x,A):null!=k&&mxEvent.isAltDown(k)||f.constructor!=mxStackLayout||f.resizeLast||this.resizeParentStacks(d,f,x,A)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
 Graph.prototype.moveSiblings=function(a,b,e,c){this.model.beginUpdate();try{var k=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<k.length;b++)if(k[b]!=a.cell){var m=this.view.getState(k[b]),p=this.getCellGeometry(k[b]);null!=m&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(m.x-a.x)/a.width))),Math.round(c*Math.max(0,Math.min(1,(m.y-a.y)/a.height)))),this.model.setGeometry(k[b],p))}}finally{this.model.endUpdate()}};
 Graph.prototype.resizeParentStacks=function(a,b,e,c){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var k=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==k&&!b.resizeLast;){var m=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=m&&(m=m.clone(),b.horizontal?m.width+=e+Math.min(0,p.width/this.view.scale-m.width):m.height+=c+Math.min(0,p.height/this.view.scale-m.height),this.model.setGeometry(a,
 m));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};
@@ -2377,42 +2377,43 @@ HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getM
 HoverIcons.prototype.update=function(a,b,e){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var c=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,c=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
 this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,e))}),this.updateDelay+10))):null!=this.startTime&&(c=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&c<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,e)?this.reset(!1):(null!=this.currentState||c>this.activationDelay)&&this.currentState!=a&&(c>this.updateDelay&&null!=a||null==this.bbox||null==b||null==e||!mxUtils.contains(this.bbox,
 b,e))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
-Graph.prototype.createTable=function(a,b){var e=new mxCell("",new mxGeometry(0,0,40*b,30*a),"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;");e.vertex=!0;for(var c=0;c<a;c++){var k=new mxCell("",new mxGeometry(0,30*c,40*b,30),"html=1;whiteSpace=wrap;part=1;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];");k.vertex=!0;for(var m=0;m<b;m++){var p=new mxCell("",new mxGeometry(40*m,30*c,40,30),"html=1;whiteSpace=wrap;part=1;connectable=0;");p.vertex=
-!0;k.insert(p)}e.insert(k)}console.log("createTable",a,b,e);return e};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
-Graph.prototype.getActualStartSize=function(a,b){var e=new mxRectangle;if(this.isSwimlane(a)){var c=b?null:this.view.getState(a),k=null!=c?c.style:this.getCellStyle(a);if(null!=k){var m=parseInt(mxUtils.getValue(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),c=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPH,0),p=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPV,0),t=0;mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,!0)||t++;k=mxUtils.getValue(k,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
-k==mxConstants.DIRECTION_NORTH?t++:k==mxConstants.DIRECTION_WEST?t+=2:k==mxConstants.DIRECTION_SOUTH&&(t+=3);t=mxUtils.mod(t,4);0==t?e.y=m:1==t?e.x=m:2==t?e.height=m:3==t&&(e.width=m);p&&(m=e.y,e.y=e.height,e.height=m);c&&(m=e.x,e.x=e.width,e.width=m)}}return e};
-Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var b=this.getModel(),e=b.getChildCount(a),c=this.getCellGeometry(a);if(null!=c&&0<e)for(var k=this.getActualStartSize(a),m=k.y,p=0;p<e;p++){var t=b.getChildAt(a,p);if(null!=t){var v=this.getCellGeometry(t);if(null!=v){if(p==e-1){var A=v.clone();A.width=c.width-k.x;m<c.height?A.height=c.height-m:m>c.height&&(c.height=m+Graph.minTableRowHeight,A.height=Graph.minTableRowHeight);b.setGeometry(t,A);this.tableRowResized(t,
-A,v)}m+=v.height}}}};Graph.prototype.setRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{for(var c=0;c<e.getChildCount(a);c++){var k=e.getChildAt(a,c),m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height=b,e.setGeometry(k,m))}}finally{e.endUpdate()}};
-Graph.prototype.tableRowResized=function(a,b,e){console.log("tableLayout.tableRowResized",a);var c=this.getModel(),k=this.getCellGeometry(a),m=c.getChildCount(a);if(null!=k&&0<m)for(var p=this.getActualStartSize(a),t=p.x,v=0;v<m;v++){var A=c.getChildAt(a,v);if(null!=A){var d=this.getCellGeometry(A);if(null!=d){var f=d.clone();f.height=k.height-p.y;c.setGeometry(A,f);v==m-1&&(t<k.width?f.width=k.width-t:t>k.width&&(k.width=t+Graph.minTableColumnWidth,f.width=Graph.minTableColumnWidth),this.tableCellResized(A,
-f,d));t+=d.width}}}k=c.getParent(a);a=k.getIndex(a);b.y!=e.y&&0<a&&(a=c.getChildAt(k,a-1),k=this.getCellGeometry(a),null!=k&&(k=k.clone(),k.height-=e.y-b.y,c.setGeometry(a,k)))};
-Graph.prototype.tableCellResized=function(a,b,e){console.log("tableLayout.tableCellResized",a,b,e);var c=this.getCellGeometry(a);if(null!=c){var k=this.getModel(),m=k.getParent(a),p=k.getParent(m),t=m.getIndex(a);b.height!=e.height&&this.setRowHeight(m,c.height);for(var v=null,A=0;A<k.getChildCount(p);A++){var d=k.getChildAt(p,A),f=k.getChildAt(d,t);if(a!=f){var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width=c.width,k.setGeometry(f,g))}b.y!=e.y&&d==m&&null!=v&&(f=this.getCellGeometry(v),
-null!=f&&this.setRowHeight(v,f.height-e.y+b.y));v=d}b.x!=e.x&&0<t&&(f=k.getChildAt(m,t-1),g=this.getCellGeometry(f),null!=g&&(a=g.clone(),a.width-=e.x-b.x,k.setGeometry(f,a),this.tableCellResized(f,a,g)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,b,e){console.log("tableLayout.moveCell",a,b,e)};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,e){a=this.cloneCell(a);for(var c=0;c<e;c++)a.insert(this.cloneCell(b));return a};
+Graph.prototype.createTable=function(a,b,e,c){e=null!=e?e:40;c=null!=c?c:30;return this.createParent(this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*e,c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];"),this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;"),b),a)};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,c){e=null!=e?e:120;c=null!=c?c:120;var k=this.createVertex(null,null,"",0,0,b*e,a*c,"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=tableLayout;fillColor=none;connectable=0;"),m=this.createVertex(null,null,"",0,0,b*e,c,"swimlane;horizontal=0;html=1;whiteSpace=wrap;collapsible=0;container=1;childLayout=rowLayout;points=[[0,0.5],[1,0.5]];connectable=0;");k.insert(this.createParent(m,this.createVertex(null,null,"",0,0,e,c,"swimlane;html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;"),
+b));return 1<a?this.createParent(k,this.createParent(m,this.createVertex(null,null,"",0,0,e,c,"html=1;whiteSpace=wrap;connectable=0;collapsible=0;container=1;fillColor=none;"),b),a-1):k};Graph.prototype.isTableCell=function(a){return this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};
+Graph.prototype.getActualStartSize=function(a,b){var e=new mxRectangle;if(this.isSwimlane(a)){var c=b?null:this.view.getState(a),k=null!=c?c.style:this.getCellStyle(a);if(null!=k){var m=parseInt(mxUtils.getValue(k,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),c=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPH,0),p=1==mxUtils.getValue(k,mxConstants.STYLE_FLIPV,0),u=0;mxUtils.getValue(k,mxConstants.STYLE_HORIZONTAL,!0)||u++;k=mxUtils.getValue(k,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);
+k==mxConstants.DIRECTION_NORTH?u++:k==mxConstants.DIRECTION_WEST?u+=2:k==mxConstants.DIRECTION_SOUTH&&(u+=3);u=mxUtils.mod(u,4);0==u?e.y=m:1==u?e.x=m:2==u?e.height=m:3==u&&(e.width=m);p&&(m=e.y,e.y=e.height,e.height=m);c&&(m=e.x,e.x=e.width,e.width=m)}}return e};
+Graph.prototype.tableResized=function(a){console.log("tableLayout.tableResized",a);var b=this.getModel(),e=b.getChildCount(a),c=this.getCellGeometry(a);if(null!=c&&0<e)for(var k=this.getActualStartSize(a),m=k.y,p=0;p<e;p++){var u=b.getChildAt(a,p);if(null!=u){var x=this.getCellGeometry(u);if(null!=x){if(p==e-1){var A=x.clone();A.width=c.width-k.x;m<c.height?A.height=c.height-m:m>c.height&&(c.height=m+Graph.minTableRowHeight,A.height=Graph.minTableRowHeight);b.setGeometry(u,A);this.tableRowResized(u,
+A,x)}m+=x.height}}}};Graph.prototype.setRowHeight=function(a,b){var e=this.getModel();e.beginUpdate();try{for(var c=0;c<e.getChildCount(a);c++){var k=e.getChildAt(a,c),m=this.getCellGeometry(k);null!=m&&(m=m.clone(),m.height=b,e.setGeometry(k,m))}}finally{e.endUpdate()}};
+Graph.prototype.tableRowResized=function(a,b,e){console.log("tableLayout.tableRowResized",a);var c=this.getModel(),k=this.getCellGeometry(a),m=c.getChildCount(a);if(null!=k&&0<m)for(var p=this.getActualStartSize(a),u=p.x,x=0;x<m;x++){var A=c.getChildAt(a,x);if(null!=A){var d=this.getCellGeometry(A);if(null!=d){var f=d.clone();f.height=k.height-p.y;c.setGeometry(A,f);x==m-1&&(u<k.width?f.width=k.width-u:u>k.width&&(k.width=u+Graph.minTableColumnWidth,f.width=Graph.minTableColumnWidth),this.tableCellResized(A,
+f,d));u+=d.width}}}k=c.getParent(a);a=k.getIndex(a);b.y!=e.y&&0<a&&(a=c.getChildAt(k,a-1),k=this.getCellGeometry(a),null!=k&&(k=k.clone(),k.height-=e.y-b.y,c.setGeometry(a,k)))};
+Graph.prototype.tableCellResized=function(a,b,e){console.log("tableLayout.tableCellResized",a,b,e);var c=this.getCellGeometry(a);if(null!=c){var k=this.getModel(),m=k.getParent(a),p=k.getParent(m),u=m.getIndex(a);b.height!=e.height&&this.setRowHeight(m,c.height);for(var x=null,A=0;A<k.getChildCount(p);A++){var d=k.getChildAt(p,A),f=k.getChildAt(d,u);if(a!=f){var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.width=c.width,k.setGeometry(f,g))}b.y!=e.y&&d==m&&null!=x&&(f=this.getCellGeometry(x),
+null!=f&&this.setRowHeight(x,f.height-e.y+b.y));x=d}b.x!=e.x&&0<u&&(f=k.getChildAt(m,u-1),g=this.getCellGeometry(f),null!=g&&(a=g.clone(),a.width-=e.x-b.x,k.setGeometry(f,a),this.tableCellResized(f,a,g)))}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxGraphLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.moveCell=function(a,b,e){console.log("tableLayout.moveCell",a,b,e)};
 TableLayout.prototype.resizeCell=function(a,b,e){this.graph.isTable(a)?this.graph.tableResized(a,b,e):this.graph.isTableRow(a)?this.graph.tableRowResized(a,b,e):this.graph.isTableCell(a)&&this.graph.tableCellResized(a,b,e)};
-TableLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getModel(),c=b.y,k=[],m=0,p=0;console.log("tableLayout.execute",a,b);for(var t=0;t<e.getChildCount(a);t++){var v=e.getChildAt(a,t);if(null!=v){var A=this.graph.getCellGeometry(v);if(null!=A){for(var A=A.clone(),d=this.graph.getActualStartSize(v,!0),f=e.getChildCount(v),p=d.x,g=0;g<f;g++){var q=e.getChildAt(v,g);if(null!=q){var n=this.graph.getCellGeometry(q);null!=n&&(n=n.clone(),A.height=n.height+d.y+
-d.height,n.x=p,n.y=d.y,e.setGeometry(q,n),p+=n.width,g==f-1&&(k.push([n,A,d]),m=Math.max(p,m)))}}A.width=p+d.width;A.y=c;A.x=b.x;e.setGeometry(v,A);c+=A.height}}}t=this.graph.getCellGeometry(a);if(null!=t)for(t=t.clone(),t.width=p+b.x+b.width,t.height=c+b.height,e.setGeometry(a,t),t=0;t<k.length;t++)k[t][1].width<m&&(k[t][0].width+=m-k[t][1].width,k[t][1].width+=m-k[t][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout;
+TableLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getModel(),c=b.y,k=[],m=0,p=0;console.log("tableLayout.execute",a,b);for(var u=0;u<e.getChildCount(a);u++){var x=e.getChildAt(a,u);if(null!=x){var A=this.graph.getCellGeometry(x);if(null!=A){for(var A=A.clone(),d=this.graph.getActualStartSize(x,!0),f=e.getChildCount(x),p=d.x,g=0;g<f;g++){var q=e.getChildAt(x,g);if(null!=q){var n=this.graph.getCellGeometry(q);null!=n&&(n=n.clone(),A.height=n.height+d.y+
+d.height,n.x=p,n.y=d.y,e.setGeometry(q,n),p+=n.width,g==f-1&&(k.push([n,A,d]),m=Math.max(p,m)))}}A.width=p+d.width;A.y=c;A.x=b.x;e.setGeometry(x,A);c+=A.height}}}u=this.graph.getCellGeometry(a);if(null!=u)for(u=u.clone(),u.width=p+b.x+b.width,u.height=c+b.height,e.setGeometry(a,u),u=0;u<k.length;u++)k[u][1].width<m&&(k[u][0].width+=m-k[u][1].width,k[u][1].width+=m-k[u][1].width)};function TableRowLayout(a){mxGraphLayout.call(this,a)}TableRowLayout.prototype=new TableLayout;
 TableRowLayout.prototype.constructor=TableRowLayout;TableRowLayout.prototype.moveCell=function(a,b,e){console.log("TableRowLayout.moveCell",a,b,e)};
-TableRowLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getActualStartSize(a),c=this.graph.getCellStyle(a),k=this.graph.getModel(),m=k.getParent(a);console.log("tableRowLayout.execute",a,b,e);if(null!=c&&null!=m){c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.beginUpdate();try{if(b.width!=e.width||b.x!=e.x){var p=k.getChildAt(a,k.getChildCount(a)-1),t=this.graph.getCellGeometry(p);null!=t&&(t=t.clone(),t.width+=
-e.width-b.width-b.x-e.x,t.width=Math.max(Graph.minTableColumnWidth,t.width),k.setGeometry(p,t))}for(e=0;e<k.getChildCount(m);e++){var v=k.getChildAt(m,e);if(v!=a){var A=this.graph.getActualStartSize(v);(0<b.x&&0<A.x||0<b.y&&0<A.y||0<b.width&&0<A.width||0<b.height&&0<A.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,c,[v])}}}finally{k.endUpdate()}}};
+TableRowLayout.prototype.execute=function(a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getActualStartSize(a),c=this.graph.getCellStyle(a),k=this.graph.getModel(),m=k.getParent(a);console.log("tableRowLayout.execute",a,b,e);if(null!=c&&null!=m){c=parseInt(mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));k.beginUpdate();try{if(b.width!=e.width||b.x!=e.x){var p=k.getChildAt(a,k.getChildCount(a)-1),u=this.graph.getCellGeometry(p);null!=u&&(u=u.clone(),u.width+=
+e.width-b.width-b.x-e.x,u.width=Math.max(Graph.minTableColumnWidth,u.width),k.setGeometry(p,u))}for(e=0;e<k.getChildCount(m);e++){var x=k.getChildAt(m,e);if(x!=a){var A=this.graph.getActualStartSize(x);(0<b.x&&0<A.x||0<b.y&&0<A.y||0<b.width&&0<A.width||0<b.height&&0<A.height)&&this.graph.setCellStyles(mxConstants.STYLE_STARTSIZE,c,[x])}}}finally{k.endUpdate()}}};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){c=null!=c?c:!0;var d=this.getState(a);null!=d&&c&&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=b.apply(this,
 arguments);null!=d&&c&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var c=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){c.apply(this,arguments);this.graph.model.isEdge(a.cell)&&
 1!=a.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var d=null!=a.routedPoints,f=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var c=function(d,b,c){var e=new mxPoint(b,c);e.type=d;f.push(e);e=null!=a.routedPoints?a.routedPoints[f.length-1]:null;return null==e||e.type!=d||e.x!=b||e.y!=c},e=.5*this.scale,d=!1,f=[],n=0;n<b.length-1;n++){for(var l=
-b[n+1],k=b[n],x=[],u=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,u.x,u.y,l.x,l.y)<1*this.scale*this.scale;)l=u,n++,u=b[n+2];for(var d=c(0,k.x,k.y)||d,t=0;t<this.validEdges.length;t++){var z=this.validEdges[t],m=z.absolutePoints;if(null!=m&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<m.length-1;z++){for(var p=m[z+1],y=m[z],u=m[z+2];z<m.length-2&&mxUtils.ptSegDistSq(y.x,y.y,u.x,u.y,p.x,p.y)<1*this.scale*this.scale;)p=u,z++,u=m[z+2];u=mxUtils.intersection(k.x,k.y,l.x,l.y,y.x,y.y,p.x,
-p.y);if(null!=u&&(Math.abs(u.x-k.x)>e||Math.abs(u.y-k.y)>e)&&(Math.abs(u.x-l.x)>e||Math.abs(u.y-l.y)>e)&&(Math.abs(u.x-y.x)>e||Math.abs(u.y-y.y)>e)&&(Math.abs(u.x-p.x)>e||Math.abs(u.y-p.y)>e)){p=u.x-k.x;y=u.y-k.y;u={distSq:p*p+y*y,x:u.x,y:u.y};for(p=0;p<x.length;p++)if(x[p].distSq>u.distSq){x.splice(p,0,u);u=null;break}null==u||0!=x.length&&x[x.length-1].x===u.x&&x[x.length-1].y===u.y||x.push(u)}}}for(z=0;z<x.length;z++)d=c(1,x[z].x,x[z].y)||d}u=b[b.length-1];d=c(0,u.x,u.y)||d}a.routedPoints=f;return d}return!1};
-var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,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)k.apply(this,arguments);else{var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,c=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,e=mxUtils.getValue(this.style,
-"jumpStyle","none"),n=!0,l=null,B=null,x=[],u=null;a.begin();for(var t=0;t<this.state.routedPoints.length;t++){var z=this.state.routedPoints[t],m=new mxPoint(z.x/this.scale,z.y/this.scale);0==t?m=b[0]:t==this.state.routedPoints.length-1&&(m=b[b.length-1]);var p=!1;if(null!=l&&1==z.type){var y=this.state.routedPoints[t+1],z=y.x/this.scale-m.x,y=y.y/this.scale-m.y,z=z*z+y*y;null==u&&(u=new mxPoint(m.x-l.x,m.y-l.y),B=Math.sqrt(u.x*u.x+u.y*u.y),0<B?(u.x=u.x*c/B,u.y=u.y*c/B):u=null);z>c*c&&0<B&&(z=l.x-
-m.x,y=l.y-m.y,z=z*z+y*y,z>c*c&&(p=new mxPoint(m.x-u.x,m.y-u.y),z=new mxPoint(m.x+u.x,m.y+u.y),x.push(p),this.addPoints(a,x,d,f,!1,null,n),x=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(p.x-u.y*x,p.y+u.x*x),a.lineTo(z.x-u.y*x,z.y+u.x*x),a.lineTo(z.x,z.y)):"arc"==e?(x*=1.3,a.curveTo(p.x-u.y*x,p.y+u.x*x,z.x-u.y*x,z.y+u.x*x,z.x,z.y)):(a.moveTo(z.x,z.y),n=!0),x=[z],p=!0))}else u=null;p||(x.push(m),l=m)}this.addPoints(a,x,d,f,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;
-mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var c=this.getNextPoint(a,d,f),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var k=Math.cos(-n),x=Math.sin(-n),c=mxUtils.getRotatedPoint(c,k,x,l);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
-0);k+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);c=this.getPerimeterPoint(b,c,0==n&&e,k);0!=n&&(k=Math.cos(n),x=Math.sin(n),c=mxUtils.getRotatedPoint(c,k,x,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,f,c),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
-a[f]);if(null!=g){var l=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||l<c)d=g,c=l}}null!=d&&(e=d)}return e};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var t=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
-mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return t.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
+b[n+1],k=b[n],v=[],y=b[n+2];n<b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,y.x,y.y,l.x,l.y)<1*this.scale*this.scale;)l=y,n++,y=b[n+2];for(var d=c(0,k.x,k.y)||d,u=0;u<this.validEdges.length;u++){var z=this.validEdges[u],m=z.absolutePoints;if(null!=m&&mxUtils.intersects(a,z)&&"1"!=z.style.noJump)for(z=0;z<m.length-1;z++){for(var C=m[z+1],t=m[z],y=m[z+2];z<m.length-2&&mxUtils.ptSegDistSq(t.x,t.y,y.x,y.y,C.x,C.y)<1*this.scale*this.scale;)C=y,z++,y=m[z+2];y=mxUtils.intersection(k.x,k.y,l.x,l.y,t.x,t.y,C.x,
+C.y);if(null!=y&&(Math.abs(y.x-k.x)>e||Math.abs(y.y-k.y)>e)&&(Math.abs(y.x-l.x)>e||Math.abs(y.y-l.y)>e)&&(Math.abs(y.x-t.x)>e||Math.abs(y.y-t.y)>e)&&(Math.abs(y.x-C.x)>e||Math.abs(y.y-C.y)>e)){C=y.x-k.x;t=y.y-k.y;y={distSq:C*C+t*t,x:y.x,y:y.y};for(C=0;C<v.length;C++)if(v[C].distSq>y.distSq){v.splice(C,0,y);y=null;break}null==y||0!=v.length&&v[v.length-1].x===y.x&&v[v.length-1].y===y.y||v.push(y)}}}for(z=0;z<v.length;z++)d=c(1,v[z].x,v[z].y)||d}y=b[b.length-1];d=c(0,y.x,y.y)||d}a.routedPoints=f;return d}return!1};
+var k=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,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)k.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,q=mxUtils.getValue(this.style,
+"jumpStyle","none"),n=!0,l=null,B=null,v=[],y=null;a.begin();for(var u=0;u<this.state.routedPoints.length;u++){var z=this.state.routedPoints[u],m=new mxPoint(z.x/this.scale,z.y/this.scale);0==u?m=b[0]:u==this.state.routedPoints.length-1&&(m=b[b.length-1]);var C=!1;if(null!=l&&1==z.type){var t=this.state.routedPoints[u+1],z=t.x/this.scale-m.x,t=t.y/this.scale-m.y,z=z*z+t*t;null==y&&(y=new mxPoint(m.x-l.x,m.y-l.y),B=Math.sqrt(y.x*y.x+y.y*y.y),0<B?(y.x=y.x*e/B,y.y=y.y*e/B):y=null);z>e*e&&0<B&&(z=l.x-
+m.x,t=l.y-m.y,z=z*z+t*t,z>e*e&&(C=new mxPoint(m.x-y.x,m.y-y.y),z=new mxPoint(m.x+y.x,m.y+y.y),v.push(C),this.addPoints(a,v,d,c,!1,null,n),v=0>Math.round(y.x)||0==Math.round(y.x)&&0>=Math.round(y.y)?1:-1,n=!1,"sharp"==q?(a.lineTo(C.x-y.y*v,C.y+y.x*v),a.lineTo(z.x-y.y*v,z.y+y.x*v),a.lineTo(z.x,z.y)):"arc"==q?(v*=1.3,a.curveTo(C.x-y.y*v,C.y+y.x*v,z.x-y.y*v,z.y+y.x*v,z.x,z.y)):(a.moveTo(z.x,z.y),n=!0),v=[z],C=!0))}else y=null;C||(v.push(m),l=m)}this.addPoints(a,v,d,c,!1,null,n);a.stroke()}};var m=mxGraphView.prototype.updateFloatingTerminalPoint;
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,c){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,c);var f=this.getNextPoint(a,d,c),e=this.graph.isOrthogonal(a),n=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),l=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=n)var k=Math.cos(-n),v=Math.sin(-n),f=mxUtils.getRotatedPoint(f,k,v,l);k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||
+0);k+=parseFloat(a.style[c?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);f=this.getPerimeterPoint(b,f,0==n&&e,k);0!=n&&(k=Math.cos(n),v=Math.sin(n),f=mxUtils.getRotatedPoint(f,k,v,l));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,c,f),c)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,c,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);c=d=null;if(null!=a)for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,
+a[f]);if(null!=g){var l=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==c||l<c)d=g,c=l}}null!=d&&(e=d)}return e};var p=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=
+mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"string"===typeof b&&"stencil("==b.substring(0,8))try{var d=b.substring(8,b.length-1),c=mxUtils.parseXml(Graph.decompress(d));return new mxShape(new mxStencil(c.documentElement))}catch(g){null!=window.console&&console.log("Error in shape: "+g)}}return u.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];
 mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var c=0;c<b.length;c++){var k=b[c];if(".xml"==k.toLowerCase().substring(k.length-4,k.length))mxStencilRegistry.loadStencilSet(k,null);else if(".js"==k.toLowerCase().substring(k.length-3,k.length))try{if(mxStencilRegistry.allowEval){var m=
 mxUtils.load(k);null!=m&&200<=m.getStatus()&&299>=m.getStatus()&&eval.call(window,m.getText())}}catch(p){null!=window.console&&console.log("error in getStencil:",k,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
 mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
 mxStencilRegistry.loadStencilSet=function(a,b,e,c){var k=mxStencilRegistry.packages[a];if(null!=e&&e||null==k){var m=!1;if(null==k)try{if(c){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(c){null!=c&&null!=c.documentElement&&(mxStencilRegistry.packages[a]=c,m=!0,mxStencilRegistry.parseStencilSet(c.documentElement,b,m))}));return}k=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=k;m=!0}catch(p){null!=window.console&&console.log("error in loadStencilSet:",a,p)}null!=k&&null!=
 k.documentElement&&mxStencilRegistry.parseStencilSet(k.documentElement,b,m)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(a){b(200<=a.getStatus()&&299>=a.getStatus()?a.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
 mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var c=a.firstChild;null!=c;)"shapes"==c.nodeName&&mxStencilRegistry.parseStencilSet(c,b,e),c=c.nextSibling;else{e=null!=e?e:!0;var c=a.firstChild,k="";a=a.getAttribute("name");for(null!=a&&(k=a+".");null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=c.getAttribute("name"),null!=a)){var k=k.toLowerCase(),m=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(k+m.toLowerCase(),new mxStencil(c));if(null!=b){var p=c.getAttribute("w"),
-t=c.getAttribute("h"),p=null==p?80:parseInt(p,10),t=null==t?80:parseInt(t,10);b(k,m,a,p,t)}}c=c.nextSibling}}};
+u=c.getAttribute("h"),p=null==p?80:parseInt(p,10),u=null==u?80:parseInt(u,10);b(k,m,a,p,u)}}c=c.nextSibling}}};
 "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}function b(a,d){switch(d){case mxConstants.POINTS:return a;case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/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(a){return!mxEvent.isAltDown(a)};var e=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||e.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=
@@ -2422,17 +2423,17 @@ orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edg
 (a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");null!=this.currentEdgeStyle.orthogonalLoop?a+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(a+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?a+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&
 (a+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+
 "/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.createCellLookup=function(a,d){d=null!=d?d:{};for(var b=0;b<a.length;b++){var c=a[b];d[mxObjectIdentity.get(c)]=c.getId();for(var f=this.model.getChildCount(c),e=0;e<f;e++)this.createCellLookup([this.model.getChildAt(c,e)],d)}return d};Graph.prototype.createCellMapping=function(a,d,b){b=null!=b?b:{};for(var c in a){var f=d[c];null==b[f]&&(b[f]=a[c].getId()||"")}return b};
-Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var n=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var y=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=y&&
-(a=a.concat(y))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,n,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var q=this.getBoundingBoxFromGeometry(a,!0);null!=q&&this.moveCells(a,d-q.x,b-q.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary,
+Graph.prototype.importGraphModel=function(a,d,b,c){d=null!=d?d:0;b=null!=b?b:0;var f=new mxCodec(a.ownerDocument),e=new mxGraphModel;f.decode(a,e);a=[];var f={},g={},l=e.getChildren(this.cloneCell(e.root,this.isCloneInvalidEdges(),f));if(null!=l){var t=this.createCellLookup([e.root]),l=l.slice();this.model.beginUpdate();try{if(1!=l.length||this.isCellLocked(this.getDefaultParent()))for(e=0;e<l.length;e++){var n=this.model.getChildren(this.moveCells([l[e]],d,b,!1,this.model.getRoot())[0]);null!=n&&
+(a=a.concat(n))}else a=this.moveCells(e.getChildren(l[0]),d,b,!1,this.getDefaultParent()),g[e.getChildAt(e.root,0).getId()]=this.getDefaultParent().getId();if(null!=a&&(this.createCellMapping(f,t,g),this.updateCustomLinks(g,a),c)){this.isGridEnabled()&&(d=this.snap(d),b=this.snap(b));var q=this.getBoundingBoxFromGeometry(a,!0);null!=q&&this.moveCells(a,d-q.x,b-q.y)}}finally{this.model.endUpdate()}}return a};Graph.prototype.encodeCells=function(a){for(var d={},b=this.cloneCells(a,null,d),c=new mxDictionary,
 f=0;f<a.length;f++)c.put(a[f],!0);for(f=0;f<b.length;f++){var e=this.view.getState(a[f]);if(null!=e){var g=this.getCellGeometry(b[f]);null==g||!g.relative||this.model.isEdge(a[f])||c.get(this.model.getParent(a[f]))||(g.relative=!1,g.x=e.x/e.view.scale-e.view.translate.x,g.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;g=e.getChildAt(e.getRoot(),0);for(f=0;f<b.length;f++)e.add(g,b[f]);this.updateCustomLinks(this.createCellMapping(d,this.createCellLookup(a)),b);return c.encode(e)};
 var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(a,d,b,c,f,e,g){g=null!=g?g:{};var l=m.apply(this,arguments);c&&this.updateCustomLinks(this.createCellMapping(g,this.createCellLookup(a)),l);return l};Graph.prototype.updateCustomLinks=function(a,d){for(var b=0;b<d.length;b++)null!=d[b]&&this.updateCustomLinksForCell(a,d[b])};Graph.prototype.updateCustomLinksForCell=function(a,d){};Graph.prototype.getAllConnectionConstraints=function(a,d){if(null!=a){var b=mxUtils.getValue(a.style,
 "points",null);if(null!=b){var c=[];try{for(var f=JSON.parse(b),b=0;b<f.length;b++){var e=f[b];c.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0,null,3<e.length?e[3]:0,4<e.length?e[4]:0))}}catch(aa){}return c}if(null!=a.shape&&null!=a.shape.bounds){e=a.shape.direction;f=a.shape.bounds;b=a.shape.scale;c=f.width/b;f=f.height/b;if(e==mxConstants.DIRECTION_NORTH||e==mxConstants.DIRECTION_SOUTH)e=c,c=f,f=e;b=a.shape.getConstraints(a.style,c,f);if(null!=b)return b;if(null!=
 a.shape.stencil&&null!=a.shape.stencil.constraints)return a.shape.stencil.constraints;if(null!=a.shape.constraints)return a.shape.constraints}}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);null!=d&&(d=mxUtils.getValue(d,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,d,[a]))}};Graph.prototype.isValidRoot=
 function(a){for(var d=this.model.getChildCount(a),b=0,c=0;c<d;c++){var f=this.model.getChildAt(a,c);this.model.isVertex(f)&&(f=this.getCellGeometry(f),null==f||f.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var d=this.view.getState(a),d=null!=d?d.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(d,"part","0")&&"0"!=mxUtils.getValue(d,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(a))};Graph.prototype.createGroupCell=
 function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var d=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(d&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),null!=b&&b.constructor==mxStackLayout&&(d=!1))}return d};Graph.prototype.getPreferredSizeForCell=function(a){var d=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var n=b.getGeometry(e);if(null!=n){n=n.clone();null!=n.points&&n.points.reverse();var y=n.getTerminalPoint(!0),q=n.getTerminalPoint(!1);
-n.setTerminalPoint(y,!1);n.setTerminalPoint(q,!0);b.setGeometry(e,n);var k=this.view.getState(e),u=this.view.getState(g),x=this.view.getState(l);if(null!=k){var U=null!=u?this.getConnectionConstraint(k,u,!0):null,z=null!=x?this.getConnectionConstraint(k,x,!1):null;this.setConnectionConstraint(e,g,!0,z);this.setConnectionConstraint(e,l,!1,U)}c.push(e)}}else if(b.isVertex(e)&&(n=this.getCellGeometry(e),null!=n)){n=n.clone();n.x+=n.width/2-n.height/2;n.y+=n.height/2-n.width/2;var I=n.width;n.width=n.height;
-n.height=I;b.setGeometry(e,n);var B=this.view.getState(e);if(null!=B){var t=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],m=mxUtils.getValue(B.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,t[mxUtils.mod(mxUtils.indexOf(t,m)+(d?-1:1),t.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=
+arguments);null!=d&&(d.width+=10,d.height+=4,this.gridEnabled&&(d.width=this.snap(d.width),d.height=this.snap(d.height)));return d};Graph.prototype.turnShapes=function(a,d){var b=this.getModel(),c=[];b.beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f];if(b.isEdge(e)){var g=b.getTerminal(e,!0),l=b.getTerminal(e,!1);b.setTerminal(e,l,!0);b.setTerminal(e,g,!1);var t=b.getGeometry(e);if(null!=t){t=t.clone();null!=t.points&&t.points.reverse();var n=t.getTerminalPoint(!0),q=t.getTerminalPoint(!1);
+t.setTerminalPoint(n,!1);t.setTerminalPoint(q,!0);b.setGeometry(e,t);var k=this.view.getState(e),y=this.view.getState(g),v=this.view.getState(l);if(null!=k){var U=null!=y?this.getConnectionConstraint(k,y,!0):null,z=null!=v?this.getConnectionConstraint(k,v,!1):null;this.setConnectionConstraint(e,g,!0,z);this.setConnectionConstraint(e,l,!1,U)}c.push(e)}}else if(b.isVertex(e)&&(t=this.getCellGeometry(e),null!=t)){t=t.clone();t.x+=t.width/2-t.height/2;t.y+=t.height/2-t.width/2;var I=t.width;t.width=t.height;
+t.height=I;b.setGeometry(e,t);var B=this.view.getState(e);if(null!=B){var u=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],m=mxUtils.getValue(B.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,u[mxUtils.mod(mxUtils.indexOf(u,m)+(d?-1:1),u.length)],[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.stencilHasPlaceholders=function(a){if(null!=a&&null!=a.fgNode)for(a=
 a.fgNode.firstChild;null!=a;){if("text"==a.nodeName&&"1"==a.getAttribute("placeholders"))return!0;a=a.nextSibling}return!1};Graph.prototype.processChange=function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell&&null!=a.cell.value&&"object"==typeof a.cell.value){var d=this.model.getDescendants(a.cell);if(0<d.length)for(var b=0;b<d.length;b++){var c=this.view.getState(d[b]);null!=c&&null!=c.shape&&null!=c.shape.stencil&&this.stencilHasPlaceholders(c.shape.stencil)?
 this.removeStateForCell(d[b]):this.isReplacePlaceholders(d[b])&&this.view.invalidate(d[b],!1,!1)}}};Graph.prototype.replaceElement=function(a,d){for(var b=a.ownerDocument.createElement(null!=d?d:"span"),c=Array.prototype.slice.call(a.attributes);attr=c.pop();)b.setAttribute(attr.nodeName,attr.nodeValue);b.innerHTML=a.innerHTML;a.parentNode.replaceChild(b,a)};Graph.prototype.processElements=function(a,d){if(null!=a)for(var b=a.getElementsByTagName("*"),c=0;c<b.length;c++)d(b[c])};Graph.prototype.updateLabelElements=
 function(a,d,b){a=null!=a?a:this.getSelectionCells();for(var c=document.createElement("div"),f=0;f<a.length;f++)if(this.isHtmlLabel(a[f])){var e=this.convertValueToString(a[f]);if(null!=e&&0<e.length){c.innerHTML=e;for(var g=c.getElementsByTagName(null!=b?b:"*"),l=0;l<g.length;l++)d(g[l]);c.innerHTML!=e&&this.cellLabelChanged(a[f],c.innerHTML)}}};Graph.prototype.cellLabelChanged=function(a,d,b){d=Graph.zapGremlins(d);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&
@@ -2453,25 +2454,25 @@ mouseMove:function(a,d){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.
 d.getGraphX(),d.getGraphY()))&&this.updateCurrentState(d))}},mouseUp:function(a,c){for(var f=c.getSource(),l=c.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==c.sourceState||!c.isSource(c.sourceState.control))&&((mxEvent.isLeftMouseButton(l)||mxEvent.isMiddleMouseButton(l))&&!mxEvent.isPopupTrigger(l)||mxEvent.isTouchEvent(l))&&(null!=this.currentLink?(f=g.isBlankLink(this.currentLink),
 "data:"!==this.currentLink.substring(0,5)&&f||null==d||d(l,this.currentLink),mxEvent.isConsumed(l)||(l=mxEvent.isMiddleMouseButton(l)?"_blank":f?g.linkTarget:"_top",g.openLink(this.currentLink,l),c.consume())):null!=b&&!c.isConsumed()&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-c.getGraphX())<e&&Math.abs(this.startY-c.getGraphY())<e&&b(c.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));
 null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=null;null!=this.highlight&&this.highlight.hide();null!=g.tooltipHandler&&g.tooltipHandler.hide()}};g.click=function(a){};g.addMouseListener(l);mxEvent.addListener(document,"mouseleave",function(a){l.clear()})};Graph.prototype.duplicateCells=function(a,d){a=null!=a?a:this.getSelectionCells();
-d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),n=this.moveCells([e[g]],c,c,!1)[0];f.push(n);if(d)b.add(l,e[g]);else{var y=l.getIndex(a[g]);b.add(l,e[g],y+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);
+d=null!=d?d:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),c=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1,null,!0),g=0;g<a.length;g++){var l=b.getParent(a[g]),t=this.moveCells([e[g]],c,c,!1)[0];f.push(t);if(d)b.add(l,e[g]);else{var n=l.getIndex(a[g]);b.add(l,e[g],n+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,d,b){if(null!=a&&null!=this.cellEditor.textarea){for(var c=this.cellEditor.textarea.getElementsByTagName("img"),f=[],e=0;e<c.length;e++)f.push(c[e]);
 document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=f[e-1]){a[e].setAttribute("width",d);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){if(null!=this.cellEditor.textarea)if(0==a.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var d=this.cellEditor.textarea.getElementsByTagName("a"),b=[],c=0;c<d.length;c++)b.push(d[c]);document.execCommand("createlink",
 !1,mxUtils.trim(a));d=this.cellEditor.textarea.getElementsByTagName("a");if(d.length==b.length+1)for(c=d.length-1;0<=c;c--)if(d[c]!=b[c-1]){for(d=d[c].getElementsByTagName("a");0<d.length;){for(b=d[0].parentNode;null!=d[0].firstChild;)b.insertBefore(d[0].firstChild,d[0]);b.removeChild(d[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var d=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:
 this.getCellStyle(a);return d||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,d){null==d&&(d=this.getSelectionCells());if(null!=d&&1<d.length){for(var b=[],c=null,f=null,e=0;e<d.length;e++)if(this.getModel().isVertex(d[e])){var g=this.view.getState(d[e]);if(null!=g){var l=a?g.getCenterX():g.getCenterY(),c=null!=c?Math.max(c,l):l,f=null!=f?Math.min(f,l):l;b.push(g)}}if(2<b.length){b.sort(function(d,b){return a?
-d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var n=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var y=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),c=c+n;null!=q&&null!=y&&(q=q.clone(),a?q.x=Math.round(c-q.width/2)-y.origin.x:q.y=Math.round(c-q.height/2)-y.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=
-function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,n,y){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var k=e||c?
-this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var u=this.view.scale,x=mxUtils.createXmlDocument(),z=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"svg"):x.createElement("svg");null!=a&&(null!=z.style?z.style.backgroundColor=a:z.setAttribute("style","background-color:"+a));null==x.createElementNS?(z.setAttribute("xmlns",mxConstants.NS_SVG),z.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):z.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns:xlink",mxConstants.NS_XLINK);a=d/u;var I=Math.max(1,Math.ceil(k.width*a)+2*b)+(y?5:0),B=Math.max(1,Math.ceil(k.height*a)+2*b)+(y?5:0);z.setAttribute("version","1.1");z.setAttribute("width",I+"px");z.setAttribute("height",B+"px");z.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+I+" "+B);x.appendChild(z);var t=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"g"):x.createElement("g");z.appendChild(t);var m=this.createSvgCanvas(t);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=
-f?-.5:0;m.translate(Math.floor((b/d-k.x)/u),Math.floor((b/d-k.y)/u));var J=document.createElement("div"),E=m.getAlternateText;m.getAlternateText=function(a,d,b,c,f,e,g,l,n,y,q,k,u){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(J.innerHTML=e,e=mxUtils.extractTextWithWhitespace(J.childNodes));for(var x=Math.ceil(2*c/this.state.fontSize),z=[],I=0,B=0;(0==x||I<x)&&B<e.length;){var t=e.charCodeAt(B);if(10==t||13==t){if(0<I)break}else z.push(e.charAt(B)),255>t&&I++;B++}z.length<
-e.length&&1<e.length-z.length&&(e=mxUtils.trim(z.join(""))+"...");return e}catch(V){return E.apply(this,arguments)}else return E.apply(this,arguments)};var p=this.backgroundImage;if(null!=p){d=u/d;var M=this.view.translate,U=new mxRectangle(M.x*d,M.y*d,p.width*d,p.height*d);mxUtils.intersects(k,U)&&m.image(M.x,M.y,p.width,p.height,p.src,!0)}m.scale(a);m.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var C=l.drawCellState,D=l.getLinkForCellState;l.getLinkForCellState=function(a,d){var b=D.apply(this,
-arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&C.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(z,n,!0);this.addForeignObjectWarning(m,z);return z}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
+d.x-b.x:d.y-b.y});g=this.view.translate;l=this.view.scale;f=f/l-(a?g.x:g.y);c=c/l-(a?g.x:g.y);this.getModel().beginUpdate();try{for(var t=(c-f)/(b.length-1),c=f,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),q=this.getCellGeometry(b[e].cell),c=c+t;null!=q&&null!=n&&(q=q.clone(),a?q.x=Math.round(c-q.width/2)-n.origin.x:q.y=Math.round(c-q.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,q))}}finally{this.getModel().endUpdate()}}}return d};Graph.prototype.isCloneEvent=
+function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,d){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,d,b,c,f,e,g,l,t,n){var q=this.useCssTransforms;q&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{d=null!=d?d:1;b=null!=b?b:0;f=null!=f?f:!0;e=null!=e?e:!0;g=null!=g?g:!0;var k=e||c?
+this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var y=this.view.scale,v=mxUtils.createXmlDocument(),z=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"svg"):v.createElement("svg");null!=a&&(null!=z.style?z.style.backgroundColor=a:z.setAttribute("style","background-color:"+a));null==v.createElementNS?(z.setAttribute("xmlns",mxConstants.NS_SVG),z.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):z.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:xlink",mxConstants.NS_XLINK);a=d/y;var I=Math.max(1,Math.ceil(k.width*a)+2*b)+(n?5:0),B=Math.max(1,Math.ceil(k.height*a)+2*b)+(n?5:0);z.setAttribute("version","1.1");z.setAttribute("width",I+"px");z.setAttribute("height",B+"px");z.setAttribute("viewBox",(f?"-0.5 -0.5":"0 0")+" "+I+" "+B);v.appendChild(z);var u=null!=v.createElementNS?v.createElementNS(mxConstants.NS_SVG,"g"):v.createElement("g");z.appendChild(u);var m=this.createSvgCanvas(u);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=
+f?-.5:0;m.translate(Math.floor((b/d-k.x)/y),Math.floor((b/d-k.y)/y));var J=document.createElement("div"),E=m.getAlternateText;m.getAlternateText=function(a,d,b,c,f,e,g,l,t,n,q,k,y){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(J.innerHTML=e,e=mxUtils.extractTextWithWhitespace(J.childNodes));for(var v=Math.ceil(2*c/this.state.fontSize),z=[],I=0,B=0;(0==v||I<v)&&B<e.length;){var u=e.charCodeAt(B);if(10==u||13==u){if(0<I)break}else z.push(e.charAt(B)),255>u&&I++;B++}z.length<
+e.length&&1<e.length-z.length&&(e=mxUtils.trim(z.join(""))+"...");return e}catch(V){return E.apply(this,arguments)}else return E.apply(this,arguments)};var C=this.backgroundImage;if(null!=C){d=y/d;var M=this.view.translate,p=new mxRectangle(M.x*d,M.y*d,C.width*d,C.height*d);mxUtils.intersects(k,p)&&m.image(M.x,M.y,C.width,C.height,C.src,!0)}m.scale(a);m.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var U=l.drawCellState,D=l.getLinkForCellState;l.getLinkForCellState=function(a,d){var b=D.apply(this,
+arguments);return null==b||a.view.graph.isCustomLink(b)?null:b};l.drawCellState=function(a,d){for(var b=a.view.graph,c=b.isCellSelected(a.cell),f=b.model.getParent(a.cell);!e&&!c&&null!=f;)c=b.isCellSelected(f),f=b.model.getParent(f);(e||c)&&U.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),m);this.updateSvgLinks(z,t,!0);this.addForeignObjectWarning(m,z);return z}finally{q&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=
 function(a,d){if(0<d.getElementsByTagName("foreignObject").length){var b=a.createElement("switch"),c=a.createElement("g");c.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var f=a.createElement("a");f.setAttribute("transform","translate(0,-5)");null==f.setAttributeNS||d.ownerDocument!=document&&null==document.documentMode?(f.setAttribute("xlink:href",Graph.foreignObjectWarningLink),f.setAttribute("target","_blank")):(f.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",
 Graph.foreignObjectWarningLink),f.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=a.createElement("text");e.setAttribute("text-anchor","middle");e.setAttribute("font-size","10px");e.setAttribute("x","50%");e.setAttribute("y","100%");mxUtils.write(e,Graph.foreignObjectWarningText);b.appendChild(c);f.appendChild(e);b.appendChild(f);d.appendChild(b)}};Graph.prototype.updateSvgLinks=function(a,d,b){a=a.getElementsByTagName("a");for(var c=0;c<a.length;c++){var f=a[c].getAttribute("href");
 null==f&&(f=a[c].getAttribute("xlink:href"));null!=f&&(null!=d&&/^https?:\/\//.test(f)?a[c].setAttribute("target",d):b&&this.isCustomLink(f)&&a[c].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(a){a=new mxSvgCanvas2D(a);a.pointerEvents=!0;return a};Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var d=window.getSelection();d.getRangeAt&&d.rangeCount&&(a=d.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());
 return a};Graph.prototype.getParentByName=function(a,d,b){for(;null!=a&&a.nodeName!=d;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,d,b){for(;null!=a&&!(0<=mxUtils.indexOf(d,a.nodeName));){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var d=null;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){var b=document.createRange();b.selectNode(a);d.removeAllRanges();d.addRange(b)}}else(d=document.selection)&&
-"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=e.getIndex(a);else this.isTableRow(a)&&(c=b.getParent(a)),d||(f=b.getChildCount(b.getChildAt(c,0))-1);for(var g=0;g<b.getChildCount(c);g++){var e=b.getChildAt(c,g),l=b.getChildAt(e,f),n=b.cloneCell(l),y=this.getCellGeometry(n);
-n.value=null;if(null!=y){y.width=Graph.minTableColumnWidth;var q=this.getCellGeometry(e);null!=q&&(y.height=q.height)}b.add(e,n,f+(d?0:1))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width+=Graph.minTableColumnWidth,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=c.getIndex(e);else this.isTableRow(a)?(c=b.getParent(a),f=c.getIndex(a)):
-d||(f=b.getChildCount(c)-1);e=b.cloneCell(b.getChildAt(c,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var n=this.getCellGeometry(a);null!=n&&(n.height=g.height)}b.add(c,e,f+(d?0:1));var y=this.getCellGeometry(c);null!=y&&(y=y.clone(),y.height+=g.height,b.setGeometry(c,y))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var d=this.getModel();d.beginUpdate();try{var b=
-a,c=0;if(this.isTableCell(a))var f=d.getParent(a),b=d.getParent(f),c=f.getIndex(a);else this.isTableRow(a)?(b=d.getParent(a),c=d.getChildCount(a)-1):this.isTable(a)&&(c=d.getChildCount(d.getChildAt(a,0))-1);for(var e=a=0;e<d.getChildCount(b);e++){var f=d.getChildAt(b,e),g=d.getChildAt(f,c);d.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var n=this.getCellGeometry(b);null!=n&&(n=n.clone(),n.width-=a,d.setGeometry(b,n))}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=
+"Control"!=d.type&&(a=d.createRange(),a.collapse(!0),b=d.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertTableColumn=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=e.getIndex(a);else this.isTableRow(a)&&(c=b.getParent(a)),d||(f=b.getChildCount(b.getChildAt(c,0))-1);for(var g=0;g<b.getChildCount(c);g++){var e=b.getChildAt(c,g),l=b.getChildAt(e,f),t=b.cloneCell(l),n=this.getCellGeometry(t);
+t.value=null;if(null!=n){n.width=Graph.minTableColumnWidth;var q=this.getCellGeometry(e);null!=q&&(n.height=q.height)}b.add(e,t,f+(d?0:1))}var k=this.getCellGeometry(c);null!=k&&(k=k.clone(),k.width+=Graph.minTableColumnWidth,b.setGeometry(c,k))}finally{b.endUpdate()}};Graph.prototype.insertTableRow=function(a,d){var b=this.getModel();b.beginUpdate();try{var c=a,f=0;if(this.isTableCell(a))var e=b.getParent(a),c=b.getParent(e),f=c.getIndex(e);else this.isTableRow(a)?(c=b.getParent(a),f=c.getIndex(a)):
+d||(f=b.getChildCount(c)-1);e=b.cloneCell(b.getChildAt(c,f));e.value=null;var g=this.getCellGeometry(e);if(null!=g){g.height=Graph.minTableRowHeight;for(var l=0;l<b.getChildCount(e);l++){a=b.getChildAt(e,l);a.value=null;var t=this.getCellGeometry(a);null!=t&&(t.height=g.height)}b.add(c,e,f+(d?0:1));var n=this.getCellGeometry(c);null!=n&&(n=n.clone(),n.height+=g.height,b.setGeometry(c,n))}}finally{b.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var d=this.getModel();d.beginUpdate();try{var b=
+a,c=0;if(this.isTableCell(a))var f=d.getParent(a),b=d.getParent(f),c=f.getIndex(a);else this.isTableRow(a)?(b=d.getParent(a),c=d.getChildCount(a)-1):this.isTable(a)&&(c=d.getChildCount(d.getChildAt(a,0))-1);for(var e=a=0;e<d.getChildCount(b);e++){var f=d.getChildAt(b,e),g=d.getChildAt(f,c);d.remove(g);var l=this.getCellGeometry(g);null!=l&&(a=Math.max(a,l.width))}var t=this.getCellGeometry(b);null!=t&&(t=t.clone(),t.width-=a,d.setGeometry(b,t))}finally{d.endUpdate()}};Graph.prototype.deleteTableRow=
 function(a){var d=this.getModel();d.beginUpdate();try{var b=a;this.isTableCell(a)?b=d.getParent(a):this.isTable(a)&&(b=d.getChildAt(a,d.getChildCount(a)-1));var c=d.getParent(b);d.remove(b);a=0;var f=this.getCellGeometry(b);null!=f&&(a=f.height);var e=this.getCellGeometry(c);null!=e&&(e=e.clone(),e.height-=a,d.setGeometry(c,e))}finally{d.endUpdate()}};Graph.prototype.insertRow=function(a,d){for(var b=a.tBodies[0],c=b.rows[0].cells,f=0,e=0;e<c.length;e++)var g=c[e].getAttribute("colspan"),f=f+(null!=
 g?parseInt(g):1);b=b.insertRow(d);for(e=0;e<f;e++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,d){a.tBodies[0].deleteRow(d)};Graph.prototype.insertColumn=function(a,d){var b=a.tHead;if(null!=b)for(var c=0;c<b.rows.length;c++){var f=document.createElement("th");b.rows[c].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(c=0;c<b.rows.length;c++)f=b.rows[c].insertCell(d),mxUtils.br(f);return b.rows[0].cells[0<=d?d:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=
 function(a,d){if(0<=d)for(var b=a.tBodies[0].rows,c=0;c<b.length;c++)b[c].cells.length>d&&b[c].deleteCell(d)};Graph.prototype.pasteHtmlAtCaret=function(a){var d;if(window.getSelection){if(d=window.getSelection(),d.getRangeAt&&d.rangeCount){d=d.getRangeAt(0);d.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var c;c=b.firstChild;)lastNode=a.appendChild(c);d.insertNode(a)}}else(d=document.selection)&&"Control"!=d.type&&d.createRange().pasteHTML(a)};
@@ -2481,18 +2482,18 @@ null==d.getState()){var b=this.getCellAt(d.graphX,d.graphY);null!=b&&this.isSwim
 b=this.isSelectionEmpty(),c=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!c&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||d&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
 arguments)})};mxCellEditor.prototype.isContentEditing=function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.alignText=function(a,d){var b=null!=d&&mxEvent.isShiftDown(d);if(b||null!=window.getSelection&&null!=window.getSelection().containsNode){var c=!0;this.graph.processElements(this.textarea,
 function(a){b||window.getSelection().containsNode(a,!0)?(a.removeAttribute("align"),a.style.textAlign=null):c=!1});c&&this.graph.cellEditor.setAlign(a)}document.execCommand("justify"+a.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount){for(var d=[],b=0,c=a.rangeCount;b<c;++b)d.push(a.getRangeAt(b));return d}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(W){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var t=mxConstraintHandler.prototype.update;
-mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?t.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var v=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){v.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
+return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var d=0,b=a.length;d<b;++d)sel.addRange(a[d])}else document.selection&&a.select&&a.select()}catch(W){}};var p=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));p.apply(this,arguments)};var u=mxConstraintHandler.prototype.update;
+mxConstraintHandler.prototype.update=function(a,d){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?u.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var x=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,d){x.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=
 b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),c=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=c&&c.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":
 "":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var A=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(a){function d(a,b){b.originalNode=a;a=a.firstChild;for(var c=b.firstChild;null!=a&&null!=c;)d(a,c),a=a.nextSibling,c=c.nextSibling;return b}function b(a,d){if(null!=a)if(d.originalNode!=a)c(a);else for(a=a.firstChild,d=d.firstChild;null!=a;){var f=a.nextSibling;null==d?c(a):(b(a,d),d=d.nextSibling);a=f}}function c(a){for(var d=
 a.firstChild;null!=d;){var b=d.nextSibling;c(d);d=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}A.apply(this,arguments);
 mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(a){var c=d(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]>"))&&b(this.textarea,c)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell);
-if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){n=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<n.length&&"\n"==n.charAt(n.length-1)&&(n=n.substring(0,n.length-1));n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"<br/>"):n,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,
+if(null!=a){var d=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){t=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<t.length&&"\n"==t.charAt(t.length-1)&&(t=t.substring(0,t.length-1));t=this.graph.sanitizeHtml(d?t.replace(/\n/g,"<br/>"):t,!0);this.textarea.className="mxCellEditor geContentEditable";var c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,
 mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=[];(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&l.push("underline");(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,
 0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&l.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"px";this.textarea.style.textDecoration=l.join(" ");this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=g?"italic":"";this.textarea.style.fontFamily=d;this.textarea.style.textAlign=f;this.textarea.style.padding=
-"0px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n,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.innerHTML="");var n=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(n=mxUtils.replaceTrailingNewlines(n,"<div><br></div>"));
-n=this.graph.sanitizeHtml(d?n.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):n,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=n&&(this.textarea.innerHTML=n);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+"0px";this.textarea.innerHTML!=t&&(this.textarea.innerHTML=t,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.innerHTML="");var t=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(t=mxUtils.replaceTrailingNewlines(t,"<div><br></div>"));
+t=this.graph.sanitizeHtml(d?t.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):t,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var c=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(c)+"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.padding="2px";this.textarea.innerHTML!=t&&(this.textarea.innerHTML=t);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()}};var d=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
 null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*c;this.bounds.height=60*c;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
 Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
 this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",d.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
@@ -2518,18 +2519,18 @@ mxClient.IS_SVG||((new Image).src=HoverIcons.prototype.mainHandle.src,(new Image
 (new Image).src=HoverIcons.prototype.refreshTarget.src,(new Image).src=HoverIcons.prototype.roundDrop.src);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(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||
 0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(d)||
-mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var x=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){x.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
+mxEvent.isPopupTrigger(d)&&(null==a.getState()||mxEvent.isControlDown(d)||mxEvent.isShiftDown(d))};var v=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,d){v.apply(this,arguments);mxEvent.isTouchEvent(d.getEvent())&&this.graph.isCellSelected(d.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var d=a.getEvent();return mxEvent.isLeftMouseButton(d)&&(this.useLeftButtonForPanning&&null==
 a.getState()||mxEvent.isControlDown(d)&&!mxEvent.isShiftDown(d))||this.usePopupTrigger&&mxEvent.isPopupTrigger(d)};mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(a,d){if(this.cancelled)this.cancelled=
 !1,d.consume();else{var b=null!=this.div&&"none"!=this.div.style.display,c=null,f=null,e=null,g=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(c=this.first.x,f=this.first.y,e=(this.currentX-c)/this.graph.view.scale,g=(this.currentY-f)/this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(e=this.graph.snap(e),g=this.graph.snap(g),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(g)<this.graph.tolerance&&(g=0))));this.reset();if(b){if(mxEvent.isAltDown(d.getEvent())&&
-this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var n=this.graph.view.getState(l[b]),y=this.graph.getCellGeometry(l[b]);null!=n&&null!=y&&(y=y.clone(),y.translate(e,g),this.graph.model.setGeometry(l[b],
-y))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==
+this.graph.isToggleEvent(d.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),l=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(l)}else if(this.isSpaceEvent(d)){this.graph.model.beginUpdate();try{for(l=this.graph.getCellsBeyond(c,f,this.graph.getDefaultParent(),!0,!0),b=0;b<l.length;b++)if(this.graph.isCellMovable(l[b])){var t=this.graph.view.getState(l[b]),n=this.graph.getCellGeometry(l[b]);null!=t&&null!=n&&(n=n.clone(),n.translate(e,g),this.graph.model.setGeometry(l[b],
+n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,d.getEvent());d.consume()}}};mxRubberband.prototype.mouseMove=function(a,d){if(!d.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),c=mxUtils.getOffset(this.graph.container);b.x-=c.x;b.y-=c.y;var c=d.getX()+b.x,b=d.getY()+b.y,f=this.first.x-c,e=this.first.y-b,g=this.graph.tolerance;if(null!=this.div||Math.abs(f)>g||Math.abs(e)>g)null==
 this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(c,b),this.isSpaceEvent(d)?(c=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(d.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,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=c-this.width),this.y<this.first.y&&(this.y=b-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)),d.consume()}};var u=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
-this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);u.apply(this,arguments)};var H=(new Date).getTime(),z=0,F=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){F.apply(this,arguments);b!=this.currentTerminalState?(H=(new Date).getTime(),z=0):z=(new Date).getTime()-H;this.currentTerminalState=b};var C=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
+"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)),d.consume()}};var y=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=
+this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);y.apply(this,arguments)};var H=(new Date).getTime(),z=0,F=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,d,b,c){F.apply(this,arguments);b!=this.currentTerminalState?(H=(new Date).getTime(),z=0):z=(new Date).getTime()-H;this.currentTerminalState=b};var C=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=
 this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&C.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=function(a,d){var b=null!=a&&0==a,c=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==
 mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,c,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=c?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
-var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var I=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&
+var t=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,d,b){this.handleImage=d==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:d==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return t.apply(this,arguments)};var I=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var d=this.graph.getModel(),b=d.getParent(a[0]),c=this.graph.getCellGeometry(a[0]);if(d.isEdge(b)&&
 null!=c&&c.relative&&(d=this.graph.view.getState(a[0]),null!=d&&2>d.width&&2>d.height&&null!=d.text&&null!=d.text.boundingBox))return mxRectangle.fromRectangle(d.text.boundingBox)}return I.apply(this,arguments)};var M=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var a=M.apply(this,arguments),d=[],b=0;b<a.length;b++)"1"!=mxUtils.getValue(a[b].style,"part","0")&&d.push(a[b]);return d};var J=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=
 function(a){var d=this.graph.getModel(),b=d.getParent(a.cell),c=this.graph.getCellGeometry(a.cell);return d.isEdge(b)&&null!=c&&c.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(d=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(d.x),Math.round(d.y),Math.round(d.width),Math.round(d.height))):J.apply(this,arguments)};var N=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,d){var b=this.graph.getModel(),c=b.getParent(this.state.cell),
 f=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(d)==mxEvent.ROTATION_HANDLE||!b.isEdge(c)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&N.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=
@@ -2548,13 +2549,13 @@ var Z=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=func
 null!=d&&(b=Math.max(b,d.y+d.height));this.linkHint.style.left=Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+Editor.hintOffset)+"px"}};var G=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(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 T=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(T.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=
 Math.max(0,Math.round(a.x+(a.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=Math.round(a.y+a.height+Editor.hintOffset)+"px"}};var ga=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ga.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var ja=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){ja.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 a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,d){this.canvas=
+null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function c(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function m(){mxActor.call(this)}function p(){mxCylinder.call(this)}function u(){mxActor.call(this)}function x(){mxActor.call(this)}function A(){mxActor.call(this)}function d(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function q(){mxActor.call(this)}function n(a,d){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=d;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function l(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function x(){mxActor.call(this)}function u(){mxActor.call(this)}function H(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function y(){mxShape.call(this)}function I(){mxShape.call(this)}
+this.canvas.curveTo=mxUtils.bind(this,n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo)}function l(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function v(){mxActor.call(this)}function y(){mxActor.call(this)}function H(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function t(){mxShape.call(this)}function I(){mxShape.call(this)}
 function M(){mxEllipse.call(this)}function J(){mxShape.call(this)}function N(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function O(){mxShape.call(this)}function S(){mxShape.call(this)}function Z(){mxShape.call(this)}function X(){mxShape.call(this)}function G(){mxCylinder.call(this)}function T(){mxCylinder.call(this)}function ga(){mxRectangleShape.call(this)}function ja(){mxDoubleEllipse.call(this)}function U(){mxDoubleEllipse.call(this)}function ha(){mxArrowConnector.call(this);
 this.spacing=0}function Y(){mxArrowConnector.call(this);this.spacing=0}function W(){mxActor.call(this)}function ba(){mxRectangleShape.call(this)}function ia(){mxActor.call(this)}function aa(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function L(){mxActor.call(this)}function ka(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function da(){mxActor.call(this)}function pa(){mxActor.call(this)}function K(){mxEllipse.call(this)}
-function ma(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function la(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,l,n,y){g+=n;var qa=c.clone();c.x-=f*(2*g+n);c.y-=e*(2*g+n);f*=g+n;e*=g+n;return function(){a.ellipse(qa.x-
-f-g,qa.y-e-g,2*g,2*g);y?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),qa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
+function ma(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function ya(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ca(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function oa(){mxActor.call(this)}function ta(){mxActor.call(this)}function ua(){mxActor.call(this)}function la(){mxConnector.call(this)}function Aa(a,d,b,c,f,e,g,l,t,n){g+=t;var qa=c.clone();c.x-=f*(2*g+t);c.y-=e*(2*g+t);f*=g+t;e*=g+t;return function(){a.ellipse(qa.x-
+f-g,qa.y-e-g,2*g,2*g);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.darkOpacity=0;a.prototype.darkOpacity2=0;a.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),qa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));
 a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(e,f);a.lineTo(0,f-e);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(c-e,0),a.lineTo(c,e),a.lineTo(e,e),a.close(),a.fill()),0!=qa&&(a.setFillAlpha(Math.abs(qa)),a.setFillColor(0>qa?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,f),a.lineTo(0,f-
 e),a.close(),a.fill()),a.begin(),a.moveTo(e,f),a.lineTo(e,e),a.lineTo(0,0),a.moveTo(e,e),a.lineTo(c,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var Da=Math.tan(mxUtils.toRadians(30)),na=(.5-Da)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,d,b,c,f){d=
 Math.min(c,f/Da);a.translate((c-d)/2,(f-d)/2+d/4);a.moveTo(0,.25*d);a.lineTo(.5*d,d*na);a.lineTo(d,.25*d);a.lineTo(.5*d,(.5-na)*d);a.lineTo(0,.25*d);a.close();a.end()};mxCellRenderer.registerShape("isoRectangle",b);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,d,b,c,f,e){d=Math.min(c,f/(.5+Da));e?(a.moveTo(0,.25*d),a.lineTo(.5*d,(.5-na)*d),a.lineTo(d,.25*d),a.moveTo(.5*d,(.5-na)*d),a.lineTo(.5*d,(1-na)*d)):(a.translate((c-d)/2,(f-d)/2),a.moveTo(0,.25*d),a.lineTo(.5*
@@ -2563,9 +2564,9 @@ a.curveTo(0,2*d,c,2*d,c,d),e||(a.stroke(),a.begin()),a.translate(0,-d);e||(a.mov
 Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),g=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));a.translate(d,b);a.begin();a.moveTo(0,0);a.lineTo(c-e,0);a.lineTo(c,e);a.lineTo(c,f);a.lineTo(0,f);a.lineTo(0,0);a.close();a.end();a.fillAndStroke();this.outline||(a.setShadow(!1),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.close(),
 a.fill()),a.begin(),a.moveTo(c-e,0),a.lineTo(c-e,e),a.lineTo(c,e),a.end(),a.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(m,mxActor);m.prototype.redrawPath=function(a,d,b,c,f){a.moveTo(0,0);a.quadTo(c/2,.5*f,c,0);a.quadTo(.5*c,f/2,c,f);a.quadTo(c/2,.5*f,0,f);a.quadTo(.5*c,f/2,0,0);a.end()};mxCellRenderer.registerShape("switch",m);mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,d,b,c,
 f,e){d=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,"tabPosition",this.tabPosition);e?"left"==g?(a.moveTo(0,b),a.lineTo(d,b)):(a.moveTo(c-d,b),a.lineTo(c,b)):("left"==g?(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,b),a.lineTo(c,b)):(a.moveTo(0,b),a.lineTo(c-d,b),a.lineTo(c-d,0),a.lineTo(c,0)),a.lineTo(c,f),a.lineTo(0,f),a.lineTo(0,
-b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(t,mxActor);t.prototype.size=30;t.prototype.isRoundable=function(){return!0};t.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);
-a.end()};mxCellRenderer.registerShape("card",t);mxUtils.extend(v,mxActor);v.prototype.size=.4;v.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};v.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
-!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",v);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+b),a.close());a.end()};mxCellRenderer.registerShape("folder",p);mxUtils.extend(u,mxActor);u.prototype.size=30;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,d,b,c,f){d=Math.max(0,Math.min(c,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f),new mxPoint(0,f),new mxPoint(0,d)],this.isRounded,b,!0);
+a.end()};mxCellRenderer.registerShape("card",u);mxUtils.extend(x,mxActor);x.prototype.size=.4;x.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,d/2);a.quadTo(c/4,1.4*d,c/2,d/2);a.quadTo(3*c/4,d*(1-1.4),c,d/2);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};x.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",
+!1)){var d=mxUtils.getValue(this.style,"size",this.size),b=a.width,c=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return d*=c,new mxRectangle(a.x,a.y+d,b,c-2*d);d*=b;return new mxRectangle(a.x+d,a.y,b-2*d,c)}return a};mxCellRenderer.registerShape("tape",x);mxUtils.extend(A,mxActor);A.prototype.size=.3;A.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
 "size",this.size))*a.height):null};A.prototype.redrawPath=function(a,d,b,c,f){d=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(c,0);a.lineTo(c,f-d/2);a.quadTo(3*c/4,f-1.4*d,c/2,f-d/2);a.quadTo(c/4,f-d*(1-1.4),0,f-d/2);a.lineTo(0,d/2);a.close();a.end()};mxCellRenderer.registerShape("document",A);var La=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(a,d,b,c){var f=mxUtils.getValue(this.style,"size");return null!=
 f?c*Math.max(0,Math.min(1,f)):La.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var d=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,a.height*d),0,0)}return null};mxUtils.extend(d,mxActor);d.prototype.size=.2;d.prototype.isRoundable=function(){return!0};d.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));
 b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c-d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("parallelogram",d);mxUtils.extend(f,mxActor);f.prototype.size=.2;f.prototype.isRoundable=function(){return!0};f.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
@@ -2573,48 +2574,48 @@ mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPo
 [new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f/2),new mxPoint(0,f/2),new mxPoint(d,f/2),new mxPoint(d,f),new mxPoint(c,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.registerShape("curlyBracket",g);mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(a,d,b,c,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);d=c/5;a.rect(0,0,d,f);a.fillAndStroke();a.rect(2*d,0,d,f);a.fillAndStroke();a.rect(4*d,0,d,f);a.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",q);n.prototype.moveTo=
 function(a,d){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;this.firstX=a;this.firstY=d};n.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};n.prototype.quadTo=function(a,d,b,c){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=c};n.prototype.curveTo=function(a,d,b,c,f,e){this.originalCurveTo.apply(this.canvas,
 arguments);this.lastX=f;this.lastY=e};n.prototype.arcTo=function(a,d,b,c,f,e,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=g};n.prototype.lineTo=function(a,d){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},c=Math.abs(a-this.lastX),f=Math.abs(d-this.lastY),e=Math.sqrt(c*c+f*f);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d;return}var g=Math.round(e/10),l=this.defaultVariation;
-5>g&&(g=5,l/=3);for(var qa=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var n=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,qa*e+this.lastX-n*f,b*e+this.lastY-n*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
+5>g&&(g=5,l/=3);for(var qa=b(a-this.lastX)*c/g,b=b(d-this.lastY)*f/g,c=c/e,f=f/e,e=0;e<g;e++){var t=(Math.random()-.5)*l;this.originalLineTo.call(this.canvas,qa*e+this.lastX-t*f,b*e+this.lastY-t*c)}this.originalLineTo.call(this.canvas,a,d)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=d};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;
 this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Ba=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new n(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ba.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var wa=mxRectangleShape.prototype.isHtmlAllowed;
 mxRectangleShape.prototype.isHtmlAllowed=function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&wa.apply(this,arguments)};var xa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,d,b,c,f){if(null==a.handJiggle)xa.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=
 mxConstants.NONE)e||null!=this.fill&&this.fill!=mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(c/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(c*e,f*e)),a.moveTo(d+e,b),a.lineTo(d+c-e,b),a.quadTo(d+c,b,d+c,b+e),a.lineTo(d+c,b+f-e),a.quadTo(d+
 c,b+f,d+c-e,b+f),a.lineTo(d+e,b+f),a.quadTo(d,b+f,d,b+f-e),a.lineTo(d,b+e),a.quadTo(d,b,d+e,b)):(a.moveTo(d,b),a.lineTo(d+c,b),a.lineTo(d+c,b+f),a.lineTo(d,b+f),a.lineTo(d,b)),a.close(),a.end(),a.fillAndStroke()}};var Ma=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,d,b,c,f){null==a.handJiggle&&Ma.apply(this,arguments)};mxUtils.extend(l,mxRectangleShape);l.prototype.size=.1;l.prototype.isHtmlAllowed=function(){return!1};l.prototype.getLabelBounds=
 function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var d=a.width,b=a.height;a=new mxRectangle(a.x,a.y,d,b);var c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,c=Math.max(c,Math.min(d*f,b*f));a.x+=
 Math.round(c);a.width-=Math.round(2*c)}return a};l.prototype.paintForeground=function(a,d,b,c,f){var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(c*g,f*g));e=Math.round(e);a.begin();a.moveTo(d+e,b);a.lineTo(d+e,b+f);a.moveTo(d+c-e,b);a.lineTo(d+c-e,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",l);mxUtils.extend(B,mxRectangleShape);B.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};B.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",B);mxUtils.extend(x,mxHexagon);x.prototype.size=30;x.prototype.position=.5;x.prototype.position2=.5;x.prototype.base=20;x.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))*this.scale)};x.prototype.isRoundable=function(){return!0};x.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,
-parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",x);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize",
-"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",u);mxUtils.extend(H,mxHexagon);H.prototype.size=
+arguments)};mxCellRenderer.registerShape("process",l);mxUtils.extend(B,mxRectangleShape);B.prototype.paintBackground=function(a,d,b,c,f){a.setFillColor(mxConstants.NONE);a.rect(d,b,c,f);a.fill()};B.prototype.paintForeground=function(a,d,b,c,f){};mxCellRenderer.registerShape("transparent",B);mxUtils.extend(v,mxHexagon);v.prototype.size=30;v.prototype.position=.5;v.prototype.position2=.5;v.prototype.base=20;v.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))*this.scale)};v.prototype.isRoundable=function(){return!0};v.prototype.redrawPath=function(a,d,b,c,f){d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(c,
+parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(c,0),new mxPoint(c,f-b),new mxPoint(Math.min(c,e+l),f-b),new mxPoint(g,f),new mxPoint(Math.max(0,e),f-b),new mxPoint(0,f-b)],this.isRounded,d,!0,[4])};mxCellRenderer.registerShape("callout",v);mxUtils.extend(y,mxActor);y.prototype.size=.2;y.prototype.fixedSize=20;y.prototype.isRoundable=function(){return!0};y.prototype.redrawPath=function(a,d,b,c,f){d="0"!=mxUtils.getValue(this.style,"fixedSize",
+"0")?Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(c-d,0),new mxPoint(c,f/2),new mxPoint(c-d,f),new mxPoint(0,f),new mxPoint(d,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",y);mxUtils.extend(H,mxHexagon);H.prototype.size=
 .25;H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(a,d,b,c,f){d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c-d,0),new mxPoint(c,.5*f),new mxPoint(c-d,f),new mxPoint(d,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",H);mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=
 function(){return!1};z.prototype.paintForeground=function(a,d,b,c,f){var e=Math.min(c/5,f/5)+1;a.begin();a.moveTo(d+c/2,b+e);a.lineTo(d+c/2,b+f-e);a.moveTo(d+e,b+f/2);a.lineTo(d+c-e,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",z);var Ga=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var d=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
 0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};mxRhombus.prototype.paintVertexShape=function(a,d,b,c,f){Ga.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&(a.setShadow(!1),Ga.apply(this,[a,d,b,c,f]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){if(1==
 this.style["double"]){var d=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+d,a.y+d,a.width-2*d,a.height-2*d)}return a};F.prototype.paintForeground=function(a,d,b,c,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);d+=e;b+=e;c-=2*e;f-=2*e;0<c&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);
-var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],qa=this.style["symbol"+e+"VerticalAlign"],n=this.style["symbol"+e+"Width"],y=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,k=this.style["symbol"+e+"VSpacing"]||q,u=this.style["symbol"+e+"ArcSpacing"];null!=u&&(u*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),q+=u,k+=u);var u=d,x=b,u=l==mxConstants.ALIGN_CENTER?u+(c-n)/2:l==mxConstants.ALIGN_RIGHT?u+
-(c-n-q):u+q,x=qa==mxConstants.ALIGN_MIDDLE?x+(f-y)/2:qa==mxConstants.ALIGN_BOTTOM?x+(f-y-k):x+k;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,u,x,n,y);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),
-a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(y,mxShape);y.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",y);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
+var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],qa=this.style["symbol"+e+"VerticalAlign"],t=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],q=this.style["symbol"+e+"Spacing"]||0,k=this.style["symbol"+e+"VSpacing"]||q,y=this.style["symbol"+e+"ArcSpacing"];null!=y&&(y*=this.getArcSize(c+this.strokewidth,f+this.strokewidth),q+=y,k+=y);var y=d,v=b,y=l==mxConstants.ALIGN_CENTER?y+(c-t)/2:l==mxConstants.ALIGN_RIGHT?y+
+(c-t-q):y+q,v=qa==mxConstants.ALIGN_MIDDLE?v+(f-n)/2:qa==mxConstants.ALIGN_BOTTOM?v+(f-n-k):v+k;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,y,v,t,n);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",F);mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,d,b,c,f,e){e?(a.moveTo(0,0),a.lineTo(c/2,f/2),a.lineTo(c,0),a.end()):(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(0,f),
+a.close())};mxCellRenderer.registerShape("message",C);mxUtils.extend(t,mxShape);t.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.ellipse(c/4,0,c/2,f/4);a.fillAndStroke();a.begin();a.moveTo(c/2,f/4);a.lineTo(c/2,2*f/3);a.moveTo(c/2,f/3);a.lineTo(0,f/3);a.moveTo(c/2,f/3);a.lineTo(c,f/3);a.moveTo(c/2,2*f/3);a.lineTo(0,f);a.moveTo(c/2,2*f/3);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlActor",t);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/
 6,0,0,0)};I.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(c/6,f/2);a.end();a.stroke();a.ellipse(c/6,0,5*c/6,f);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",I);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(a,d,b,c,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(d+c/8,b+f);a.lineTo(d+7*c/8,b+f);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",
 M);mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(c,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(c,f);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",J);mxUtils.extend(N,mxShape);N.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};N.prototype.paintBackground=function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,0);a.end();a.stroke();a.ellipse(0,
 f/8,c,7*f/8);a.fillAndStroke()};N.prototype.paintForeground=function(a,d,b,c,f){a.begin();a.moveTo(3*c/8,f/8*1.1);a.lineTo(5*c/8,f/4);a.end();a.stroke()};mxCellRenderer.registerShape("umlControl",N);mxUtils.extend(D,mxRectangleShape);D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,d)};D.prototype.paintBackground=
 function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,d,b,c,e):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,d,b,c,e),a.restore()));e<f&&(a.setDashed(!0),a.begin(),a.moveTo(d+c/2,b+e),a.lineTo(d+c/2,b+f),a.end(),a.stroke())};D.prototype.paintForeground=
 function(a,d,b,c,f){var e=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,d,b,c,Math.min(f,e))};mxCellRenderer.registerShape("umlLifeline",D);mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);n!=mxConstants.NONE&&(a.setFillColor(n),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
+"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,d,b,c,f){var e=this.corner,g=Math.min(c,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),l=Math.min(f,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),t=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);t!=mxConstants.NONE&&(a.setFillColor(t),a.rect(d,b,c,f),a.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=
 mxConstants.NONE?(this.getGradientBounds(a,d,b,c,f),a.setGradient(this.fill,this.gradient,d,b,c,f,this.gradientDirection)):a.setFillColor(this.fill);a.begin();a.moveTo(d,b);a.lineTo(d+g,b);a.lineTo(d+g,b+Math.max(0,l-1.5*e));a.lineTo(d+Math.max(0,g-e),b+l);a.lineTo(d,b+l);a.close();a.fillAndStroke();a.begin();a.moveTo(d+g,b);a.lineTo(d+c,b);a.lineTo(d+c,b+f);a.lineTo(d,b+f);a.lineTo(d,b+l);a.stroke()};mxCellRenderer.registerShape("umlFrame",E);mxPerimeter.LifelinePerimeter=function(a,d,b,c){c=D.prototype.size;
 null!=d&&(c=mxUtils.getValue(d.style,"size",c)*d.view.scale);d=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;b.x<a.getCenterX()&&(d=-1*(d+1));return new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y+c,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,d,b,c){c=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);
 mxPerimeter.BackbonePerimeter=function(a,d,b,c){c=parseFloat(d.style[mxConstants.STYLE_STROKEWIDTH]||1)*d.view.scale/2-1;null!=d.style.backboneSize&&(c+=parseFloat(d.style.backboneSize)*d.view.scale/2-1);if("south"==d.style[mxConstants.STYLE_DIRECTION]||"north"==d.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(c=-1*(c+1)),new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(c=-1*(c+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),
-a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",x.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size;
-null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,n=a.width,y=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=y*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+y),new mxPoint(g,l+y-e),new mxPoint(g,l)]):(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+y),new mxPoint(g,
-l+y),new mxPoint(g+e,l)]);y=a.getCenterX();a=a.getCenterY();a=new mxPoint(y,a);f&&(c.x<g||c.x>g+n?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,n=a.width,y=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-d==mxConstants.DIRECTION_EAST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+n-e,l),new mxPoint(g+n,l+y),new mxPoint(g,l+y),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l),new mxPoint(g+n-e,l+y),new mxPoint(g+e,l+y),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=y*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+n,l),new mxPoint(g+n,l+y),new mxPoint(g,l+y-e),new mxPoint(g,l+e)]):(e=y*Math.max(0,
-Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n,l+e),new mxPoint(g+n,l+y-e),new mxPoint(g,l+y),new mxPoint(g,l)]);y=a.getCenterX();a=a.getCenterY();a=new mxPoint(y,a);c&&(b.x<g||b.x>g+n?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?u.prototype.fixedSize:u.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,
-"size",e));var g=a.x,l=a.y,n=a.width,y=a.height,q=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+n-f,l),new mxPoint(g+n,a),new mxPoint(g+n-f,l+y),new mxPoint(g,l+y),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,
-Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+n,l),new mxPoint(g+n-f,a),new mxPoint(g+n,l+y),new mxPoint(g+f,l+y),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(y,e)):y*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(q,l),new mxPoint(g+n,l+f),new mxPoint(g+n,l+y),new mxPoint(q,l+y-f),new mxPoint(g,l+y),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(y,e)):y*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(q,l+f),new mxPoint(g+
-n,l),new mxPoint(g+n,l+y-f),new mxPoint(q,l+y),new mxPoint(g,l+y-f),new mxPoint(g,l)]);q=new mxPoint(q,a);c&&(b.x<g||b.x>g+n?q.y=b.y:q.x=b.x);return mxUtils.getPerimeterPoint(l,q,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=H.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,n=a.height,y=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,
-mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=n*Math.max(0,Math.min(1,f)),g=[new mxPoint(y,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+n-f),new mxPoint(y,g+n),new mxPoint(e,g+n-f),new mxPoint(e,g+f),new mxPoint(y,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+n),new mxPoint(e+f,g+n),new mxPoint(e,a),new mxPoint(e+f,g)]);y=new mxPoint(y,a);c&&(b.x<e||b.x>e+
-l?y.y=b.y:y.x=b.x);return mxUtils.getPerimeterPoint(g,y,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(S,mxShape);S.prototype.size=
+a.getCenterY()+c)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,d,b,c){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(d.style,"size",v.prototype.size))*d.view.scale))),d.style),d,b,c)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,f){var e=d.prototype.size;
+null!=b&&(e=mxUtils.getValue(b.style,"size",e));var g=a.x,l=a.y,t=a.width,n=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l+e),new mxPoint(g+t,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l)]):(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+t,l),new mxPoint(g+t-e,l+n),new mxPoint(g,
+l+n),new mxPoint(g+e,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(c.x<g||c.x>g+t?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(l,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,d,b,c){var e=f.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,"size",e));var g=a.x,l=a.y,t=a.width,n=a.height;d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
+d==mxConstants.DIRECTION_EAST?(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+t-e,l),new mxPoint(g+t,l+n),new mxPoint(g,l+n),new mxPoint(g+e,l)]):d==mxConstants.DIRECTION_WEST?(e=t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l),new mxPoint(g+t-e,l+n),new mxPoint(g+e,l+n),new mxPoint(g,l)]):d==mxConstants.DIRECTION_NORTH?(e=n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+t,l),new mxPoint(g+t,l+n),new mxPoint(g,l+n-e),new mxPoint(g,l+e)]):(e=n*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t,l+e),new mxPoint(g+t,l+n-e),new mxPoint(g,l+n),new mxPoint(g,l)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);c&&(b.x<g||b.x>g+t?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(l,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,d,b,c){var f="0"!=mxUtils.getValue(d.style,"fixedSize","0"),e=f?y.prototype.fixedSize:y.prototype.size;null!=d&&(e=mxUtils.getValue(d.style,
+"size",e));var g=a.x,l=a.y,t=a.width,n=a.height,q=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_EAST?(f=f?Math.max(0,Math.min(t,e)):t*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+t-f,l),new mxPoint(g+t,a),new mxPoint(g+t-f,l+n),new mxPoint(g,l+n),new mxPoint(g+f,a),new mxPoint(g,l)]):d==mxConstants.DIRECTION_WEST?(f=f?Math.max(0,Math.min(t,e)):t*Math.max(0,
+Math.min(1,e)),l=[new mxPoint(g+f,l),new mxPoint(g+t,l),new mxPoint(g+t-f,a),new mxPoint(g+t,l+n),new mxPoint(g+f,l+n),new mxPoint(g,a),new mxPoint(g+f,l)]):d==mxConstants.DIRECTION_NORTH?(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+f),new mxPoint(q,l),new mxPoint(g+t,l+f),new mxPoint(g+t,l+n),new mxPoint(q,l+n-f),new mxPoint(g,l+n),new mxPoint(g,l+f)]):(f=f?Math.max(0,Math.min(n,e)):n*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(q,l+f),new mxPoint(g+
+t,l),new mxPoint(g+t,l+n-f),new mxPoint(q,l+n),new mxPoint(g,l+n-f),new mxPoint(g,l)]);q=new mxPoint(q,a);c&&(b.x<g||b.x>g+t?q.y=b.y:q.x=b.x);return mxUtils.getPerimeterPoint(l,q,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,d,b,c){var f=H.prototype.size;null!=d&&(f=mxUtils.getValue(d.style,"size",f));var e=a.x,g=a.y,l=a.width,t=a.height,n=a.getCenterX();a=a.getCenterY();d=null!=d?mxUtils.getValue(d.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;d==mxConstants.DIRECTION_NORTH||d==mxConstants.DIRECTION_SOUTH?(f=t*Math.max(0,Math.min(1,f)),g=[new mxPoint(n,g),new mxPoint(e+l,g+f),new mxPoint(e+l,g+t-f),new mxPoint(n,g+t),new mxPoint(e,g+t-f),new mxPoint(e,g+f),new mxPoint(n,g)]):(f=l*Math.max(0,Math.min(1,f)),g=[new mxPoint(e+f,g),new mxPoint(e+l-f,g),new mxPoint(e+l,a),new mxPoint(e+l-f,g+t),new mxPoint(e+f,g+t),new mxPoint(e,a),new mxPoint(e+f,g)]);n=new mxPoint(n,a);c&&(b.x<e||b.x>e+
+l?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(g,n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(O,mxShape);O.prototype.size=10;O.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(d,b);a.ellipse((c-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(c/2,e);a.lineTo(c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",O);mxUtils.extend(S,mxShape);S.prototype.size=
 10;S.prototype.inset=2;S.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.begin();a.moveTo(c/2,e+g);a.lineTo(c/2,f);a.end();a.stroke();a.begin();a.moveTo((c-e)/2-g,e/2);a.quadTo((c-e)/2-g,e+g,c/2,e+g);a.quadTo((c+e)/2+g,e+g,(c+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",S);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=
 function(a,d,b,c,f){a.translate(d,b);a.begin();a.moveTo(0,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,0,f);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,d,b,c,f){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(d,b);a.ellipse(0,e,c-2*e,f-2*e);a.fillAndStroke();a.begin();a.moveTo(c/2,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c/2,f);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",
-X);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=20;G.prototype.jettyHeight=10;G.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),n=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,
-f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",G);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/
-2,n=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,n),a.lineTo(g,n),a.lineTo(g,n+d),a.lineTo(b,n+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,n+d),a.lineTo(0,n+d),a.lineTo(0,n),a.lineTo(b,n),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ga,mxRectangleShape);ga.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style,
+X);mxUtils.extend(G,mxCylinder);G.prototype.jettyWidth=20;G.prototype.jettyHeight=10;G.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=Math.min(d,f-d),t=Math.min(l+2*d,f-d);e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,t),a.lineTo(g,t),a.lineTo(g,t+d),a.lineTo(b,t+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,
+f),a.lineTo(b,f),a.lineTo(b,t+d),a.lineTo(0,t+d),a.lineTo(0,t),a.lineTo(b,t),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("module",G);mxUtils.extend(T,mxCylinder);T.prototype.jettyWidth=32;T.prototype.jettyHeight=12;T.prototype.redrawPath=function(a,d,b,c,f,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));d=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*f-d/
+2,t=.7*f-d/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+d),a.lineTo(b,l+d),a.moveTo(b,t),a.lineTo(g,t),a.lineTo(g,t+d),a.lineTo(b,t+d)):(a.moveTo(b,0),a.lineTo(c,0),a.lineTo(c,f),a.lineTo(b,f),a.lineTo(b,t+d),a.lineTo(0,t+d),a.lineTo(0,t),a.lineTo(b,t),a.lineTo(b,l+d),a.lineTo(0,l+d),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",T);mxUtils.extend(ga,mxRectangleShape);ga.prototype.paintForeground=function(a,d,b,c,f){var e=c/2,g=f/2,l=mxUtils.getValue(this.style,
 mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,[new mxPoint(d+e,b),new mxPoint(d+c,b+g),new mxPoint(d+e,b+f),new mxPoint(d,b+g)],this.isRounded,l,!0);a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ga);mxUtils.extend(ja,mxDoubleEllipse);ja.prototype.outerStroke=!0;ja.prototype.paintVertexShape=function(a,d,b,c,f){var e=Math.min(4,Math.min(c/5,f/5));0<c&&0<f&&(a.ellipse(d+e,b+e,c-2*e,f-2*
 e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(d,b,c,f),a.stroke())};mxCellRenderer.registerShape("endState",ja);mxUtils.extend(U,ja);U.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",U);mxUtils.extend(ha,mxArrowConnector);ha.prototype.defaultWidth=4;ha.prototype.isOpenEnded=function(){return!0};ha.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ha.prototype.isArrowRounded=function(){return this.isRounded};
 mxCellRenderer.registerShape("link",ha);mxUtils.extend(Y,mxArrowConnector);Y.prototype.defaultWidth=10;Y.prototype.defaultArrowWidth=20;Y.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Y.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Y.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+
@@ -2639,11 +2640,11 @@ c/2,b+f)):(a.moveTo(d,b+f/2),a.lineTo(d+c,b+f/2));a.end();a.stroke()};mxCellRend
 "size",this.size))));d=(f-e)/2;b=d+e;var g=(c-e)/2,e=g+e;a.moveTo(0,d);a.lineTo(g,d);a.lineTo(g,0);a.lineTo(e,0);a.lineTo(e,d);a.lineTo(c,d);a.lineTo(c,b);a.lineTo(e,b);a.lineTo(e,f);a.lineTo(g,f);a.lineTo(g,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.registerShape("cross",ta);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(a,d,b,c,f){d=Math.min(c,f/2);b=Math.min(c-d,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.moveTo(0,f/2);a.lineTo(b,
 0);a.lineTo(c-d,0);a.quadTo(c,0,c,f/2);a.quadTo(c,f,c-d,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(la,mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,d,b){for(var c=[],f=0;f<d.length;f++)c.push(mxUtils.clone(d[f]));var f=a.state.dashed,e=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,[a,c,b]);3<=a.state.strokeWidth&&(c=mxUtils.getValue(this.style,"fillColor",null),null!=c&&
 (a.setStrokeColor(c),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,e),la.prototype.origPaintEdgeShape.apply(this,[a,d,b])))};mxCellRenderer.registerShape("filledEdge",la);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var d=this.format.getSelectionState(),b=a.apply(this,arguments);"umlFrame"==d.style.shape&&b.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});
-return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,l,n,y){var q=f*(g+n+1),k=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,n,y){var q=f*(g+n+1),k=e*(g+n+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.moveTo(c.x-q/2+k/2,c.y-k/2-q/2);a.lineTo(c.x-k/2-3*q/2,c.y-3*k/2+q/2);a.stroke()}});mxMarker.addMarker("circle",
-Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,n,y){var q=c.clone(),k=Aa.apply(this,arguments),u=f*(g+2*n),x=e*(g+2*n);return function(){k.apply(this,arguments);a.begin();a.moveTo(q.x-f*n,q.y-e*n);a.lineTo(q.x-2*u+f*n,q.y-2*x+e*n);a.moveTo(q.x-u-x+e*n,q.y-x+u-f*n);a.lineTo(q.x+x-u-e*n,q.y-x-u+f*n);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,d,b,c,f,e,g,l,n,y){var q=f*(g+n+1),k=e*(g+n+1),u=c.clone();c.x-=q;c.y-=k;return function(){a.begin();a.moveTo(u.x-k,u.y+q);a.quadTo(c.x-
-k,c.y+q,c.x,c.y);a.quadTo(c.x+k,c.y-q,u.x+k,u.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,n,y){d=f*n*1.118;b=e*n*1.118;f*=g+n;e*=g+n;var q=c.clone();q.x-=d;q.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-f-e/2,q.y-e+f/2):a.lineTo(q.x+e/2-f,q.y-e-f/2);a.lineTo(q.x-f,q.y-e);a.close();y?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,n,y,q){e*=l+y;g*=l+y;var k=
-f.clone();return function(){d.begin();d.moveTo(k.x,k.y);n?d.lineTo(k.x-e-g/a,k.y-g+e/a):d.lineTo(k.x+g/a-e,k.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,d,b){return Ea(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},Ea=function(a,d,b,c,f){return V(a,d,
-function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,n=f.y-l.y,y=Math.sqrt(e*e+n*n),l=c.call(this,y,e/y,n/y,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var n=a.view.scale,y=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-y.x,q=g.y-y.y,k=Math.sqrt(l*l+q*q);c.x=(c.x+d.x)*n;c.y=(c.y+d.y)*n;f.call(this,k,l/k,q/k,y,g,c,e)})},va=function(a){return function(d){return[V(d,["arrowWidth",
+return b}}();mxMarker.addMarker("dash",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.stroke()}});mxMarker.addMarker("cross",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1);return function(){a.begin();a.moveTo(c.x-q/2-k/2,c.y-k/2+q/2);a.lineTo(c.x+k/2-3*q/2,c.y-3*k/2-q/2);a.moveTo(c.x-q/2+k/2,c.y-k/2-q/2);a.lineTo(c.x-k/2-3*q/2,c.y-3*k/2+q/2);a.stroke()}});mxMarker.addMarker("circle",
+Aa);mxMarker.addMarker("circlePlus",function(a,d,b,c,f,e,g,l,t,n){var q=c.clone(),k=Aa.apply(this,arguments),y=f*(g+2*t),v=e*(g+2*t);return function(){k.apply(this,arguments);a.begin();a.moveTo(q.x-f*t,q.y-e*t);a.lineTo(q.x-2*y+f*t,q.y-2*v+e*t);a.moveTo(q.x-y-v+e*t,q.y-v+y-f*t);a.lineTo(q.x+v-y-e*t,q.y-v-y+f*t);a.stroke()}});mxMarker.addMarker("halfCircle",function(a,d,b,c,f,e,g,l,t,n){var q=f*(g+t+1),k=e*(g+t+1),y=c.clone();c.x-=q;c.y-=k;return function(){a.begin();a.moveTo(y.x-k,y.y+q);a.quadTo(c.x-
+k,c.y+q,c.x,c.y);a.quadTo(c.x+k,c.y-q,y.x+k,y.y-q);a.stroke()}});mxMarker.addMarker("async",function(a,d,b,c,f,e,g,l,t,n){d=f*t*1.118;b=e*t*1.118;f*=g+t;e*=g+t;var q=c.clone();q.x-=d;q.y-=b;c.x+=1*-f-d;c.y+=1*-e-b;return function(){a.begin();a.moveTo(q.x,q.y);l?a.lineTo(q.x-f-e/2,q.y-e+f/2):a.lineTo(q.x+e/2-f,q.y-e-f/2);a.lineTo(q.x-f,q.y-e);a.close();n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(d,b,c,f,e,g,l,t,n,q){e*=l+n;g*=l+n;var k=
+f.clone();return function(){d.begin();d.moveTo(k.x,k.y);t?d.lineTo(k.x-e-g/a,k.y-g+e/a):d.lineTo(k.x+g/a-e,k.y-g-e/a);d.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Oa=function(a,d,b){return Ea(a,["width"],d,function(d,c,f,e,g){g=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+c*d/4+f*g/2,e.y+f*d/4-c*g/2)},function(d,c,f,e,g,l){d=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*d)/a.view.scale-b})},Ea=function(a,d,b,c,f){return V(a,d,
+function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.scale,l=b?f[0]:f[e],f=b?f[1]:f[e-1],e=f.x-l.x,t=f.y-l.y,n=Math.sqrt(e*e+t*t),l=c.call(this,n,e/n,t/n,l,f);return new mxPoint(l.x/g-d.x,l.y/g-d.y)},function(d,c,e){var g=a.absolutePoints,l=g.length-1;d=a.view.translate;var t=a.view.scale,n=b?g[0]:g[l],g=b?g[1]:g[l-1],l=g.x-n.x,q=g.y-n.y,k=Math.sqrt(l*l+q*q);c.x=(c.x+d.x)*t;c.y=(c.y+d.y)*t;f.call(this,k,l/k,q/k,n,g,c,e)})},va=function(a){return function(d){return[V(d,["arrowWidth",
 "arrowSize"],function(d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",P.prototype.arrowWidth))),c=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",P.prototype.arrowSize)));return new mxPoint(d.x+(1-c)*d.width,d.y+(1-b)*d.height/2)},function(d,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(d.y+d.height/2-b.y)/d.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(d.x+d.width-b.x)/d.width))})]}},Na=function(a,d,b){return function(c){var f=
 [V(c,["size"],function(b){var c=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",d)))))*a;return new mxPoint(b.x+c,b.y+c)},function(d,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(d.width,b.x-d.x),Math.min(d.height,b.y-d.y)))/a)})];b&&mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(sa(c));return f}},Ha=function(a,d,b,c,f){b=null!=b?b:1;return function(e){var g=[V(e,["size"],function(d){var b=null!=f?"0"!=mxUtils.getValue(this.state.style,
 "fixedSize","0"):null,c=parseFloat(mxUtils.getValue(this.state.style,"size",b?f:a));return new mxPoint(d.x+Math.max(0,Math.min(d.width,c*(b?1:d.width))),d.getCenterY())},function(a,d,c){var g=null!=f?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null;a=g?d.x-a.x:Math.max(0,Math.min(b,(d.x-a.x)/a.width));g&&!mxEvent.isAltDown(c.getEvent())&&(a=e.view.graph.snap(a));this.state.style.size=a},null,c)];d&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(sa(e));return g}},Pa=function(a){return function(d){var b=
@@ -2651,14 +2652,14 @@ function(d){var f=a.absolutePoints,e=f.length-1;d=a.view.translate;var g=a.view.
 [mxConstants.STYLE_ARCSIZE],function(b){var c=null!=d?d:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+c)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*
 f),b.y+c)},function(d,b,c){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(d.width,2*(d.x+d.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(d.width-b.x+d.x)/Math.min(d.width,d.height))))})},V=function(a,d,b,c,f,e){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<d.length;a++)this.copyStyle(d[a])};
 g.getPosition=b;g.setPosition=c;g.ignoreGrid=null!=f?f:!0;if(e){var l=g.positionChanged;g.positionChanged=function(){l.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ia={link:function(a){return[Oa(a,!0,10),Oa(a,!1,10)]},flexArrow:function(a){var d=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,
-b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
-a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
-Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
+b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;
+a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(t.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(d,b,c,f,e){d=(a.shape.getStartArrowWidth()-
+a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)+c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)-b*d/2)},function(b,c,f,e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,
+Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(t.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<d/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<d&&(a.style.startWidth=
 a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(Ea(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,
-e,g,l,n){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(n.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
-d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,n){b=
-Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(n.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(n.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+e,g,l,t){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(t.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(Ea(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(d,b,c,f,e){d=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(e+a.shape.strokewidth*a.view.scale)-c*d/2,f.y+c*(e+a.shape.strokewidth*a.view.scale)+b*d/2)},function(b,c,f,e,g,l,t){b=
+Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));c=mxUtils.ptLineDist(e.x,e.y,e.x+f,e.y-c,l.x,l.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(c-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(t.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(t.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
 parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<d/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<d&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var d=[V(a,[mxConstants.STYLE_STARTSIZE],function(d){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(d.getCenterX(),
 d.y+Math.max(0,Math.min(d.height,b))):new mxPoint(d.x+Math.max(0,Math.min(d.width,b)),d.getCenterY())},function(d,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(d.height,b.y-d.y))):Math.round(Math.max(0,Math.min(d.width,b.x-d.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));d.push(sa(a,b/2))}return d},
 label:Fa(),ext:Fa(),rectangle:Fa(),triangle:Fa(),rhombus:Fa(),umlLifeline:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))},!1)]},umlFrame:function(a){return[V(a,["width","height"],function(a){var d=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
@@ -2666,29 +2667,29 @@ label:Fa(),ext:Fa(),rectangle:Fa(),triangle:Fa(),rhombus:Fa(),umlLifeline:functi
 "size",l.prototype.size))));return new mxPoint(a.x+a.width*d,a.y+a.height/4)},function(a,d){this.state.style.size=Math.max(0,Math.min(.5,(d.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},cross:function(a){return[V(a,["size"],function(a){var d=Math.min(a.width,a.height),d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ta.prototype.size)))*d/2;return new mxPoint(a.getCenterX()-d,a.getCenterY()-d)},function(a,d){var b=Math.min(a.width,
 a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-d.y)/b*2,Math.max(0,a.getCenterX()-d.x)/b*2)))})]},note:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(a.x+a.width-d,a.y+d)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-d.x),Math.min(a.height,d.y-a.y))))})]},manualInput:function(a){var d=
 [V(a,["size"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",W.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*d/4)},function(a,d){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(d.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},dataStorage:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ka.prototype.size))));
-return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[V(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",x.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position)));mxUtils.getValue(this.state.style,"base",x.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-
-d)},function(a,d){mxUtils.getValue(this.state.style,"base",x.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),V(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",x.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
-(d.x-a.x)/a.width)))/100}),V(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",x.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",x.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",x.prototype.position)));
+return new mxPoint(a.x+(1-d)*a.width,a.getCenterY())},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-d.x)/a.width))})]},callout:function(a){var d=[V(a,["size","position"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));mxUtils.getValue(this.state.style,"base",v.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-
+d)},function(a,d){mxUtils.getValue(this.state.style,"base",v.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-d.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(d.x-a.x)/a.width)))/100}),V(a,["position2"],function(a){var d=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",v.prototype.position2)));return new mxPoint(a.x+d*a.width,a.y+a.height)},function(a,d){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(d.x-a.x)/a.width)))/100}),V(a,["base"],function(a){var d=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",v.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position))),c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",v.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+c),a.y+a.height-d)},function(a,d){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",v.prototype.position)));
 this.state.style.base=Math.round(Math.max(0,Math.min(a.width,d.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},internalStorage:function(a){var d=[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ba.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ba.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
 d.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(sa(a));return d},module:function(a){return[V(a,["jettyWidth","jettyHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"jettyWidth",G.prototype.jettyWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"jettyHeight",G.prototype.jettyHeight)));return new mxPoint(a.x+d/2,a.y+2*b)},function(a,d){this.state.style.jettyWidth=
 Math.round(2*Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y))/2)})]},corner:function(a){return[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ia.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ia.prototype.dy)));return new mxPoint(a.x+d,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,d.x-a.x)));this.state.style.dy=
 Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},tee:function(a){return[V(a,["dx","dy"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+(a.width+d)/2,a.y+b)},function(a,d){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,d.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},
 singleArrow:va(1),doubleArrow:va(.5),folder:function(a){return[V(a,["tabWidth","tabHeight"],function(a){var d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(d=a.width-d);return new mxPoint(a.x+d,a.y+b)},function(a,d){var b=Math.max(0,Math.min(a.width,
 d.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,d.y-a.y)))})]},document:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",A.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,
-Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",v.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",pa.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ha(u.prototype.size,!0,null,!0,u.prototype.fixedSize),hexagon:Ha(H.prototype.size,!0,.5,!0),curlyBracket:Ha(g.prototype.size,!1),display:Ha(ua.prototype.size,!1),cube:Na(1,a.prototype.size,!1),card:Na(.5,t.prototype.size,!0),loopLimit:Na(.5,da.prototype.size,!0),trapezoid:Pa(.5),parallelogram:Pa(1)};Graph.createHandle=V;Graph.handleFactory=Ia;mxVertexHandler.prototype.createCustomHandles=
+Math.min(1,(a.y+a.height-d.y)/a.height))})]},tape:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",x.prototype.size))));return new mxPoint(a.getCenterX(),a.y+d*a.height/2)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(d.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[V(a,["size"],function(a){var d=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",pa.prototype.size))));return new mxPoint(a.getCenterX(),
+a.y+(1-d)*a.height)},function(a,d){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-d.y)/a.height))})]},step:Ha(y.prototype.size,!0,null,!0,y.prototype.fixedSize),hexagon:Ha(H.prototype.size,!0,.5,!0),curlyBracket:Ha(g.prototype.size,!1),display:Ha(ua.prototype.size,!1),cube:Na(1,a.prototype.size,!1),card:Na(.5,u.prototype.size,!0),loopLimit:Na(.5,da.prototype.size,!0),trapezoid:Pa(.5),parallelogram:Pa(1)};Graph.createHandle=V;Graph.handleFactory=Ia;mxVertexHandler.prototype.createCustomHandles=
 function(){if(this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ia[a];null==a&&null!=this.state.shape&&this.state.shape.isRoundable()&&(a=Ia[mxConstants.SHAPE_RECTANGLE]);if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&
 (a=mxConstants.SHAPE_CONNECTOR);a=Ia[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ja=new mxPoint(1,0),Ka=new mxPoint(1,0),va=mxUtils.toRadians(-30),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(va),Math.sin(va)),va=mxUtils.toRadians(-150),Ka=mxUtils.getRotatedPoint(Ka,Math.cos(va),Math.sin(va));mxEdgeStyle.IsometricConnector=function(a,d,b,c,f){var e=a.view;c=null!=c&&0<c.length?c[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=c&&(c=e.transformControlPoint(a,
-c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var n=Ja.x,y=Ja.y,q=Ka.x,k=Ka.y,u="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=x.x;var c=d-x.y;d=(k*a-q*c)/(n*k-y*q);a=(y*a-n*c)/(y*q-n*k);u?(b&&(x=new mxPoint(x.x+n*d,x.y+y*d),f.push(x)),x=new mxPoint(x.x+q*a,x.y+k*a)):(b&&(x=new mxPoint(x.x+q*a,x.y+k*a),f.push(x)),x=new mxPoint(x.x+n*d,x.y+y*d));f.push(x)};
-var x=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Qa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)),
+c));null==l&&null!=d&&(l=new mxPoint(d.getCenterX(),d.getCenterY()));null==g&&null!=b&&(g=new mxPoint(b.getCenterX(),b.getCenterY()));var t=Ja.x,n=Ja.y,q=Ka.x,k=Ka.y,y="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=l){a=function(a,d,b){a-=v.x;var c=d-v.y;d=(k*a-q*c)/(t*k-n*q);a=(n*a-t*c)/(n*q-t*k);y?(b&&(v=new mxPoint(v.x+t*d,v.y+n*d),f.push(v)),v=new mxPoint(v.x+q*a,v.y+k*a)):(b&&(v=new mxPoint(v.x+q*a,v.y+k*a),f.push(v)),v=new mxPoint(v.x+t*d,v.y+n*d));f.push(v)};
+var v=l;null==c&&(c=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(c.x,c.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Qa=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,d){if(d==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Qa.apply(this,arguments)};b.prototype.constraints=[];e.prototype.getConstraints=function(a,d,b){a=[];var c=Math.tan(mxUtils.toRadians(30)),
 f=(.5-c)/2,c=Math.min(d,b/(.5+c));d=(d-c)/2;b=(b-c)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+c*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.25*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+c,b+.75*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d+.5*c,b+(1-f)*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b+.75*c));return a};
-x.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,
+v.prototype.getConstraints=function(a,d,b){a=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var c=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.25,
 0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b-c)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-c));a.push(new mxConnectionConstraint(new mxPoint(0,0),
 !1,null,0,.5*(b-c)));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
 .75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,
 0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;
 z.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};t.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};u.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,
 "size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,
 1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d>=2*c&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};a.prototype.getConstraints=function(a,d,b){a=[];var c=Math.max(0,Math.min(d,Math.min(b,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d-c),0));a.push(new mxConnectionConstraint(new mxPoint(0,
 0),!1,null,d-c,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d-.5*c,.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,c));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,.5*(b+c)));a.push(new mxConnectionConstraint(new mxPoint(1,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-.5*c));a.push(new mxConnectionConstraint(new mxPoint(0,
@@ -2701,12 +2702,12 @@ mxRectangleShape.prototype.constraints;K.prototype.constraints=mxEllipse.prototy
 0),!1,null,f,b));return a};G.prototype.getConstraints=function(a,d,b){d=parseFloat(mxUtils.getValue(a,"jettyWidth",G.prototype.jettyWidth))/2;a=parseFloat(mxUtils.getValue(a,"jettyHeight",G.prototype.jettyHeight));var c=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,
 .25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,d),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-.5*a,1.5*a)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(b-
 .5*a,3.5*a))];b>5*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,d));b>8*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,d));b>15*a&&c.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,d));return c};da.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),
-new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=
+new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];t.prototype.constraints=
 [new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];T.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)];m.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)];v.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)];u.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,
+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)];x.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)];y.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)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,
 0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
@@ -2731,10 +2732,10 @@ Actions.prototype.init=function(){function a(a){c.escape();var b=c.getDeletableC
 function(){c.openLink(b.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a);e.graph.setSelectionCells(e.graph.importGraphModel(c.documentElement))}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
 ": "+d.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,296,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
 620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=k;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(c,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
-Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(c)}catch(t){b.handleError(t)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();
+Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(c)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{mxClipboard.copy(c)}catch(u){b.handleError(u)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&mxClipboard.paste(c)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){c.getModel().beginUpdate();
 try{var b=mxClipboard.paste(c);if(null!=b){a=!0;for(var e=0;e<b.length&&a;e++)a=a&&c.model.isEdge(b[e]);var d=c.view.translate,f=c.view.scale,g=d.x,q=d.y,d=null;if(1==b.length&&a){var n=c.getCellGeometry(b[0]);null!=n&&(d=n.getTerminalPoint(!0))}d=null!=d?d:c.getBoundingBoxFromGeometry(b,a);if(null!=d){var l=Math.round(c.snap(c.popupMenuHandler.triggerX/f-g)),k=Math.round(c.snap(c.popupMenuHandler.triggerY/f-q));c.cellsMoved(b,l-d.x,k-d.y)}}}finally{c.getModel().endUpdate()}}});this.addAction("copySize",
 function(a){a=c.getSelectionCell();c.isEnabled()&&null!=a&&c.getModel().isVertex(a)&&(a=c.getCellGeometry(a),null!=a&&(b.copiedSize=new mxRectangle(a.x,a.y,a.width,a.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",function(a){if(c.isEnabled()&&!c.isSelectionEmpty()&&null!=b.copiedSize){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(a=0;a<e.length;a++)if(c.getModel().isVertex(e[a])){var k=c.getCellGeometry(e[a]);null!=k&&(k=k.clone(),k.width=b.copiedSize.width,k.height=
-b.copiedSize.height,c.getModel().setGeometry(e[a],k))}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells())}catch(t){b.handleError(t)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
+b.copiedSize.height,c.getModel().setGeometry(e[a],k))}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{c.setSelectionCells(c.duplicateCells())}catch(u){b.handleError(u)}},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),
 function(a){c.turnShapes(c.getSelectionCells(),null!=a?mxEvent.isShiftDown(a):!1)},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){c.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){c.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){c.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){c.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");
 this.addAction("lockUnlock",function(){if(!c.isSelectionEmpty()){c.getModel().beginUpdate();try{var a=c.isCellMovable(c.getSelectionCell())?1:0;c.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);c.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);c.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);c.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);c.toggleCellStyles(mxConstants.STYLE_EDITABLE,a);c.toggleCellStyles("connectable",a)}finally{c.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",
 function(){c.home()},null,null,"Home");this.addAction("exitGroup",function(){c.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){c.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){c.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){c.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){c.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",
@@ -2775,7 +2776,7 @@ b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addW
 d=Math.round(c.snap(c.popupMenuHandler.triggerY/d-k));b.addPointAt(b.state,f,d)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=c.getSelectionCells();if(null!=a){a=c.addAllEdges(a);c.getModel().beginUpdate();try{for(var b=0;b<a.length;b++){var e=a[b];if(c.getModel().isEdge(e)){var d=c.getCellGeometry(e);null!=d&&(d=d.clone(),d.points=null,c.getModel().setGeometry(e,
 d))}}}finally{c.getModel().endUpdate()}}},null,null,"Alt+Shift+C");m=this.addAction("subscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("indent",mxUtils.bind(this,function(){c.cellEditor.isContentEditing()&&document.execCommand("indent",
 !1,null)}),null,null,"Shift+Tab");this.addAction("image...",function(){if(c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",e=c.getView().getState(c.getSelectionCell()),k="";null!=e&&(k=e.style[mxConstants.STYLE_IMAGE]||k);var d=c.cellEditor.saveSelection();b.showImageDialog(a,k,function(a,b,e){if(c.cellEditor.isContentEditing())c.cellEditor.restoreSelection(d),c.insertImage(a,b,e);else{var f=c.getSelectionCells();if(null!=a&&(0<
-a.length||0<f.length)){var g=null;c.getModel().beginUpdate();try{if(0==f.length){var q=c.getFreeInsertPoint(),g=f=[c.insertVertex(c.getDefaultParent(),null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=c.view.getState(f[0]),u=null!=k?k.style:c.getCellStyle(f[0]);"image"!=u[mxConstants.STYLE_SHAPE]&&"label"!=u[mxConstants.STYLE_SHAPE]?
+a.length||0<f.length)){var g=null;c.getModel().beginUpdate();try{if(0==f.length){var q=c.getFreeInsertPoint(),g=f=[c.insertVertex(c.getDefaultParent(),null,"",q.x,q.y,b,e,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];c.fireEvent(new mxEventObject("cellsInserted","cells",g))}c.setCellStyles(mxConstants.STYLE_IMAGE,0<a.length?a:null,f);var k=c.view.getState(f[0]),y=null!=k?k.style:c.getCellStyle(f[0]);"image"!=y[mxConstants.STYLE_SHAPE]&&"label"!=y[mxConstants.STYLE_SHAPE]?
 c.setCellStyles(mxConstants.STYLE_SHAPE,"image",f):0==a.length&&c.setCellStyles(mxConstants.STYLE_SHAPE,null,f);if(1==c.getSelectionCount()&&null!=b&&null!=e){var m=f[0],z=c.getModel().getGeometry(m);null!=z&&(z=z.clone(),z.width=b,z.height=e,c.getModel().setGeometry(m,z))}}finally{c.getModel().endUpdate()}null!=g&&(c.setSelectionCells(g),c.scrollCellToVisible(g[0]))}}},c.cellEditor.isContentEditing(),!c.cellEditor.isContentEditing())}}).isEnabled=k;m=this.addAction("layers",mxUtils.bind(this,function(){null==
 this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,196),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers")),this.layersWindow.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("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return 0<b.formatWidth}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-
@@ -2787,24 +2788,24 @@ DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.a
 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.reportEnabled=!0;DrawioFile.prototype.ageStart=null;DrawioFile.prototype.getSize=function(){return null!=this.data?this.data.length:0};
 DrawioFile.prototype.synchronizeFile=function(a,b){this.savingFile?null!=b&&b({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(a,b):this.updateFile(a,b)};
 DrawioFile.prototype.updateFile=function(a,b,e,c){null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():this.getLatestVersion(mxUtils.bind(this,function(k){try{null!=e&&e()||(this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=b&&b():null!=k?this.mergeFile(k,a,b,c):this.reloadFile(a,b))}catch(m){null!=b&&b(m)}}),b))};
-DrawioFile.prototype.mergeFile=function(a,b,e,c){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var t=[this.ui.diffPages(null!=c?c:m,this.shadowPages)];if(!this.ignorePatches(t)){var v=this.ui.patchPages(m,
-t[0]);c={};var A=this.ui.getHashValueForPages(v,c),m={},d=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",t,"checksum",d==A,A);if(null!=A&&A!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(p)),g=this.compressReportData(this.getAnonymizedXmlForPages(v)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,t,"Shadow Details: "+JSON.stringify(c)+
-"\nChecksum: "+A+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(t,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(x){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
-null!=e&&e(x);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,x);else{var l=this.getCurrentUser(),B=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,x)}}catch(u){}}};
+DrawioFile.prototype.mergeFile=function(a,b,e,c){var k=!0;try{this.stats.fileMerged++;var m=null!=this.shadowPages?this.shadowPages:this.ui.getPagesForNode(mxUtils.parseXml(this.shadowData).documentElement),p=this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement);if(null!=p&&0<p.length){this.shadowPages=p;this.backupPatch=this.isModified()?this.ui.diffPages(m,this.ui.pages):null;var u=[this.ui.diffPages(null!=c?c:m,this.shadowPages)];if(!this.ignorePatches(u)){var x=this.ui.patchPages(m,
+u[0]);c={};var A=this.ui.getHashValueForPages(x,c),m={},d=this.ui.getHashValueForPages(this.shadowPages,m);"1"==urlParams.test&&EditorUi.debug("File.mergeFile",[this],"backup",this.backupPatch,"patches",u,"checksum",d==A,A);if(null!=A&&A!=d){var f=this.compressReportData(this.getAnonymizedXmlForPages(p)),g=this.compressReportData(this.getAnonymizedXmlForPages(x)),q=this.ui.hashValue(a.getCurrentEtag()),n=this.ui.hashValue(this.getCurrentEtag());this.checksumError(e,u,"Shadow Details: "+JSON.stringify(c)+
+"\nChecksum: "+A+"\nCurrent: "+d+"\nCurrent Details: "+JSON.stringify(m)+"\nFrom: "+q+"\nTo: "+n+"\n\nFile Data:\n"+f+"\nPatched Shadow:\n"+g,null,"mergeFile");return}this.patch(u,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw k=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(a.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=b&&b()}catch(v){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();
+null!=e&&e(v);try{if(k)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,v);else{var l=this.getCurrentUser(),B=null!=l?l.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),B,v)}}catch(y){}}};
 DrawioFile.prototype.getAnonymizedXmlForPages=function(a){var b=new mxCodec(mxUtils.createXmlDocument()),e=b.document.createElement("mxfile");if(null!=a)for(var c=0;c<a.length;c++){var k=b.encode(new mxGraphModel(a[c].root));"1"!=urlParams.dev&&(k=this.ui.anonymizeNode(k,!0));k.setAttribute("id",a[c].getId());a[c].viewState&&this.ui.editor.graph.saveViewState(a[c].viewState,k,!0);e.appendChild(k)}return mxUtils.getPrettyXml(e)};
 DrawioFile.prototype.compressReportData=function(a,b,e){b=null!=b?b:1E4;null!=e&&null!=a&&a.length>e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a};
 DrawioFile.prototype.checksumError=function(a,b,e,c,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a<b.length;a++)this.ui.anonymizePatch(b[a]);var m=mxUtils.bind(this,function(a){var c=this.compressReportData(JSON.stringify(b,null,2));a=null!=a?this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForNode(mxUtils.parseXml(a.data).documentElement)),
-25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==c?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==c?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),t=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
-try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+t+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(v){}}}catch(v){}};
-DrawioFile.prototype.sendErrorReport=function(a,b,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),t=null!=p?this.ui.hashValue(p.id):"unknown",v=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),d=A.lastIndexOf("."),p="xml";0<d&&(p=A.substring(d));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
-":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+t+v+"\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!=b?"\n\n"+b:"")+
+25E3):"n/a";this.sendErrorReport("Checksum Error in "+k+" "+this.getHash(),(null!=e?e:"")+"\n\nPatches:\n"+c+(null!=a?"\n\nRemote:\n"+a:""),null,7E4)});null==c?m(null):this.getLatestVersion(mxUtils.bind(this,function(a){null!=a&&a.getCurrentEtag()==c?m(a):m(null)}),function(){})}else{var p=this.getCurrentUser(),u=null!=p?p.id:"unknown";EditorUi.logError("Checksum Error in "+k+" "+this.getId(),null,this.getMode()+"."+this.getId(),"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync"));
+try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+this.getHash(),action:k,label:"user_"+u+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")})}catch(x){}}}catch(x){}};
+DrawioFile.prototype.sendErrorReport=function(a,b,e,c){try{var k=this.compressReportData(this.getAnonymizedXmlForPages(this.shadowPages),25E3),m=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",x=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",A=this.getTitle(),d=A.lastIndexOf("."),p="xml";0<d&&(p=A.substring(d));var f=null!=e?e.stack:Error().stack;EditorUi.sendReport(a+" "+(new Date).toISOString()+
+":\n\nBrowser="+navigator.userAgent+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+x+"\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!=b?"\n\n"+b:"")+
 (null!=e?"\n\nError: "+e.message:"")+"\n\nStack:\n"+f+"\n\nShadow:\n"+k+"\n\nData:\n"+m,c)}catch(g){}};
 DrawioFile.prototype.reloadFile=function(a,b){try{this.ui.spinner.stop();var e=mxUtils.bind(this,function(){this.stats.fileReloaded++;this.reportEnabled=!1;var b=this.ui.editor.graph.getViewState(),e=this.ui.editor.graph.getSelectionCells(),m=this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(m,b,e);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.stats=
 this.stats);null!=a&&a()}}),!0)});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}catch(c){null!=b&&b(c)}};DrawioFile.prototype.copyFile=function(a,b){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};
 DrawioFile.prototype.ignorePatches=function(a){for(var b=!0,e=0;e<a.length&&b;e++)b=b&&0==Object.keys(a[e]).length;return b};
-DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,c=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var t=m.foldingEnabled,v=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var d=
-0;d<a.length;d++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[d],!0,b,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{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=p;e.history=c;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)v!=
-m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(t!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
+DrawioFile.prototype.patch=function(a,b){var e=this.ui.editor.undoManager,c=e.history.slice(),k=e.indexOfNextAdd,m=this.ui.editor.graph;m.container.style.visibility="hidden";var p=this.changeListenerEnabled;this.changeListenerEnabled=!1;var u=m.foldingEnabled,x=m.mathEnabled,A=m.cellRenderer.redraw;m.cellRenderer.redraw=function(a){a.view.graph.isEditing(a.cell)&&(a.view.graph.scrollCellToVisible(a.cell),a.view.graph.cellEditor.resize());A.apply(this,arguments)};m.model.beginUpdate();try{for(var d=
+0;d<a.length;d++)this.ui.pages=this.ui.patchPages(this.ui.pages,a[d],!0,b,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{m.container.style.visibility="";m.model.endUpdate();m.cellRenderer.redraw=A;this.changeListenerEnabled=p;e.history=c;e.indexOfNextAdd=k;e.fireEvent(new mxEventObject(mxEvent.CLEAR));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)x!=
+m.mathEnabled?(this.ui.editor.updateGraphComponents(),m.refresh()):(u!=m.foldingEnabled?m.view.revalidate():m.view.validate(),m.sizeDidChange());this.ui.updateTabContainer()}};
 DrawioFile.prototype.save=function(a,b,e,c,k,m){try{if(this.isEditable())if(!k&&this.invalidChecksum)if(null!=e)e({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=b&&b();else if(null!=e)e({message:mxResources.get("readOnly")});else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=e)e(p);else throw p;}};
 DrawioFile.prototype.updateFileData=function(a){this.setData(this.ui.getFileData(null,null,null,null,null,null,null,null,this,null!=a?!a:!this.isCompressed()))};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var a=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=a?"false"!=a:this.isCompressedStorage()&&Editor.compressXml};
 DrawioFile.prototype.decompress=function(){this.updateFileData(!1);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","false");this.fileChanged()};DrawioFile.prototype.compress=function(){this.updateFileData(!0);null!=this.ui.fileNode&&this.ui.fileNode.setAttribute("compressed","true");this.fileChanged()};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};
@@ -2841,7 +2842,7 @@ this.synchronizeFile(e,c)}),this.getErrorMessage(a))};DrawioFile.prototype.getEr
 DrawioFile.prototype.fileChanged=function(){this.lastChanged=new Date;this.setModified(!0);this.isAutosave()?(this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){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(a){this.handleFileError(a)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus())};
 DrawioFile.prototype.fileSaved=function(a,b,e,c){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++,this.invalidChecksum=this.inConflictState=!1,null==this.sync?(this.shadowData=a,this.shadowPages=null,null!=e&&e()):this.sync.fileSaved(this.ui.getPagesForNode(mxUtils.parseXml(a).documentElement),b,e,c,a)}catch(p){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=c&&c(p);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,p);else{var k=
-this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(t){}}};
+this.getCurrentUser(),m=null!=k?k.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),m,p)}}catch(u){}}};
 DrawioFile.prototype.autosave=function(a,b,e,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());a=Date.now()-this.lastAutosave<b?a:0;this.clearAutosave();var k=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==k&&(this.autosaveThread=null);if(this.isModified()&&this.isAutosaveNow()){var a=this.isAutosaveRevision();a&&(this.lastAutosaveRevision=(new Date).getTime());this.save(a,mxUtils.bind(this,function(a){this.autosaveCompleted();null!=e&&e(a)}),mxUtils.bind(this,
 function(a){null!=c&&c(a)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=e&&e(null)}),a);this.autosaveThread=k};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 a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
@@ -2880,7 +2881,7 @@ Editor.fastCompress=function(a){return null==a||0==a.length||"undefined"===typeo
 (c=f[0].getAttribute("data-mxgraph"),null!=c?(f=JSON.parse(c),null!=f&&null!=f.xml&&(a=mxUtils.parseXml(f.xml),a=a.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(c=mxUtils.getTextContent(f[0]),c=Graph.decompress(c,null,b),0<c.length&&(a=mxUtils.parseXml(c),a=a.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),
 null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||d||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(f=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=f&&(a=Editor.parseDiagramNode(f,b)));null==a||"mxGraphModel"==a.nodeName||d&&"mxfile"==a.nodeName||(a=null);return a};Editor.parseDiagramNode=function(a,d){var b=mxUtils.trim(mxUtils.getTextContent(a)),c=null;
 0<b.length?(b=Graph.decompress(b,null,d),null!=b&&0<b.length&&(c=mxUtils.parseXml(b).documentElement)):(b=mxUtils.getChildNodes(a),0<b.length&&(c=mxUtils.createXmlDocument(),c.appendChild(c.importNode(b[0],!0)),c=c.documentElement));return c};Editor.getDiagramNodeXml=function(a){var d=mxUtils.getTextContent(a),b=null;0<d.length?b=Graph.decompress(d):null!=a.firstChild&&(b=mxUtils.getXml(a.firstChild));return b};Editor.extractGraphModelFromPdf=function(a){a=a.substring(a.indexOf(",")+1);a=window.atob&&
-!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var n=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(n>f){d=a.substring(f,n);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(e));null!=d&&
+!mxClient.IS_SF?atob(a):Base64.decode(a,!0);for(var d=null,b="",c=0,f=0,e=[],g=null;f<a.length;){var l=a.charCodeAt(f),f=f+1;10!=l&&(b+=String.fromCharCode(l));l=="/Subject (%3Cmxfile".charCodeAt(c)?c++:c=0;if(19==c){var t=a.indexOf("%3C%2Fmxfile%3E)",f)+15,f=f-9;if(t>f){d=a.substring(f,t);break}}10==l&&("endobj"==b?g=null:"obj"==b.substring(b.length-3,b.length)||"xref"==b||"trailer"==b?(g=[],e[b.split(" ")[0]]=g):null!=g&&g.push(b),b="")}null==d&&(d=Editor.extractGraphModelFromXref(e));null!=d&&
 (d=decodeURIComponent(d.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return d};Editor.extractGraphModelFromXref=function(a){var d=a.trailer,b=null;null!=d&&(d=/.* \/Info (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(d=a[d[1]],null!=d&&(d=/.* \/Subject (\d+) (\d+) R/g.exec(d.join("\n")),null!=d&&0<d.length&&(a=a[d[1]],null!=a&&(a=a.join("\n"),b=a.substring(1,a.length-1))))));return b};Editor.extractGraphModelFromPng=function(a){var d=null;try{var b=a.substring(a.indexOf(",")+1),c=window.atob&&
 !mxClient.IS_SF?atob(b):Base64.decode(b,!0);EditorUi.parsePng(c,mxUtils.bind(this,function(a,b,f){a=c.substring(a+8,a+8+f);"zTXt"==b?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=pako.inflateRaw(a.substring(f+2),{to:"string"}).replace(/\+/g," "),null!=a&&0<a.length&&(d=a))):"tEXt"==b&&(a=a.split(String.fromCharCode(0)),1<a.length&&("mxGraphModel"==a[0]||"mxfile"==a[0])&&(d=a[1]));if(null!=d||"IDAT"==b)return!0}))}catch(N){}null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));
 null!=d&&"%"==d.charAt(0)&&(d=decodeURIComponent(d));return d};Editor.extractParserError=function(a,d){var b=null,c=null!=a?a.getElementsByTagName("parsererror"):null;null!=c&&0<c.length&&(b=d||mxResources.get("invalidChars"),c=c[0].getElementsByTagName("div"),0<c.length&&(b=mxUtils.getTextContent(c[0])));return null!=b?mxUtils.trim(b):b};Editor.configure=function(a,d){if(null!=a){Editor.config=a;Editor.configVersion=a.version;Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;
@@ -2915,14 +2916,14 @@ function(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"
 q))));mxUtils.bind(this,function(a){if(null==f[a]){f[a]=a;c++;var d="application/x-font-ttf";if("svg"==n||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==n||"embedded-opentype"==n||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==n||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==n||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==n||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==n||/(\.sfnt)($|\?)/i.test(a))d=
 "application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&!this.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){f[a]=d;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(b[g].substring(0,l)),n)}}else a()};Editor.prototype.addMathCss=function(a){a=a.getElementsByTagName("defs");if(null!=a&&0<a.length)for(var d=document.getElementsByTagName("style"),b=0;b<d.length;b++)0<mxUtils.getTextContent(d[b]).indexOf("MathJax")&&
 a[0].appendChild(d[b].cloneNode(!0))};Editor.prototype.addFontCss=function(a,d){d=null!=d?d:this.fontCss;if(null!=d){var b=a.getElementsByTagName("defs"),c=a.ownerDocument;0==b.length?(b=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=a.firstChild?a.insertBefore(b,a.firstChild):a.appendChild(b)):b=b[0];c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"style"):c.createElement("style");c.setAttribute("type","text/css");mxUtils.setTextContent(c,
-d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,d,b,c,f,e,g,l,n,q,k,u,x,z){e=null!=e?e:!0;u=null!=u?u:this.graph;x=null!=x?x:0;var y=n?null:u.background;y==mxConstants.NONE&&(y=null);null==y&&(y=c);null==y&&0==n&&(y=this.graph.defaultPageBackgroundColor);this.convertImages(u.getSvg(y,
-null,null,z,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=d&&(l=e?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);n=Math.ceil(l*n)+2*x;q=Math.ceil(l*q)+2*x;g.setAttribute("width",n);g.setAttribute("height",q);var k=g.getContext("2d");null!=y&&(k.beginPath(),k.rect(0,0,n,q),k.fillStyle=y,k.fill());
-k.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(c,x/l,x/l);a(g)},0):(k.drawImage(c,x/l,x/l),a(g))}catch(ca){null!=f&&f(ca)}});c.onerror=function(a){null!=f&&f(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}u.mathEnabled&&this.addMathCss(b);c.src=this.createSvgDataUri(mxUtils.getXml(b))});
+d);b.appendChild(c)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport&&(!this.graph.mathEnabled||!mxClient.IS_SF&&!((mxClient.IS_GC||mxClient.IS_EDGE)&&!mxClient.IS_MAC))};Editor.prototype.exportToCanvas=function(a,d,b,c,f,e,g,l,n,q,k,y,v,z){e=null!=e?e:!0;y=null!=y?y:this.graph;v=null!=v?v:0;var t=n?null:y.background;t==mxConstants.NONE&&(t=null);null==t&&(t=c);null==t&&0==n&&(t=this.graph.defaultPageBackgroundColor);this.convertImages(y.getSvg(t,
+null,null,z,null,null!=g?g:!0,null,null,null,q),mxUtils.bind(this,function(b){var c=new Image;c.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),n=parseInt(b.getAttribute("width")),q=parseInt(b.getAttribute("height"));l=null!=l?l:1;null!=d&&(l=e?Math.min(1,Math.min(3*d/(4*q),d/n)):d/n);n=Math.ceil(l*n)+2*v;q=Math.ceil(l*q)+2*v;g.setAttribute("width",n);g.setAttribute("height",q);var k=g.getContext("2d");null!=t&&(k.beginPath(),k.rect(0,0,n,q),k.fillStyle=t,k.fill());
+k.scale(l,l);mxClient.IS_SF?window.setTimeout(function(){k.drawImage(c,v/l,v/l);a(g)},0):(k.drawImage(c,v/l,v/l),a(g))}catch(ca){null!=f&&f(ca)}});c.onerror=function(a){null!=f&&f(a)};try{q&&this.graph.addSvgShadow(b);var g=mxUtils.bind(this,function(){if(null!=this.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.resolvedFontCss;b.getElementsByTagName("defs")[0].appendChild(a)}y.mathEnabled&&this.addMathCss(b);c.src=this.createSvgDataUri(mxUtils.getXml(b))});
 this.loadFonts(g)}catch(W){null!=f&&f(W)}}),b,k)};Editor.prototype.writeGraphModelToPng=function(a,d,b,c,f){function e(a,d){var b=n;n+=d;return a.substring(b,n)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function l(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,
 10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,n);do{var q=g(a);if("IDAT"==e(a,4)){f=a.substring(0,n-8);b=b+String.fromCharCode(0)+("zTXt"==d?String.fromCharCode(0):"")+c;c=4294967295;c=EditorUi.prototype.updateCRC(c,d,0,4);c=EditorUi.prototype.updateCRC(c,b,0,b.length);f+=l(b.length)+d+b+l(c^4294967295);f+=a.substring(n-8,a.length);break}f+=a.substring(n-8,n-4+q);e(a,q);e(a,4)}while(q);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};
 if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426";var k=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,d){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var m=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){m.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=
-function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var t=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?t.apply(this,arguments):
-this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var v=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=v.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),
+function(a,d){var b=null;null!=a.editor.graph.getModel().getParent(d)?b=d.getId():null!=a.currentPage&&(b=a.currentPage.getId());return b});if(null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var u=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?u.apply(this,arguments):
+this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var a=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=a&&a.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(a){return!1};var x=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=x.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var d=this.editorUi,b=d.editor.graph,c=this.createOption(mxResources.get("shadow"),
 function(){return b.shadowVisible},function(a){var c=new ChangePageSetup(d);c.ignoreColor=!0;c.ignoreImage=!0;c.shadowVisible=a;b.model.execute(c)},{install:function(a){this.listener=function(){a(b.shadowVisible)};d.addListener("shadowVisibleChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});Editor.shadowOptionEnabled||(c.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(c,60));a.appendChild(c)}return a};var A=DiagramFormatPanel.prototype.addOptions;
 DiagramFormatPanel.prototype.addOptions=function(a){a=A.apply(this,arguments);var d=this.editorUi,b=d.editor.graph;if(b.isEnabled()){var c=d.getCurrentFile();if(null!=c&&c.isAutosaveOptional()){var f=this.createOption(mxResources.get("autosave"),function(){return d.editor.autosave},function(a){d.editor.setAutosave(a);d.editor.autosave&&c.isModified()&&c.fileChanged()},{install:function(a){this.listener=function(){a(d.editor.autosave)};d.editor.addListener("autosaveChanged",this.listener)},destroy:function(){d.editor.removeListener(this.listener)}});
 a.appendChild(f)}}if(this.isMathOptionVisible()&&b.isEnabled()&&"undefined"!==typeof MathJax){f=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return b.mathEnabled},function(a){d.actions.get("mathematicalTypesetting").funct()},{install:function(a){this.listener=function(){a(b.mathEnabled)};d.addListener("mathEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});f.style.paddingTop="5px";a.appendChild(f);var e=d.menus.createHelpLink("https://desk.draw.io/support/solutions/articles/16000032875");
@@ -2951,21 +2952,21 @@ null;StyleFormatPanel.prototype.findCommonProperties=function(a,d,b){if(null!=d)
 Editor.commonVertexProperties):Array.prototype.push.apply(f.shape.customProperties,Editor.commonEdgeProperties)),c(f.shape.customProperties));a=a.getAttribute("customProperties");if(null!=a)try{c(JSON.parse(a))}catch(D){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var a=this.format.createSelectionState();"image"==a.style.shape||a.containsLabel||this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var b=
 {},c=a.vertices,f=a.edges,e=0;e<c.length;e++)this.findCommonProperties(c[e],b,0==e);for(e=0;e<f.length;e++)this.findCommonProperties(f[e],b,0==c.length&&0==e);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(b).length&&this.container.appendChild(this.addProperties(this.createPanel(),b,a))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var d=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));
 d.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";d.style.marginRight="2px";a.appendChild(d);d=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));d.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");d.style.marginBottom="2px";d.style.width="100px";a.appendChild(d);
-mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){u.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));d=g.join(",");null!=b.countProperty&&
-(u.setCellStyles(b.countProperty,g.length,u.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}u.setCellStyles(a,d,u.getSelectionCells());f.push(a);e.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>d)q=q.slice(0,d);else for(var x=q.length;x<d;x++)q.push(n);q=q.join(",");u.setCellStyles(b.dependentProps[a],q,u.getSelectionCells());f.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(u,
-d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",u.getSelectionCells()))}finally{u.getModel().endUpdate()}}function f(d,b,c){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function e(a,d,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";
-f.style.border="1px solid black";f.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(e){this.editorUi.pickColor(d,function(d){f.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,d,b,f,e,g,l){null!=d&&(d=d.split(","),x.push({name:a,values:d,type:b,defVal:f,countProperty:e,
-parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=g,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,k++;else break;var u={type:b,parentRow:g,index:k,isDeletable:!0,defVal:f,countProperty:e},k=q(a,"",u,0==k%2,l);c(a,f,u);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,d,b,c,f,e,g){if(0<f){var l=Array(f);
-d=null!=d?d.split(","):[];for(var n=0;n<f;n++)l[n]=null!=d[n]?d[n]:null!=c?c:"";x.push({name:a,values:l,type:b,defVal:c,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,d,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==d;mxEvent.addListener(f,"change",function(){c(a,f.checked?"1":"0",b)});return f}function q(d,b,q,u,x){var z=q.dispName,y=q.type,B=document.createElement("tr");B.className="gePropRow"+(x?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";
-B.setAttribute("data-pName",d);B.setAttribute("data-pValue",b);u=!1;null!=q.index&&(B.setAttribute("data-index",q.index),z=(null!=z?z:"")+"["+q.index+"]",u=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));u&&(m.style.textAlign="right");B.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==y)m.appendChild(e(d,b,q));else if("bool"==y||"boolean"==y)m.appendChild(n(d,b,q));else if("enum"==y){var E=
-q.enumList;for(x=0;x<E.length;x++)if(z=E[x],z.val==b){m.innerHTML=mxUtils.htmlEntities(mxResources.get(z.dispName,null,z.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(k,function(){var e=document.createElement("select");f(m,e);for(var g=0;g<E.length;g++){var l=E[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",
-function(){var a=mxUtils.htmlEntities(e.value);c(d,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==y?m.appendChild(g(d,b,q.subType,q.subDefVal,q.countProperty,B,x)):"staticArr"==y?m.appendChild(l(d,b,q.subType,q.subDefVal,q.size,B,x)):(m.innerHTML=b,mxEvent.addListener(m,"click",mxUtils.bind(k,function(){function e(){var a=g.value,a=0==a.length&&"string"!=y?0:a;q.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",y="string"):(a=parseFloat(a),
-a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");c(d,a,q)}var g=document.createElement("input");f(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=y&&"float"!=y||q.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
-function(){e()})})));q.isDeletable&&(x=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",q,q.index);mxEvent.consume(a)})),x.style.height="16px",x.style.width="25px",x.style["float"]="right",x.className="geColorBtn",m.appendChild(x));B.appendChild(m);return B}var k=this,u=this.editorUi.editor.graph,x=[];a.style.position="relative";a.style.padding="0";var y=document.createElement("table");y.style.whiteSpace="nowrap";y.style.width="100%";var z=document.createElement("tr");z.className="gePropHeader";
-var B=document.createElement("th");B.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;B.appendChild(m);mxUtils.write(B,mxResources.get("property"));z.style.cursor="pointer";var p=function(){var d=y.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(ma){}}else m.src=
-Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(z,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;p()});z.appendChild(B);B=document.createElement("th");B.className="gePropHeaderCell";B.innerHTML=mxResources.get("value");z.appendChild(B);y.appendChild(z);var C=!1,F=!1,t;for(t in d)if(z=d[t],"function"!=typeof z.isVisible||z.isVisible(b,this)){var H=null!=b.style[t]?mxUtils.htmlEntities(b.style[t]+""):null!=z.getDefaultValue?
-z.getDefaultValue(b,this):z.defVal;if("separator"==z.type)F=!F;else{if("staticArr"==z.type)z.size=parseInt(b.style[z.sizeProperty]||d[z.sizeProperty].defVal)||0;else if(null!=z.dependentProps){for(var I=z.dependentProps,v=[],M=[],B=0;B<I.length;B++){var A=b.style[I[B]];M.push(d[I[B]].subDefVal);v.push(null!=A?A.split(","):[])}z.dependentPropsDefVal=M;z.dependentPropsVals=v}y.appendChild(q(t,H,z,C,F));C=!C}}for(B=0;B<x.length;B++)for(z=x[B],d=z.parentRow,b=0;b<z.values.length;b++)t=q(z.name,z.values[b],
-{type:z.type,parentRow:z.parentRow,isDeletable:z.isDeletable,index:b,defVal:z.defVal,countProperty:z.countProperty,size:z.size},0==b%2,z.flipBkg),d.parentNode.insertBefore(t,d.nextSibling),d=t;a.appendChild(y);p();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
+mxUtils.br(a);return f.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(a,d,b){function c(a,d,b,c){t.getModel().beginUpdate();try{var f=[],e=[];if(null!=b.index){for(var g=[],l=b.parentRow.nextSibling;l&&l.getAttribute("data-pName")==a;)g.push(l.getAttribute("data-pValue")),l=l.nextSibling;b.index<g.length?null!=c?g.splice(c,1):g[b.index]=d:g.push(d);null!=b.size&&g.length>b.size&&(g=g.slice(0,b.size));d=g.join(",");null!=b.countProperty&&
+(t.setCellStyles(b.countProperty,g.length,t.getSelectionCells()),f.push(b.countProperty),e.push(g.length))}t.setCellStyles(a,d,t.getSelectionCells());f.push(a);e.push(d);if(null!=b.dependentProps)for(a=0;a<b.dependentProps.length;a++){var n=b.dependentPropsDefVal[a],q=b.dependentPropsVals[a];if(q.length>d)q=q.slice(0,d);else for(var y=q.length;y<d;y++)q.push(n);q=q.join(",");t.setCellStyles(b.dependentProps[a],q,t.getSelectionCells());f.push(b.dependentProps[a]);e.push(q)}if("function"==typeof b.onChange)b.onChange(t,
+d);k.editorUi.fireEvent(new mxEventObject("styleChanged","keys",f,"values",e,"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}function f(d,b,c){var f=mxUtils.getOffset(a,!0),e=mxUtils.getOffset(d,!0);b.style.position="absolute";b.style.left=e.x-f.x+"px";b.style.top=e.y-f.y+"px";b.style.width=d.offsetWidth+"px";b.style.height=d.offsetHeight-(c?4:0)+"px";b.style.zIndex=5}function e(a,d,b){var f=document.createElement("div");f.style.width="32px";f.style.height="4px";f.style.margin="2px";
+f.style.border="1px solid black";f.style.background=d&&"none"!=d?d:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(k,function(e){this.editorUi.pickColor(d,function(d){f.style.background="none"==d?"url('"+Dialog.prototype.noColorImage+"')":d;c(a,d,b)});mxEvent.consume(e)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(f);return btn}function g(a,d,b,f,e,g,l){null!=d&&(d=d.split(","),y.push({name:a,values:d,type:b,defVal:f,countProperty:e,
+parentRow:g,isDeletable:!0,flipBkg:l}));btn=mxUtils.button("+",mxUtils.bind(k,function(d){for(var n=g,k=0;null!=n.nextSibling;)if(n.nextSibling.getAttribute("data-pName")==a)n=n.nextSibling,k++;else break;var t={type:b,parentRow:g,index:k,isDeletable:!0,defVal:f,countProperty:e},k=q(a,"",t,0==k%2,l);c(a,f,t);n.parentNode.insertBefore(k,n.nextSibling);mxEvent.consume(d)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function l(a,d,b,c,f,e,g){if(0<f){var l=Array(f);
+d=null!=d?d.split(","):[];for(var n=0;n<f;n++)l[n]=null!=d[n]?d[n]:null!=c?c:"";y.push({name:a,values:l,type:b,defVal:c,parentRow:e,flipBkg:g,size:f})}return document.createElement("div")}function n(a,d,b){var f=document.createElement("input");f.type="checkbox";f.checked="1"==d;mxEvent.addListener(f,"change",function(){c(a,f.checked?"1":"0",b)});return f}function q(d,b,q,t,y){var v=q.dispName,z=q.type,B=document.createElement("tr");B.className="gePropRow"+(y?"Dark":"")+(t?"Alt":"")+" gePropNonHeaderRow";
+B.setAttribute("data-pName",d);B.setAttribute("data-pValue",b);t=!1;null!=q.index&&(B.setAttribute("data-index",q.index),v=(null!=v?v:"")+"["+q.index+"]",t=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(v,null,v));t&&(m.style.textAlign="right");B.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==z)m.appendChild(e(d,b,q));else if("bool"==z||"boolean"==z)m.appendChild(n(d,b,q));else if("enum"==z){var E=
+q.enumList;for(y=0;y<E.length;y++)if(v=E[y],v.val==b){m.innerHTML=mxUtils.htmlEntities(mxResources.get(v.dispName,null,v.dispName));break}mxEvent.addListener(m,"click",mxUtils.bind(k,function(){var e=document.createElement("select");f(m,e);for(var g=0;g<E.length;g++){var l=E[g],n=document.createElement("option");n.value=mxUtils.htmlEntities(l.val);n.innerHTML=mxUtils.htmlEntities(mxResources.get(l.dispName,null,l.dispName));e.appendChild(n)}e.value=b;a.appendChild(e);mxEvent.addListener(e,"change",
+function(){var a=mxUtils.htmlEntities(e.value);c(d,a,q)});e.focus();mxEvent.addListener(e,"blur",function(){a.removeChild(e)})}))}else"dynamicArr"==z?m.appendChild(g(d,b,q.subType,q.subDefVal,q.countProperty,B,y)):"staticArr"==z?m.appendChild(l(d,b,q.subType,q.subDefVal,q.size,B,y)):(m.innerHTML=b,mxEvent.addListener(m,"click",mxUtils.bind(k,function(){function e(){var a=g.value,a=0==a.length&&"string"!=z?0:a;q.allowAuto&&(null!=a.trim&&"auto"==a.trim().toLowerCase()?(a="auto",z="string"):(a=parseFloat(a),
+a=isNaN(a)?0:a));null!=q.min&&a<q.min?a=q.min:null!=q.max&&a>q.max&&(a=q.max);a=mxUtils.htmlEntities(("int"==z?parseInt(a):a)+"");c(d,a,q)}var g=document.createElement("input");f(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=z&&"float"!=z||q.allowAuto||(g.type="number",g.step="int"==z?"1":"any",null!=q.min&&(g.min=parseFloat(q.min)),null!=q.max&&(g.max=parseFloat(q.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",
+function(){e()})})));q.isDeletable&&(y=mxUtils.button("-",mxUtils.bind(k,function(a){c(d,"",q,q.index);mxEvent.consume(a)})),y.style.height="16px",y.style.width="25px",y.style["float"]="right",y.className="geColorBtn",m.appendChild(y));B.appendChild(m);return B}var k=this,t=this.editorUi.editor.graph,y=[];a.style.position="relative";a.style.padding="0";var v=document.createElement("table");v.style.whiteSpace="nowrap";v.style.width="100%";var z=document.createElement("tr");z.className="gePropHeader";
+var B=document.createElement("th");B.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;B.appendChild(m);mxUtils.write(B,mxResources.get("property"));z.style.cursor="pointer";var C=function(){var d=v.querySelectorAll(".gePropNonHeaderRow"),b;if(k.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage;b="none";for(var c=a.childNodes.length-1;0<=c;c--)try{var f=a.childNodes[c],e=f.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(f)}catch(ma){}}else m.src=
+Sidebar.prototype.expandedImage,b="";for(c=0;c<d.length;c++)d[c].style.display=b};mxEvent.addListener(z,"click",function(){k.editorUi.propertiesCollapsed=!k.editorUi.propertiesCollapsed;C()});z.appendChild(B);B=document.createElement("th");B.className="gePropHeaderCell";B.innerHTML=mxResources.get("value");z.appendChild(B);v.appendChild(z);var p=!1,F=!1,u;for(u in d)if(z=d[u],"function"!=typeof z.isVisible||z.isVisible(b,this)){var H=null!=b.style[u]?mxUtils.htmlEntities(b.style[u]+""):null!=z.getDefaultValue?
+z.getDefaultValue(b,this):z.defVal;if("separator"==z.type)F=!F;else{if("staticArr"==z.type)z.size=parseInt(b.style[z.sizeProperty]||d[z.sizeProperty].defVal)||0;else if(null!=z.dependentProps){for(var I=z.dependentProps,x=[],M=[],B=0;B<I.length;B++){var A=b.style[I[B]];M.push(d[I[B]].subDefVal);x.push(null!=A?A.split(","):[])}z.dependentPropsDefVal=M;z.dependentPropsVals=x}v.appendChild(q(u,H,z,p,F));p=!p}}for(B=0;B<y.length;B++)for(z=y[B],d=z.parentRow,b=0;b<z.values.length;b++)u=q(z.name,z.values[b],
+{type:z.type,parentRow:z.parentRow,isDeletable:z.isDeletable,index:b,defVal:z.defVal,countProperty:z.countProperty,size:z.size},0==b%2,z.flipBkg),d.parentNode.insertBefore(u,d.nextSibling),d=u;a.appendChild(v);C();return a};StyleFormatPanel.prototype.addStyles=function(a){function d(a){function d(a){var d=mxUtils.button("",function(d){c.getModel().beginUpdate();try{var b=c.getSelectionCells();for(d=0;d<b.length;d++){for(var f=c.getModel().getStyle(b[d]),g=0;g<e.length;g++)f=mxUtils.removeStylename(f,
 e[g]);var l=c.getModel().isVertex(b[d])?c.defaultVertexStyle:c.defaultEdgeStyle;null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient||mxUtils.getValue(l,mxConstants.STYLE_GRADIENTCOLOR,null)),f=""==a.fill?mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill||mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,null)),f=""==a.stroke?mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,
 a.stroke||mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,a.font||mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null)))):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FILLCOLOR,"#ffffff")),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(l,mxConstants.STYLE_STROKECOLOR,"#000000")),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(l,
 mxConstants.STYLE_GRADIENTCOLOR,null)),c.getModel().isVertex(b[d])&&(f=mxUtils.setStyle(f,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(l,mxConstants.STYLE_FONTCOLOR,null))));c.getModel().setStyle(b[d],f)}}finally{c.getModel().endUpdate()}});d.className="geStyleButton";d.style.width="36px";d.style.height="30px";d.style.margin="0px 6px 6px 0px";if(null!=a)null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?d.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+
@@ -2984,12 +2985,12 @@ this.layoutManager.getLayout=function(a){var d=this.graph.getCellStyle(a);if(nul
 d.childLayout)return b=new mxTableLayout(this.graph),b.rows=d.tableRows||2,b.columns=d.tableColumns||2,b.colPercentages=d.colPercentages,b.rowPercentages=d.rowPercentages,b.equalColumns="1"==mxUtils.getValue(d,"equalColumns",b.colPercentages?"0":"1"),b.equalRows="1"==mxUtils.getValue(d,"equalRows",b.rowPercentages?"0":"1"),b.resizeParent="1"==mxUtils.getValue(d,"resizeParent","1"),b.border=d.tableBorder||b.border,b.marginLeft=d.marginLeft||0,b.marginRight=d.marginRight||0,b.marginTop=d.marginTop||
 0,b.marginBottom=d.marginBottom||0,b.autoAddCol="1"==mxUtils.getValue(d,"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(d,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=d.colWidths||"100",b.rowHeights=d.rowHeights||"50",b}return c.apply(this,arguments)};this.updateGlobalUrlVariables()};var q=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return q.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 a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var d in a)this.globalVars[d]=a[d]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var n=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var d=
-n.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var l=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,n,q,k,u){var x=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
-(x=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var z=l.apply(this,arguments);if(u&&null!=this.extFonts&&0<this.extFonts.length){var y=z.ownerDocument,B=null!=y.createElementNS?y.createElementNS(mxConstants.NS_SVG,"style"):y.createElement("style");null!=y.setAttributeNS?B.setAttributeNS("type","text/css"):B.setAttribute("type","text/css");for(var m="",p="",E=0;E<this.extFonts.length;E++){var C=this.extFonts[E].name,F=this.extFonts[E].url;0==F.indexOf(Editor.GOOGLE_FONTS)?
-m+="@import url("+F+");\n":p+='@font-face {\nfont-family: "'+C+'";\nsrc: url("'+F+'");\n}\n'}B.appendChild(y.createTextNode(m+p));z.getElementsByTagName("defs")[0].appendChild(B)}null!=x&&(this.stylesheet=x,this.refresh());return z};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=B.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
-(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var x=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
-function(){x.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
-this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
+n.apply(this,arguments);null==d&&null!=this.globalVars&&(d=this.globalVars[a]);return d};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var l=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,d,b,c,f,e,g,n,q,k,y){var t=null;null!=this.themes&&"darkTheme"==this.defaultThemeName&&
+(t=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var v=l.apply(this,arguments);if(y&&null!=this.extFonts&&0<this.extFonts.length){var z=v.ownerDocument,B=null!=z.createElementNS?z.createElementNS(mxConstants.NS_SVG,"style"):z.createElement("style");null!=z.setAttributeNS?B.setAttributeNS("type","text/css"):B.setAttribute("type","text/css");for(var m="",C="",E=0;E<this.extFonts.length;E++){var p=this.extFonts[E].name,F=this.extFonts[E].url;0==F.indexOf(Editor.GOOGLE_FONTS)?
+m+="@import url("+F+");\n":C+='@font-face {\nfont-family: "'+p+'";\nsrc: url("'+F+'");\n}\n'}B.appendChild(z.createTextNode(m+C));v.getElementsByTagName("defs")[0].appendChild(B)}null!=t&&(this.stylesheet=t,this.refresh());return v};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=B.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var d=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&
+(mxUtils.isNode(a.text.value)||a.text.dialect==mxConstants.DIALECT_STRICTHTML)){var c=a.text.getContentNode();if(null!=c){c=c.cloneNode(!0);if(c.getElementsByTagNameNS)for(var f=c.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<f.length;)f[0].parentNode.removeChild(f[0]);null!=c.innerHTML&&(f=a.text.value,a.text.value=c.innerHTML,d.apply(this,arguments),a.text.value=f)}}else d.apply(this,arguments)}}return a};var v=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=
+function(){v.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&
+this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var y=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){y.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==
 a.substring(0,17)&&(a=JSON.parse(a.substring(17)),null!=a.actions)){for(var d=0;d<a.actions.length;d++){var b=a.actions[d];if(null!=b.open)if(this.isCustomLink(b.open)){if(!this.customLinkClicked(b.open))return}else this.openLink(b.open)}this.model.beginUpdate();try{for(d=0;d<a.actions.length;d++)b=a.actions[d],null!=b.toggle&&this.toggleCells(this.getCellsForAction(b.toggle,!0)),null!=b.show&&this.setCellsVisible(this.getCellsForAction(b.show,!0),!0),null!=b.hide&&this.setCellsVisible(this.getCellsForAction(b.hide,
 !0),!1)}finally{this.model.endUpdate()}for(d=0;d<a.actions.length;d++){var b=a.actions[d],c=[];null!=b.select&&this.isEnabled()&&(c=this.getCellsForAction(b.select),this.setSelectionCells(c));null!=b.highlight&&(c=this.getCellsForAction(b.highlight),this.highlightCells(c,b.highlight.color,b.highlight.duration,b.highlight.opacity));null!=b.scroll&&(c=this.getCellsForAction(b.scroll));0<c.length&&this.scrollCellToVisible(c[0])}}};Graph.prototype.updateCustomLinksForCell=function(a,d){var b=this.getLinkForCell(d);
 null!=b&&"data:action/json,"==b.substring(0,17)&&this.setLinkForCell(d,this.updateCustomLink(a,b));if(this.isHtmlLabel(d)){var c=document.createElement("div");c.innerHTML=this.getLabel(d);for(var f=c.getElementsByTagName("a"),e=!1,g=0;g<f.length;g++)b=f[g].getAttribute("href"),null!=b&&"data:action/json,"==b.substring(0,17)&&(f[g].setAttribute("href",this.updateCustomLink(a,b)),e=!0);e&&this.labelChanged(d,c.innerHTML)}};Graph.prototype.updateCustomLink=function(a,d){if("data:action/json,"==d.substring(0,
@@ -3013,35 +3014,35 @@ STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mo
 "/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=
 [SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=
 [SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(a){var d=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?d="mxgraph.er":"sysML"==a.substring(0,5)&&(d="mxgraph.sysml"));return d};var H=mxMarker.createMarker;mxMarker.createMarker=
-function(a,d,b,c,f,e,g,l,n,q){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return H.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(l,Math.max(parseInt(z.value),parseInt(x.value))));x.value=Math.max(1,Math.min(l,Math.min(parseInt(z.value),parseInt(x.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,q=d.view.translate,k=
-d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var u=d.getGraphBounds(),x=0,z=0,B=pa.get(),m=1/d.pageScale,C=p.checked;if(C)var m=parseInt(R.value),F=parseInt(da.value),m=Math.min(B.height*F/(u.height/d.view.scale),B.width*m/(u.width/d.view.scale));else m=parseInt(y.value)/(100*d.pageScale),isNaN(m)&&(c=1/d.pageScale,y.value="100 %");B=mxRectangle.fromRectangle(B);B.width=Math.ceil(B.width*
-c);B.height=Math.ceil(B.height*c);m*=c;!C&&d.pageVisible?(u=d.getPageLayout(),x-=u.x*B.width,z-=u.y*B.height):C=!0;if(null==b){b=PrintDialog.createPrintPreview(d,m,B,0,x,z,C);b.pageSelector=!1;b.mathEnabled=!1;x=a.getCurrentFile();null!=x&&(b.title=x.getTitle());var t=b.writeHead;b.writeHead=function(b){t.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f=
+function(a,d,b,c,f,e,g,l,n,q){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return H.apply(this,arguments)};PrintDialog.prototype.create=function(a,d){function b(){z.value=Math.max(1,Math.min(l,Math.max(parseInt(z.value),parseInt(v.value))));v.value=Math.max(1,Math.min(l,Math.min(parseInt(z.value),parseInt(v.value))))}function c(d){function b(d,b,e){var g=d.useCssTransforms,l=d.currentTranslate,n=d.currentScale,q=d.view.translate,k=
+d.view.scale;d.useCssTransforms&&(d.useCssTransforms=!1,d.currentTranslate=new mxPoint(0,0),d.currentScale=1,d.view.translate=new mxPoint(0,0),d.view.scale=1);var y=d.getGraphBounds(),v=0,z=0,B=pa.get(),t=1/d.pageScale,p=C.checked;if(p)var t=parseInt(R.value),F=parseInt(da.value),t=Math.min(B.height*F/(y.height/d.view.scale),B.width*t/(y.width/d.view.scale));else t=parseInt(m.value)/(100*d.pageScale),isNaN(t)&&(c=1/d.pageScale,m.value="100 %");B=mxRectangle.fromRectangle(B);B.width=Math.ceil(B.width*
+c);B.height=Math.ceil(B.height*c);t*=c;!p&&d.pageVisible?(y=d.getPageLayout(),v-=y.x*B.width,z-=y.y*B.height):p=!0;if(null==b){b=PrintDialog.createPrintPreview(d,t,B,0,v,z,p);b.pageSelector=!1;b.mathEnabled=!1;v=a.getCurrentFile();null!=v&&(b.title=v.getTitle());var u=b.writeHead;b.writeHead=function(b){u.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=d.extFonts)for(var c=0;c<d.extFonts.length;c++){var f=
 d.extFonts[c].name,e=d.extFonts[c].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+f+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var E=b.renderPage;b.renderPage=function(d,b,c,f,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;
-var n=E.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}x=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(x=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=x&&(f.stylesheet=x,f.refresh())}else{B=d.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";b.backgroundColor=B;b.autoOrigin=C;b.appendGraph(d,m,x,z,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e=
-0;e<d.extFonts.length;e++)x=d.extFonts[e].name,z=d.extFonts[e].url,0==z.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+x+'";\n\tsrc: url("'+z+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=q,d.view.scale=k);return b}var c=parseInt(K.value)/
-100;isNaN(c)&&(c=1,K.value="100 %");var c=.75*c,e=x.value,g=z.value,l=!k.checked,q=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var u=0,l=a.pages.length-1;k.checked||(u=parseInt(e)-1,l=parseInt(g)-1);for(var B=u;B<=l;B++){var m=a.pages[B],e=m==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,u=!1,C=null,F=null;null==m.viewState&&null==m.root&&a.updatePageRoot(m);null!=m.viewState&&(g=m.viewState.pageVisible,u=m.viewState.mathEnabled,C=m.viewState.background,
-F=m.viewState.backgroundImage,e.extFonts=m.viewState.extFonts);e.background=C;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=g;e.mathEnabled=u;var t=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?m.getName():"pagenumber"==d?B+1:"pagecount"==d?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(m);e.model.setRoot(m.root)}q=b(e,q,B!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else q=
+var n=E.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:n.className="geDisableMathJax";return n}}v=null;null!=f.themes&&"darkTheme"==f.defaultThemeName&&(v=f.stylesheet,f.stylesheet=f.getDefaultStylesheet(),f.refresh());b.open(null,null,e,!0);null!=v&&(f.stylesheet=v,f.refresh())}else{B=d.background;if(null==B||""==B||B==mxConstants.NONE)B="#ffffff";b.backgroundColor=B;b.autoOrigin=p;b.appendGraph(d,t,v,z,e,!0);if(null!=d.extFonts&&null!=b.wnd)for(e=
+0;e<d.extFonts.length;e++)v=d.extFonts[e].name,z=d.extFonts[e].url,0==z.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+z+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+v+'";\n\tsrc: url("'+z+'");\n}'),b.wnd.document.writeln("</style>"))}g&&(d.useCssTransforms=g,d.currentTranslate=l,d.currentScale=n,d.view.translate=q,d.view.scale=k);return b}var c=parseInt(K.value)/
+100;isNaN(c)&&(c=1,K.value="100 %");var c=.75*c,e=v.value,g=z.value,l=!k.checked,q=null;l&&(l=e==n&&g==n);if(!l&&null!=a.pages&&a.pages.length){var y=0,l=a.pages.length-1;k.checked||(y=parseInt(e)-1,l=parseInt(g)-1);for(var B=y;B<=l;B++){var t=a.pages[B],e=t==a.currentPage?f:null;if(null==e){var e=a.createTemporaryGraph(f.getStylesheet()),g=!0,y=!1,p=null,F=null;null==t.viewState&&null==t.root&&a.updatePageRoot(t);null!=t.viewState&&(g=t.viewState.pageVisible,y=t.viewState.mathEnabled,p=t.viewState.background,
+F=t.viewState.backgroundImage,e.extFonts=t.viewState.extFonts);e.background=p;e.backgroundImage=null!=F?new mxImage(F.src,F.width,F.height):null;e.pageVisible=g;e.mathEnabled=y;var u=e.getGlobalVariable;e.getGlobalVariable=function(d){return"page"==d?t.getName():"pagenumber"==d?B+1:"pagecount"==d?null!=a.pages?a.pages.length:1:u.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(t);e.model.setRoot(t.root)}q=b(e,q,B!=l);e!=f&&e.container.parentNode.removeChild(e.container)}}else q=
 b(f);null==q?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(q.mathEnabled&&(l=q.wnd.document,l.writeln('<script type="text/x-mathjax-config">'),l.writeln("MathJax.Hub.Config({"),l.writeln("showMathMenu: false,"),l.writeln('messageStyle: "none",'),l.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),l.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),l.writeln('"HTML-CSS": {'),l.writeln("imageFont: null"),l.writeln("},"),l.writeln("TeX: {"),
 l.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),l.writeln("},"),l.writeln("tex2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("},"),l.writeln("asciimath2jax: {"),l.writeln('\tignoreClass: "geDisableMathJax"'),l.writeln("}"),l.writeln("});"),d&&(l.writeln("MathJax.Hub.Queue(function () {"),l.writeln("window.print();"),l.writeln("});")),l.writeln("\x3c/script>"),l.writeln('<script type="text/javascript" src="'+DRAW_MATH_URL+'/MathJax.js">\x3c/script>')),
 q.closeDocument(),!q.mathEnabled&&d&&PrintDialog.printPreview(q))}var f=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,d||mxResources.get("print"));e.appendChild(g);var l=1,n=1,q=document.createElement("div");q.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";
-k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var u=k.cloneNode(!0);k.setAttribute("checked","checked");u.setAttribute("value","range");q.appendChild(u);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.appendChild(g);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";
-x.setAttribute("value","1");x.setAttribute("type","number");x.setAttribute("min","1");x.style.width="50px";q.appendChild(x);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var z=x.cloneNode(!0);q.appendChild(z);mxEvent.addListener(x,"focus",function(){u.checked=!0});mxEvent.addListener(z,"focus",function(){u.checked=!0});mxEvent.addListener(x,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
-a.pages[g]){n=g+1;x.value=n;z.value=n;break}x.setAttribute("max",l);z.setAttribute("max",l);1<l&&e.appendChild(q);var B=document.createElement("div");B.style.marginBottom="10px";var m=document.createElement("input");m.style.marginRight="8px";m.setAttribute("value","adjust");m.setAttribute("type","radio");m.setAttribute("name","printZoom");B.appendChild(m);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));B.appendChild(g);var y=document.createElement("input");y.style.cssText=
-"margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";B.appendChild(y);mxEvent.addListener(y,"focus",function(){m.checked=!0});e.appendChild(B);var q=q.cloneNode(!1),p=m.cloneNode(!0);p.setAttribute("value","fit");m.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(p);q.appendChild(g);B=document.createElement("table");B.style.display="inline-block";var C=document.createElement("tbody"),
-F=document.createElement("tr"),t=F.cloneNode(!0),H=document.createElement("td"),v=H.cloneNode(!0),A=H.cloneNode(!0),I=H.cloneNode(!0),ka=H.cloneNode(!0),Q=H.cloneNode(!0);H.style.textAlign="right";I.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var R=document.createElement("input");R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";v.appendChild(R);g=document.createElement("span");mxUtils.write(g,
-mxResources.get("fitToSheetsAcross"));A.appendChild(g);mxUtils.write(I,mxResources.get("fitToBy"));var da=R.cloneNode(!0);ka.appendChild(da);mxEvent.addListener(R,"focus",function(){p.checked=!0});mxEvent.addListener(da,"focus",function(){p.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));Q.appendChild(g);F.appendChild(H);F.appendChild(v);F.appendChild(A);t.appendChild(I);t.appendChild(ka);t.appendChild(Q);C.appendChild(F);C.appendChild(t);B.appendChild(C);
+k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");q.appendChild(k);g=document.createElement("span");mxUtils.write(g,mxResources.get("printAllPages"));q.appendChild(g);mxUtils.br(q);var y=k.cloneNode(!0);k.setAttribute("checked","checked");y.setAttribute("value","range");q.appendChild(y);g=document.createElement("span");mxUtils.write(g,mxResources.get("pages")+":");q.appendChild(g);var v=document.createElement("input");v.style.cssText="margin:0 8px 0 8px;";
+v.setAttribute("value","1");v.setAttribute("type","number");v.setAttribute("min","1");v.style.width="50px";q.appendChild(v);g=document.createElement("span");mxUtils.write(g,mxResources.get("to"));q.appendChild(g);var z=v.cloneNode(!0);q.appendChild(z);mxEvent.addListener(v,"focus",function(){y.checked=!0});mxEvent.addListener(z,"focus",function(){y.checked=!0});mxEvent.addListener(v,"change",b);mxEvent.addListener(z,"change",b);if(null!=a.pages&&(l=a.pages.length,null!=a.currentPage))for(g=0;g<a.pages.length;g++)if(a.currentPage==
+a.pages[g]){n=g+1;v.value=n;z.value=n;break}v.setAttribute("max",l);z.setAttribute("max",l);1<l&&e.appendChild(q);var B=document.createElement("div");B.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");B.appendChild(t);g=document.createElement("span");mxUtils.write(g,mxResources.get("adjustTo"));B.appendChild(g);var m=document.createElement("input");m.style.cssText=
+"margin:0 8px 0 8px;";m.setAttribute("value","100 %");m.style.width="50px";B.appendChild(m);mxEvent.addListener(m,"focus",function(){t.checked=!0});e.appendChild(B);var q=q.cloneNode(!1),C=t.cloneNode(!0);C.setAttribute("value","fit");t.setAttribute("checked","checked");g=document.createElement("div");g.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";g.appendChild(C);q.appendChild(g);B=document.createElement("table");B.style.display="inline-block";var p=document.createElement("tbody"),
+F=document.createElement("tr"),u=F.cloneNode(!0),H=document.createElement("td"),x=H.cloneNode(!0),A=H.cloneNode(!0),I=H.cloneNode(!0),ka=H.cloneNode(!0),Q=H.cloneNode(!0);H.style.textAlign="right";I.style.textAlign="right";mxUtils.write(H,mxResources.get("fitTo"));var R=document.createElement("input");R.style.cssText="margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("min","1");R.setAttribute("type","number");R.style.width="40px";x.appendChild(R);g=document.createElement("span");mxUtils.write(g,
+mxResources.get("fitToSheetsAcross"));A.appendChild(g);mxUtils.write(I,mxResources.get("fitToBy"));var da=R.cloneNode(!0);ka.appendChild(da);mxEvent.addListener(R,"focus",function(){C.checked=!0});mxEvent.addListener(da,"focus",function(){C.checked=!0});g=document.createElement("span");mxUtils.write(g,mxResources.get("fitToSheetsDown"));Q.appendChild(g);F.appendChild(H);F.appendChild(x);F.appendChild(A);u.appendChild(I);u.appendChild(ka);u.appendChild(Q);p.appendChild(F);p.appendChild(u);B.appendChild(p);
 q.appendChild(B);e.appendChild(q);q=document.createElement("div");g=document.createElement("div");g.style.fontWeight="bold";g.style.marginBottom="12px";mxUtils.write(g,mxResources.get("paperSize"));q.appendChild(g);g=document.createElement("div");g.style.marginBottom="12px";var pa=PageSetupDialog.addPageFormatPanel(g,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);q.appendChild(g);g=document.createElement("span");mxUtils.write(g,mxResources.get("pageScale"));q.appendChild(g);
 var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","100 %");K.style.width="60px";q.appendChild(K);e.appendChild(q);g=document.createElement("div");g.style.cssText="text-align:right;margin:48px 0 0 0;";q=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});q.className="geBtn";a.editor.cancelFirst&&g.appendChild(q);a.isOffline()||(B=mxUtils.button(mxResources.get("help"),function(){f.openLink("https://desk.draw.io/support/solutions/articles/16000048947")}),
 B.className="geBtn",g.appendChild(B));PrintDialog.previewEnabled&&(B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();c(!1)}),B.className="geBtn",g.appendChild(B));B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();c(!0)});B.className="geBtn gePrimaryBtn";g.appendChild(B);a.editor.cancelFirst||g.appendChild(q);e.appendChild(g);this.container=e};var z=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
 this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),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)):(z.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 F=document.createElement("canvas"),C=new Image;C.onload=function(){try{F.getContext("2d").drawImage(C,0,0);var a=F.toDataURL("image/png");Editor.prototype.useCanvasForExport=
-null!=a&&6<a.length}catch(I){}};C.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){}})();
+null!=a&&6<a.length}catch(I){}};C.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(t){}})();
 (function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,e,c){c.ui=a.ui;return e};a.afterDecode=function(a,e,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&(/.*\.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.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars=
 "\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":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.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&
 !EditorUi.isElectronApp&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";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(a,b,c,e,n,l,k){l=null!=l?l:0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&"1"!=urlParams.dev)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&
-null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=d+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(u){}try{k||null==window.console||
-console.error(l,a,b,c,e,n)}catch(u){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
+null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";n=null!=n?n:Error(a);(new Image).src=d+"/log?severity="+l+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=e?":colno:"+encodeURIComponent(e):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}}catch(y){}try{k||null==window.console||
+console.error(l,a,b,c,e,n)}catch(y){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var d=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=d+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)):"")}catch(g){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>
 b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var a=[(new Date).toISOString()],b=0;b<arguments.length;b++)null!=arguments[b]&&a.push(arguments[b]);console.log.apply(console,a)}}catch(g){}};EditorUi.parsePng=function(a,b,c){function d(a,d){var b=e;e+=d;return a.substring(b,
 e)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=f(a);var g=d(a,4);if(null!=b&&b(e-8,g,c))break;value=d(a,c);d(a,4);if("IEND"==g)break}while(c)}};EditorUi.removeChildNodes=function(a){for(;null!=a.firstChild;)a.removeChild(a.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;";
@@ -3058,11 +3059,11 @@ return d};EditorUi.prototype.isCompatibleString=function(a){try{var d=mxUtils.pa
 d.indexOf("&lt;mxfile ");if(0<=c){var e=d.lastIndexOf("&lt;/mxfile&gt;");e>c&&(b=d.substring(c,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(d),l=this.editor.extractGraphModel(n.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=l?mxUtils.getXml(l):""}catch(B){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var d=a.indexOf('<meta charset="utf-8">');
 0<=d&&(a=a.slice(0,d)+'<meta charset="utf-8"/>'+a.slice(d+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a){d=this.editor.graph;d.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,c=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<c.length||1==c.length&&
 c[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=c.length-1;0<=e;e--){var l=this.updatePageRoot(new DiagramPage(c[e]));null==l.getName()&&l.setName(mxResources.get("pageWithNumber",[e+1]));d.model.execute(new ChangePage(this,l,0==e?l:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",
-[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,n,l,k,x,u,m,z){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;u=null!=u?u:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
+[1])),d.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)d.model.execute(new ChangePage(this,b[e],null))}finally{d.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,c,e,n,l,k,v,y,m,z){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;y=null!=y?y:!0;var d,f=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?
 d="_blank":f=d=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(z){var q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());q.appendChild(a)}else{q=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(q);if(Graph.decompress(g)!=q)return q;q=a.ownerDocument.createElement("diagram");q.setAttribute("id",Editor.guid());mxUtils.setTextContent(q,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(q)}m?(g=g.cloneNode(!0),g.removeAttribute("modified"),
 g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",
 (new Date).toISOString()),g.setAttribute("agent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=c?c.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));z=z?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!l&&!n&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))z=this.getHtml2(mxUtils.getXml(g),b,null!=c?c.getTitle():null,d,f);else if(l||
-!n&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,x,u,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
+!n&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(e=null),z=this.getEmbeddedSvg(z,b,e,null,v,y,f);return z};EditorUi.prototype.getXmlFileData=function(a,b,c){a=null!=a?a:!0;b=null!=b?b:!1;c=null!=c?c:!Editor.compressXml;var d=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&c?(b=mxUtils.trim(mxUtils.getTextContent(a)),
 a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||c?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));d.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(d)),d=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=
 (new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return d};EditorUi.prototype.anonymizeString=function(a,b){for(var d=[],c=0;c<a.length;c++){var f=a.charAt(c);0<=EditorUi.ignoredAnonymizedChars.indexOf(f)?d.push(f):isNaN(parseInt(f))?f.toLowerCase()!=
 f?d.push(String.fromCharCode(65+Math.round(25*Math.random()))):f.toUpperCase()!=f?d.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(f)?d.push(" "):d.push("?"):d.push(b?"0":Math.round(9*Math.random()))}return d.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var d=0;d<a[EditorUi.DIFF_INSERT].length;d++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][d].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",
@@ -3071,8 +3072,8 @@ this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][d].data=mx
 a.attributes[d].name&&a.setAttribute(a.attributes[d].name,this.anonymizeString(a.attributes[d].value,b));if(null!=a.childNodes)for(d=0;d<a.childNodes.length;d++)this.anonymizeAttributes(a.childNodes[d],b)};EditorUi.prototype.anonymizeNode=function(a,b){for(var d=a.getElementsByTagName("mxCell"),c=0;c<d.length;c++)null!=d[c].getAttribute("value")&&d[c].setAttribute("value","["+d[c].getAttribute("value").length+"]"),null!=d[c].getAttribute("xmlValue")&&d[c].setAttribute("xmlValue","["+d[c].getAttribute("xmlValue").length+
 "]"),null!=d[c].getAttribute("style")&&d[c].setAttribute("style","["+d[c].getAttribute("style").length+"]"),null!=d[c].parentNode&&"root"!=d[c].parentNode.nodeName&&null!=d[c].parentNode.parentNode&&(d[c].setAttribute("id",d[c].parentNode.getAttribute("id")),d[c].parentNode.parentNode.replaceChild(d[c],d[c].parentNode));return a};EditorUi.prototype.synchronizeCurrentFile=function(a){var d=this.getCurrentFile();null!=d&&(d.savingFile?this.handleError({message:mxResources.get("busy")}):!a&&d.invalidChecksum?
 d.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(d.clearAutosave(),this.editor.setStatus(""),a?d.reloadFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)})):d.synchronizeFile(mxUtils.bind(this,function(){d.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(a){d.handleFileError(a,!0)}))))};EditorUi.prototype.getFileData=function(a,b,c,e,n,l,k,
-x,u,m){n=null!=n?n:!0;l=null!=l?l:!1;var d=this.editor.graph;if(b||!a&&null!=u&&/(\.svg)$/i.test(u.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(n,l,m);u=null!=u?u:this.getCurrentFile();a=this.createFileData(k,
-d,u,window.location.href,a,b,c,e,n,x,m);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
+v,y,m){n=null!=n?n:!0;l=null!=l?l:!1;var d=this.editor.graph;if(b||!a&&null!=y&&/(\.svg)$/i.test(y.getTitle()))if(m=!1,null!=this.pages&&this.currentPage!=this.pages[0]){var f=d.getGlobalVariable,d=this.createTemporaryGraph(d.getStylesheet()),g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);d.model.setRoot(g.root)}k=null!=k?k:this.getXmlFileData(n,l,m);y=null!=y?y:this.getCurrentFile();a=this.createFileData(k,
+d,y,window.location.href,a,b,c,e,n,v,m);d!=this.editor.graph&&d.container.parentNode.removeChild(d.container);return a};EditorUi.prototype.getHtml=function(a,b,c,e,n,l){l=null!=l?l:!0;var d=null,f=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=b){var d=l?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;l=Math.floor(d.x/g-b.view.translate.x);g=Math.floor(d.y/g-b.view.translate.y);d=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f=EditorUi.drawHost+
 "/embed.js?s="+b));a.setAttribute("x0",l);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom","1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?Graph.zapGremlins(mxUtils.getXml(a)):"";e=Graph.compress(a);Graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
 "")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=d&&d!=mxConstants.NONE?' style="background-color:'+d+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+
 "</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,c,e,n){b=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3080,28 +3081,28 @@ resize:!0,xml:Graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=t
 n+"'\"/>\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(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+b+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
 function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var d=Editor.extractParserError(a,mxResources.get("invalidOrMissingFile"));if(d)throw Error(mxResources.get("notADiagramFile")+" ("+d+")");d=null!=a?this.editor.extractGraphModel(a,!0):null;null!=d&&(a=d);if(null!=a&&"mxfile"==a.nodeName&&(d=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){var b=
 null;this.fileNode=a;this.pages=[];for(var c=0;c<d.length;c++)null==d[c].getAttribute("id")&&d[c].setAttribute("id",c),a=new DiagramPage(d[c]),null==a.getName()&&a.setName(mxResources.get("pageWithNumber",[c+1])),this.pages.push(a),null!=urlParams["page-id"]&&a.getId()==urlParams["page-id"]&&(b=a);this.currentPage=null!=b?b:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),
-this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),c=0;c<k.length;c++){var x=k[c];l.setVisible(x,a[x.id]||
-!1)}}catch(u){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};
-EditorUi.prototype.downloadFile=function(a,b,c,e,n,l,k,x,u,m,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!n),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(d,a,e,b,k,n,x,u,m,z);this.editor.graph.pageVisible=c;return f}catch(Z){this.handleError(Z)}}));else{var q=null,B=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var p=this.editor.graph.background;if(k||p==mxConstants.NONE)p=null;var t=this.editor.graph.getSvg(p,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(t);this.convertImages(t,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();B('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",q=this.getFileData(!1,
-!0,null,mxUtils.bind(this,function(a){this.spinner.stop();B(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,n,l,k,x,u,m){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=b);var g="",q="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m=m?"1":"0";"pdf"==b&&0==l&&(q="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(l=
-0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g="&from="+l;break}l=d.background;"png"==b&&n?l=mxConstants.NONE:n||null!=l&&l!=mxConstants.NONE||(l="#ffffff");n={globalVars:d.getExportVariables()};u&&(n.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+q+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+e+"&embedXml="+m+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+
-(null!=k?"&scale="+k:"")+(null!=x?"&border="+x:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==
+this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var e=urlParams["layer-ids"].split(" ");a={};for(c=0;c<e.length;c++)a[e[c]]=!0;for(var l=this.editor.graph.getModel(),k=l.getChildren(l.root),c=0;c<k.length;c++){var v=k[c];l.setVisible(v,a[v.id]||
+!1)}}catch(y){}};EditorUi.prototype.getBaseFilename=function(a){var d=this.getCurrentFile(),d=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(d)||/(\.html)$/i.test(d)||/(\.svg)$/i.test(d)||/(\.png)$/i.test(d)||/(\.drawio)$/i.test(d))d=d.substring(0,d.lastIndexOf("."));!a&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(d=d+"-"+this.currentPage.getName());return d};
+EditorUi.prototype.downloadFile=function(a,b,c,e,n,l,k,v,y,m,z){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var d=this.getBaseFilename(!n),f=d+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+this.getFileData(!0,null,null,null,e,n,null,null,null,b);this.saveData(f,a,g,"text/xml")}else if("html"==a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,d),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+a?f=d+".png":"jpeg"==a&&(f=d+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(d,b){try{var c=this.editor.graph.pageVisible;null!=l&&(this.editor.graph.pageVisible=l);var f=this.createDownloadRequest(d,a,e,b,k,n,v,y,m,z);this.editor.graph.pageVisible=c;return f}catch(Z){this.handleError(Z)}}));else{var q=null,B=mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
+mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==a){var p=this.editor.graph.background;if(k||p==mxConstants.NONE)p=null;var u=this.editor.graph.getSvg(p,null,null,null,null,e);c&&this.editor.graph.addSvgShadow(u);this.convertImages(u,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();B('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a))})))}else f=d+".svg",q=this.getFileData(!1,
+!0,null,mxUtils.bind(this,function(a){this.spinner.stop();B(a)}),e)}}catch(D){this.handleError(D)}};EditorUi.prototype.createDownloadRequest=function(a,b,c,e,n,l,k,v,y,m){var d=this.editor.graph,f=d.getGraphBounds();c=this.getFileData(!0,null,null,null,c,0==l?!1:"xmlpng"!=b);var g="",q="";if(f.width*f.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};m=m?"1":"0";"pdf"==b&&0==l&&(q="&allPages=1");if("xmlpng"==b&&(m="1",b="png",null!=this.pages&&null!=this.currentPage))for(l=
+0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g="&from="+l;break}l=d.background;"png"==b&&n?l=mxConstants.NONE:n||null!=l&&l!=mxConstants.NONE||(l="#ffffff");n={globalVars:d.getExportVariables()};y&&(n.grid={size:d.gridSize,steps:d.view.gridSteps,color:d.view.gridColor});return new mxXmlRequest(EXPORT_URL,"format="+b+g+q+"&bg="+(null!=l?l:mxConstants.NONE)+"&base64="+e+"&embedXml="+m+"&xml="+encodeURIComponent(c)+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(n))+
+(null!=k?"&scale="+k:"")+(null!=v?"&border="+v:""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.loadDescriptor=function(a,b,c){var d=window.location.hash,f=mxUtils.bind(this,function(c){var f=null!=a.data?a.data:"";null!=c&&0<c.length&&(0<f.length&&(f+="\n"),f+=c);c=new LocalFile(this,"csv"!=a.format&&0<f.length?f:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);c.getHash=function(){return d};this.fileLoaded(c);"csv"==
 a.format&&this.importCsv(f,mxUtils.bind(this,function(a){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=a.update){var e=null!=a.interval?parseInt(a.interval):6E4,g=null,l=mxUtils.bind(this,function(){var d=this.currentPage;mxUtils.post(a.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(a){d===this.currentPage&&(200<=a.getStatus()&&300>=a.getStatus()?(this.updateDiagram(a.getText()),n()):this.handleError({message:mxResources.get("error")+
 " "+a.getStatus()}))}),mxUtils.bind(this,function(a){this.handleError(a)}))}),n=mxUtils.bind(this,function(){window.clearTimeout(g);g=window.setTimeout(l,e)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){n();l()}));n();l()}null!=b&&b()});if(null!=a.url&&0<a.url.length){var e=a.url;/^https?:\/\//.test(e)&&!this.editor.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(e));this.loadUrl(e,mxUtils.bind(this,function(a){f(a)}),mxUtils.bind(this,function(a){null!=c&&
-c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,l=e.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var x=l.getCell(a.getAttribute("id"));
-if(null!=x){try{var u=a.getAttribute("value");if(null!=u){var m=mxUtils.parseXml(u).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))l.setValue(x,m);else for(var z=m.attributes,p=0;p<z.length;p++)e.setAttributeForCell(x,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+x.id+": "+E)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(x,C)}catch(E){null!=window.console&&console.log("Error in style for "+
-x.id+": "+E)}try{var y=a.getAttribute("icon");if(null!=y){var t=0<y.length?JSON.parse(y):null;null!=t&&t.append||e.removeCellOverlays(x);null!=t&&e.addCellOverlay(x,d(t))}}catch(E){null!=window.console&&console.log("Error in icon for "+x.id+": "+E)}try{var v=a.getAttribute("geometry");if(null!=v){var v=JSON.parse(v),J=e.getCellGeometry(x);if(null!=J){J=J.clone();for(key in v){var A=parseFloat(v[key]);"dx"==key?J.x+=A:"dy"==key?J.y+=A:"dw"==key?J.width+=A:"dh"==key?J.height+=A:J[key]=parseFloat(v[key])}e.model.setGeometry(x,
-J)}}}catch(E){null!=window.console&&console.log("Error in icon for "+x.id+": "+E)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
-a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,x=e.getDate(),u=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),d=
-d+(" "+(f+"-"+k+"-"+x+"-"+u+"-"+m+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();
+c(a)}))}else f("")};EditorUi.prototype.updateDiagram=function(a){function d(a){var d=new mxCellOverlay(a.image||e.warningImage,a.tooltip,a.align,a.valign,a.offset);d.addListener(mxEvent.CLICK,function(d,b){c.alert(a.tooltip)});return d}var b=null,c=this;if(null!=a&&0<a.length&&(b=mxUtils.parseXml(a),a=null!=b?b.documentElement:null,null!=a&&"updates"==a.nodeName)){var e=this.editor.graph,l=e.getModel();l.beginUpdate();var k=null;try{for(a=a.firstChild;null!=a;){if("update"==a.nodeName){var v=l.getCell(a.getAttribute("id"));
+if(null!=v){try{var y=a.getAttribute("value");if(null!=y){var m=mxUtils.parseXml(y).documentElement;if(null!=m)if("1"==m.getAttribute("replace-value"))l.setValue(v,m);else for(var z=m.attributes,p=0;p<z.length;p++)e.setAttributeForCell(v,z[p].nodeName,0<z[p].nodeValue.length?z[p].nodeValue:null)}}catch(E){null!=window.console&&console.log("Error in value for "+v.id+": "+E)}try{var C=a.getAttribute("style");null!=C&&e.model.setStyle(v,C)}catch(E){null!=window.console&&console.log("Error in style for "+
+v.id+": "+E)}try{var t=a.getAttribute("icon");if(null!=t){var u=0<t.length?JSON.parse(t):null;null!=u&&u.append||e.removeCellOverlays(v);null!=u&&e.addCellOverlay(v,d(u))}}catch(E){null!=window.console&&console.log("Error in icon for "+v.id+": "+E)}try{var x=a.getAttribute("geometry");if(null!=x){var x=JSON.parse(x),J=e.getCellGeometry(v);if(null!=J){J=J.clone();for(key in x){var A=parseFloat(x[key]);"dx"==key?J.x+=A:"dy"==key?J.y+=A:"dw"==key?J.width+=A:"dh"==key?J.height+=A:J[key]=parseFloat(x[key])}e.model.setGeometry(v,
+J)}}}catch(E){null!=window.console&&console.log("Error in icon for "+v.id+": "+E)}}}else if("model"==a.nodeName){for(var D=a.firstChild;null!=D&&D.nodeType!=mxConstants.NODETYPE_ELEMENT;)D=D.nextSibling;null!=D&&(new mxCodec(a.firstChild)).decode(D,l)}else if("view"==a.nodeName){if(a.hasAttribute("scale")&&(e.view.scale=parseFloat(a.getAttribute("scale"))),a.hasAttribute("dx")||a.hasAttribute("dy"))e.view.translate=new mxPoint(parseFloat(a.getAttribute("dx")||0),parseFloat(a.getAttribute("dy")||0))}else"fit"==
+a.nodeName&&(k=a.hasAttribute("max-scale")?parseFloat(a.getAttribute("max-scale")):1);a=a.nextSibling}}finally{l.endUpdate()}null!=k&&this.chromelessResize&&this.chromelessResize(!0,k)}return b};EditorUi.prototype.getCopyFilename=function(a,b){var d=null!=a&&null!=a.getTitle()?a.getTitle():this.defaultFilename,c="",f=d.lastIndexOf(".");0<=f&&(c=d.substring(f),d=d.substring(0,f));if(b)var e=new Date,f=e.getFullYear(),k=e.getMonth()+1,v=e.getDate(),y=e.getHours(),m=e.getMinutes(),e=e.getSeconds(),d=
+d+(" "+(f+"-"+k+"-"+v+"-"+y+"-"+m+"-"+e));return d=mxResources.get("copyOf",[d])+c};EditorUi.prototype.fileLoaded=function(a,b){var d=this.getCurrentFile();this.fileLoadedError=null;this.setCurrentFile(null);var c=!1;this.hideDialog();null!=d&&(EditorUi.debug("File.closed",[d]),d.removeListener(this.descriptorChangedListener),d.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var f=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=d&&this.updateDocumentTitle();
 this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!b&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();b||this.showSplash()});if(null!=a)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;
 this.setCurrentFile(a);a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();a.isEditable()?a.isModified()?(a.addUnsavedStatus(),null!=a.backupPatch&&a.patch([a.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+
 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"));c=!0;this.isOffline()||null==a.getMode()||EditorUi.logEvent({category:a.getMode().toUpperCase()+"-OPEN-FILE-"+
 a.getHash(),action:"size_"+a.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")});EditorUi.debug("File.opened",[a]);if(this.editor.editable&&this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(B){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(B){}}catch(B){this.fileLoadedError=B;if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+
-(null!=a?a.getHash():"none"),action:"message_"+B.message,label:"stack_"+B.stack})}catch(x){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(B,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=
-0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var x=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");k.appendChild(x);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!=
+(null!=a?a.getHash():"none"),action:"message_"+B.message,label:"stack_"+B.stack})}catch(v){}var e=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=d?this.fileLoaded(d):f()});b?e():this.handleError(B,mxResources.get("errorLoadingFile"),e,!0,null,null,!0)}else f();return c};EditorUi.prototype.getHashValueForPages=function(a,b){var d=0,c=new mxGraphModel,f=new mxCodec;null!=b&&(b.byteCount=
+0,b.attrCount=0,b.eltCount=0,b.nodeCount=0);for(var e=0;e<a.length;e++){this.updatePageRoot(a[e]);var k=a[e].node.cloneNode(!1);k.removeAttribute("name");c.root=a[e].root;var v=f.encode(c);this.editor.graph.saveViewState(a[e].viewState,v,!0);v.removeAttribute("pageWidth");v.removeAttribute("pageHeight");k.appendChild(v);null!=b&&(b.eltCount+=k.getElementsByTagName("*").length,b.nodeCount+=k.getElementsByTagName("mxCell").length);d=(d<<5)-d+this.hashValue(k,function(a,d,b,c){return!c||"mxGeometry"!=
 a.nodeName&&"mxPoint"!=a.nodeName||"x"!=d&&"y"!=d&&"width"!=d&&"height"!=d?c&&"mxCell"==a.nodeName&&"previous"==d?null:b:Math.round(b)},b)<<0}return d};EditorUi.prototype.hashValue=function(a,b,c){var d=0;if(null!=a&&"object"===typeof a&&"number"===typeof a.nodeType&&"string"===typeof a.nodeName&&"function"===typeof a.getAttribute){null!=a.nodeName&&(d^=this.hashValue(a.nodeName,b,c));if(null!=a.attributes){null!=c&&(c.attrCount+=a.attributes.length);for(var f=0;f<a.attributes.length;f++){var e=a.attributes[f].name,
 g=null!=b?b(a,e,a.attributes[f].value,!0):a.attributes[f].value;null!=g&&(d^=this.hashValue(e,b,c)+this.hashValue(g,b,c))}}if(null!=a.childNodes)for(f=0;f<a.childNodes.length;f++)d=(d<<5)-d+this.hashValue(a.childNodes[f],b,c)<<0}else if(null!=a&&"function"!==typeof a){a=String(a);b=0;null!=c&&(c.byteCount+=a.length);for(f=0;f<a.length;f++)b=(b<<5)-b+a.charCodeAt(f)<<0;d^=b}return d};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=
 function(a,b,c,e,n,l,k){};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(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var d=mxUtils.createXmlDocument(),
@@ -3110,19 +3111,19 @@ EditorUi.prototype.repositionLibrary=function(a){var d=this.sidebar.container;if
 this.libraryLoaded(a,c,d.documentElement.getAttribute("title"),b)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c,e){if(null!=this.sidebar){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=
 null,g=mxUtils.bind(this,function(d,b){0==d.length&&a.isEditable()?(null==f&&(f=document.createElement("div"),f.className="geDropTarget",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f)):this.addLibraryEntries(d,b)});null!=this.sidebar&&null!=b&&this.sidebar.addEntries(b);c=null!=c&&0<c.length?c:a.getTitle();var k=this.sidebar.addPalette(a.getHash(),c,null!=e?e:!0,mxUtils.bind(this,function(a){g(b,a)}));this.repositionLibrary(d);var q=k.parentNode.previousSibling;e=q.getAttribute("title");
 null!=e&&0<e.length&&".scratchpad"!=a.title&&q.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+e);var m=document.createElement("div");m.style.position="absolute";m.style.right="0px";m.style.top="0px";m.style.padding="8px";mxClient.IS_QUIRKS||8==document.documentMode||(m.style.backgroundColor="inherit");q.style.position="relative";var z=document.createElement("img");z.setAttribute("src",Dialog.prototype.closeImage);z.setAttribute("title",mxResources.get("close"));z.setAttribute("valign","absmiddle");
-z.setAttribute("border","0");z.style.cursor="pointer";z.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var C=this.editor.graph,y=null,
-t=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),v=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=y&&null!=y.parentNode&&y.parentNode.removeChild(y),y=z.cloneNode(!1),y.setAttribute("src",Editor.spinImage),y.setAttribute("title",mxResources.get("saving")),y.style.cursor="default",y.style.marginRight="2px",y.style.marginTop="-2px",m.insertBefore(y,m.firstChild),q.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
-b,a,a.getMode(),!0,!0,function(){null!=y&&null!=y.parentNode&&(y.parentNode.removeChild(y),q.style.paddingRight=18*m.childNodes.length+"px")})):null==p&&(p=z.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),m.insertBefore(p,m.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(q.style.paddingRight=18*m.childNodes.length+
+z.setAttribute("border","0");z.style.cursor="pointer";z.style.margin="0 3px";var p=null;if(".scratchpad"!=a.title||this.closableScratchpad)m.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(d){if(!mxEvent.isConsumed(d)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(d)}}));if(a.isEditable()){var C=this.editor.graph,t=null,
+u=mxUtils.bind(this,function(d){this.showLibraryDialog(a.getTitle(),k,b,a,a.getMode());mxEvent.consume(d)}),x=mxUtils.bind(this,function(d){a.setModified(!0);a.isAutosave()?(null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t),t=z.cloneNode(!1),t.setAttribute("src",Editor.spinImage),t.setAttribute("title",mxResources.get("saving")),t.style.cursor="default",t.style.marginRight="2px",t.style.marginTop="-2px",m.insertBefore(t,m.firstChild),q.style.paddingRight=18*m.childNodes.length+"px",this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),!0,!0,function(){null!=t&&null!=t.parentNode&&(t.parentNode.removeChild(t),q.style.paddingRight=18*m.childNodes.length+"px")})):null==p&&(p=z.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),m.insertBefore(p,m.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(d){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==p||a.isModified()||(q.style.paddingRight=18*m.childNodes.length+
 "px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(d)})),q.style.paddingRight=18*m.childNodes.length+"px")}),J=mxUtils.bind(this,function(a,d,c,e){a=C.cloneCells(mxUtils.sortCells(C.model.getTopmostCells(a)));for(var g=0;g<a.length;g++){var l=C.getCellGeometry(a[g]);null!=l&&l.translate(-d.x,-d.y)}k.appendChild(this.sidebar.createVertexTemplateFromCells(a,d.width,d.height,e||"",!0,!1,!1));a={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:d.width,h:d.height};null!=e&&
-(a.title=e);b.push(a);v(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=C.getSelectionCells(),b=C.view.getBounds(d),c=C.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=C.view.translate.x;b.y-=C.view.translate.y;
+(a.title=e);b.push(a);x(c);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),A=mxUtils.bind(this,function(a){if(C.isSelectionEmpty())C.getRubberband().isActive()?(C.getRubberband().execute(a),C.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var d=C.getSelectionCells(),b=C.view.getBounds(d),c=C.view.scale;b.x/=c;b.y/=c;b.width/=c;b.height/=c;b.x-=C.view.translate.x;b.y-=C.view.translate.y;
 J(d,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(k,function(){},mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler.first&&(C.graphHandler.suspend(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="hidden"),k.style.backgroundColor="#f1f3f4",k.style.cursor="copy",C.panningManager.stop(),C.autoScroll=!1,mxEvent.consume(a))}),mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.panningManager&&null!=C.graphHandler&&(k.style.backgroundColor=
 "",k.style.cursor="default",this.sidebar.showTooltips=!0,C.panningManager.stop(),C.graphHandler.reset(),C.isMouseDown=!1,C.autoScroll=!0,A(a),mxEvent.consume(a))}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(a){C.isMouseDown&&null!=C.graphHandler.first&&(C.graphHandler.resume(),null!=C.graphHandler.hint&&(C.graphHandler.hint.style.visibility="visible"),k.style.backgroundColor="",k.style.cursor="",C.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(k,"dragover",mxUtils.bind(this,
-function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,q,u,z,m){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
-this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:u.substring(0,u.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var x=!1,B=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l=
-JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,k);b=b.concat(l);v(a);this.spinner.stop();x=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),u=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,u.width,u.height),a)}x=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=m&&null!=u&&(/(\.v(dx|sdx?))($|\?)/i.test(u)||/(\.vs(x|sx?))($|\?)/i.test(u))?this.importVisio(m,function(a){B(a,"text/xml")},null,u):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,u)&&null!=m?this.parseFile(m,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?B(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
-"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):B(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));z=z.cloneNode(!1);z.setAttribute("src",Editor.editImage);z.setAttribute("title",mxResources.get("edit"));m.insertBefore(z,m.firstChild);mxEvent.addListener(z,"click",t);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==
-k&&t(a)});e=z.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
+function(a){k.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";k.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"drop",mxUtils.bind(this,function(a){k.style.cursor="";k.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(d,c,e,l,n,q,y,z,v){if(null!=d&&"image/"==c.substring(0,6))d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
+this.convertDataUri(d),d=[new mxCell("",new mxGeometry(0,0,n,q),d)],d[0].vertex=!0,J(d,new mxRectangle(0,0,n,q),a,mxEvent.isAltDown(a)?null:y.substring(0,y.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var m=!1,t=mxUtils.bind(this,function(d,c){if(null!=d&&"application/pdf"==c){var e=Editor.extractGraphModelFromPdf(d);null!=e&&0<e.length&&(d=e)}if(null!=d)if(e=mxUtils.parseXml(d),"mxlibrary"==e.documentElement.nodeName)try{var l=
+JSON.parse(mxUtils.getTextContent(e.documentElement));g(l,k);b=b.concat(l);x(a);this.spinner.stop();m=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var n=e.documentElement.getElementsByTagName("diagram"),l=0;l<n.length;l++){var q=this.stringToCells(Editor.getDiagramNodeXml(n[l])),y=this.editor.graph.getBoundingBoxFromGeometry(q);J(q,new mxRectangle(0,0,y.width,y.height),a)}m=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}m||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
+null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=v&&null!=y&&(/(\.v(dx|sdx?))($|\?)/i.test(y)||/(\.vs(x|sx?))($|\?)/i.test(y))?this.importVisio(v,function(a){t(a,"text/xml")},null,y):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,y)&&null!=v?this.parseFile(v,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?t(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):t(d,c)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(k,"dragleave",function(a){k.style.cursor="";k.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));z=z.cloneNode(!1);z.setAttribute("src",Editor.editImage);z.setAttribute("title",mxResources.get("edit"));m.insertBefore(z,m.firstChild);mxEvent.addListener(z,"click",u);mxEvent.addListener(k,"dblclick",function(a){mxEvent.getSource(a)==
+k&&u(a)});e=z.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));m.insertBefore(e,m.firstChild);mxEvent.addListener(e,"click",A);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
 mxEvent.consume(a)})),m.insertBefore(e,m.firstChild))}q.appendChild(m);q.style.paddingRight=18*m.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(a,b){for(var d=0;d<a.length;d++){var c=a[d],f=c.data;if(null!=f){var f=this.convertDataUri(f),e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==c.aspect&&(e+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(e+"image="+f,c.w,c.h,"",c.title||"",!1,!1,!0))}else null!=c.xml&&(f=this.stringToCells(Graph.decompress(c.xml)),
 0<f.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(f,c.w,c.h,c.title||"",!0,!1,!0)))}};EditorUi.prototype.getResource=function(a){return null!=a?a[mxLanguage]||a.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=mxClient.IS_QUIRKS?
 "none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):"dark"==uiTheme&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor="#2a2a2a",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.defaultPageBackgroundColor="#2a2a2a",Graph.prototype.defaultPageBorderColor="#505759",Format.prototype.inactiveTabBackgroundColor=
@@ -3131,7 +3132,7 @@ Editor.checkmarkImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAM
 480:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var d=new BackgroundImageDialog(this,mxUtils.bind(this,function(d){a(d)}));this.showDialog(d.container,360,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,e,n){a=new LibraryDialog(this,a,b,c,e,n);this.showDialog(a.container,640,440,!0,!1,
 mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};var b=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(a){var d=b.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(a){this.editor.graph.isSelectionEmpty()&&d.refresh()}));return d};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer geSidebarFooter");a.style.position=
 "absolute";a.style.overflow="hidden";var b=document.createElement("a");b.className="geTitle";b.style.color="#DF6C0C";b.style.fontWeight="bold";b.style.height="100%";b.style.paddingTop="9px";b.innerHTML='<span style="font-size:18px;margin-right:5px;">+</span>';mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();
-mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,n,l,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(y){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
+mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c,e,n,l,k){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=a&&null!=a.stack&&null!=a.message)try{k?null!=window.console&&console.error("EditorUi.handleError:",a):EditorUi.logError("Caught: "+(null!=a.message?a.message:"null"),null,null,null,a,"INFO")}catch(t){}if(null!=f||null!=b){k=mxUtils.htmlEntities(mxResources.get("unknownError"));
 var g=mxResources.get("ok"),q=null;b=null!=b?b:mxResources.get("error");if(null!=f){null!=f.retry&&(g=mxResources.get("cancel"),q=function(){d();f.retry()});if(404==f.code||404==f.status||403==f.code){k=403==f.code?null!=f.message?mxUtils.htmlEntities(f.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var m=
 null!=l?l:window.location.hash;if(null!=m&&("#G"==m.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==m.substring(0,45))&&(null!=a&&null!=a.error&&(null!=a.error.errors&&0<a.error.errors.length&&"fileAccess"==a.error.errors[0].reason||null!=a.error.data&&0<a.error.data.length&&"fileAccess"==a.error.data[0].reason)||404==f.code||404==f.status)){m="#U"==m.substring(0,2)?m.substring(45,m.lastIndexOf("%26ex")):m.substring(2);this.showError(b,k,mxResources.get("openInNewWindow"),mxUtils.bind(this,
 function(){this.editor.graph.openLink("https://drive.google.com/open?id="+m);this.handleError(a,b,c,e,n)}),q,mxResources.get("changeUser"),mxUtils.bind(this,function(){function a(){f.innerHTML="";for(var a=0;a<d.length;a++){var b=document.createElement("option");mxUtils.write(b,d[a].displayName);b.value=a;f.appendChild(b);b=document.createElement("option");b.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(b,"<"+d[a].email+">");b.setAttribute("disabled","disabled");f.appendChild(b)}b=document.createElement("option");
@@ -3148,85 +3149,85 @@ function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createSvgDa
 function(a,b,c,e,n){var d="jpeg"==c?"jpg":c;e=this.getBaseFilename(e)+"."+d;a=this.createImageDataUri(a,b,c,n);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=
 function(a,b){var d=new TextareaDialog(this,a,b,null,null,mxResources.get("close"));d.textarea.style.width="600px";d.textarea.style.height="380px";this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(a,b,c,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),
 null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==c||"image/"!=c.substring(0,6)?this.showTextDialog(b+":",a):this.openInNewWindow(a,c,e);else{var d=document.createElement("a"),f=0>navigator.userAgent.indexOf("PaleMoon/")&&!mxClient.IS_IOS&&"undefined"!==typeof d.download;if(mxClient.IS_GC)var g=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./),f=65==(g?parseInt(g[2],
-10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(u){}}else this.createEchoRequest(a,b,c,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
-c?"&mime="+c:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,u=Math.min(m+1024,c),p=Array(u-m),z=0;m<u;++z,++m)p[z]=d[m].charCodeAt(0);e[k]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,n,l,k){l=null!=l?l:!1;k=null!=k?k:"vsdx"!=n&&
-(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(l);isLocalStorage&&n++;var d=4>=n?2:6<n?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,
-mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(C){this.handleError(C)}}))}catch(F){this.handleError(F)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,k,null,1<n,d,a,c,e);l=this.isServices(n)?n>d?390:270:160;this.showDialog(b.container,400,l,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?
+10):!1)?!1:f;if(f||this.isOffline()){d.href=URL.createObjectURL(e?this.base64ToBlob(a,c):new Blob([a],{type:c}));f?d.download=b:d.setAttribute("target","_blank");document.body.appendChild(d);try{window.setTimeout(function(){URL.revokeObjectURL(d.href)},0),d.click(),d.parentNode.removeChild(d)}catch(y){}}else this.createEchoRequest(a,b,c,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,e,n,l){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=
+c?"&mime="+c:"")+(null!=n?"&format="+n:"")+(null!=l?"&base64="+l:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var d=atob(a),c=d.length,f=Math.ceil(c/1024),e=Array(f),k=0;k<f;++k){for(var m=1024*k,y=Math.min(m+1024,c),p=Array(y-m),z=0;m<y;++z,++m)p[z]=d[m].charCodeAt(0);e[k]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,e,k,l,m){l=null!=l?l:!1;m=null!=m?m:"vsdx"!=k&&
+(!mxClient.IS_IOS||!navigator.standalone);k=this.getServiceCount(l);isLocalStorage&&k++;var d=4>=k?2:6<k?4:3;b=new CreateDialog(this,b,mxUtils.bind(this,function(d,b){try{if("_blank"==b)if(null!=c&&"image/"==c.substring(0,6))this.openInNewWindow(a,c,e);else{var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write("<pre>"+mxUtils.htmlEntities(a,!1)+"</pre>"),f.document.close())}else b==App.MODE_DEVICE||"download"==b?this.doSaveLocalFile(a,d,c,e):null!=d&&0<d.length&&this.pickFolder(b,
+mxUtils.bind(this,function(f){try{this.exportFile(a,d,c,e,b,f)}catch(C){this.handleError(C)}}))}catch(F){this.handleError(F)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,l,m,null,1<k,d,a,c,e);l=this.isServices(k)?k>d?390:270:160;this.showDialog(b.container,400,l,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){var d=window.open("about:blank");null==d||null==d.document?mxUtils.popup(a,!0):("image/svg+xml"!=b||mxClient.IS_SVG?
 (c=c?a:btoa(unescape(encodeURIComponent(a))),"image/svg+xml"==b?mxClient.IS_GC&&mxClient.IS_MAC?d.document.write('<html><object style="max-width:100%;" data="data:'+b+";base64,"+c+'"/></html>'):d.document.write("<html>"+a+"</html>"):d.document.write('<html><img style="max-width:100%;" src="data:'+b+";base64,"+c+'"/></html>')):d.document.write("<html><pre>"+mxUtils.htmlEntities(a,!1)+"</pre></html>"),d.document.close())};var e=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=
 function(a){if(this.isExportToCanvas()){this.exportDialog=null;var d=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var c=d.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");
 this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";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 f=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});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var d=this.createImageDataUri(a,
 null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.style.backgroundColor="white";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",d);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(d.substring(d.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,
-function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,n){this.isLocalFileSave()?this.saveLocalFile(c,a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,n,b,d)}),c,n,e)};EditorUi.prototype.saveRequest=function(a,
-b,c,e,n,l,k){k=null!=k?k:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+
-b;if(null!=e)try{this.exportFile(e,a,l,!0,d,c)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,d,c)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
-mxResources.get("download"),!1,!1,k,null,1<d,f,e,l,n);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,n,l){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,n,l,k,m,u,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=
-this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,k,m,null,c,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var q=this.getBaseFilename()+".svg",x=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,u,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,x,this.thumbImageCache)):x(g)}catch(M){this.handleError(M)}};EditorUi.prototype.addRadiobox=
-function(a,b,c,e,n,l,k){return this.addCheckbox(a,c,e,n,l,k,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,n,l,k,m){l=null!=l?l:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",k?"radio":"checkbox");k="geCheckbox-"+Editor.guid();d.id=k;null!=m&&d.setAttribute("name",m);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");l&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,
-b),c.setAttribute("for",k),a.appendChild(c),n||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),f="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";c=document.createElement("option");
-c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));e.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");e.appendChild(c);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,
-300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return d},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?
-"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));c.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));c.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));c.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(f));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",k=
-null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;d()});mxEvent.consume(a)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return c.value},focus:function(){c.focus()}}};
-EditorUi.prototype.createLink=function(a,b,c,e,n,l,k,m){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=k?c=
-"#U"+encodeURIComponent(k):(d=this.getCurrentFile(),m||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
-"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,n,l,k,m,u,p,z){this.getBasenames();var d={};""!=n&&n!=mxConstants.NONE&&(d.highlight=n);"auto"!==e&&(d.target=e);u||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];k&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);
-m&&c.push("layers");0<c.length&&(u&&c.push("lightbox"),d.toolbar=c.join(" "));null!=p&&0<p.length&&(d.edit=p);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}e.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,e,k){this.isLocalFileSave()?this.saveLocalFile(c,a,e,k,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,d){return this.createEchoRequest(c,a,e,k,b,d)}),c,k,e)};EditorUi.prototype.saveRequest=function(a,
+b,c,e,k,l,m){m=null!=m?m:!mxClient.IS_IOS||!navigator.standalone;var d=this.getServiceCount(!1);isLocalStorage&&d++;var f=4>=d?2:6<d?4:3;a=new CreateDialog(this,a,mxUtils.bind(this,function(a,d){if("_blank"==d||null!=a&&0<a.length){var f=c("_blank"==d?null:a,d==App.MODE_DEVICE||"download"==d||null==d||"_blank"==d?"0":"1");null!=f&&(d==App.MODE_DEVICE||"download"==d||"_blank"==d?f.simulate(document,"_blank"):this.pickFolder(d,mxUtils.bind(this,function(c){l=null!=l?l:"pdf"==b?"application/pdf":"image/"+
+b;if(null!=e)try{this.exportFile(e,a,l,!0,d,c)}catch(t){this.handleError(t)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,l,!0,d,c)}catch(t){this.handleError(t)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),
+mxResources.get("download"),!1,!1,m,null,1<d,f,e,l,k);d=this.isServices(d)?4<d?390:270:160;this.showDialog(a.container,380,d,!0,!0);a.init()};EditorUi.prototype.isServices=function(a){return 1!=a};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(a,b,c,e,k,l){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,e,k,l,m,v,y,p){if(this.spinner.spin(document.body,mxResources.get("export")))try{var d=
+this.editor.graph.isSelectionEmpty();c=null!=c?c:d;var f=b?null:this.editor.graph.background;f==mxConstants.NONE&&(f=null);null==f&&0==b&&(f="#ffffff");var g=this.editor.graph.getSvg(f,a,m,v,null,c,null,null,"blank"==p?"_blank":"self"==p?"_top":null,null,!0);e&&this.editor.graph.addSvgShadow(g);var n=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(a){this.spinner.stop();k&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,y,null,null,null,!1));var d='<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||d.length<=MAX_REQUEST_SIZE?this.saveData(n,"svg",d,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(d)}))});this.editor.addFontCss(g);this.editor.graph.mathEnabled&&this.editor.addMathCss(g);l?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,q,this.thumbImageCache)):q(g)}catch(M){this.handleError(M)}};EditorUi.prototype.addRadiobox=
+function(a,b,c,e,k,l,m){return this.addCheckbox(a,c,e,k,l,m,!0,b)};EditorUi.prototype.addCheckbox=function(a,b,c,e,k,l,m,v){l=null!=l?l:!0;var d=document.createElement("input");d.style.marginRight="8px";d.style.marginTop="16px";d.setAttribute("type",m?"radio":"checkbox");m="geCheckbox-"+Editor.guid();d.id=m;null!=v&&d.setAttribute("name",v);c&&(d.setAttribute("checked","checked"),d.defaultChecked=!0);e&&d.setAttribute("disabled","disabled");l&&(a.appendChild(d),c=document.createElement("label"),mxUtils.write(c,
+b),c.setAttribute("for",m),a.appendChild(c),k||mxUtils.br(a));return d};EditorUi.prototype.addEditButton=function(a,b){var d=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);d.style.marginLeft="24px";var c=this.getCurrentFile(),e="";null!=c&&c.getMode()!=App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";c=document.createElement("option");
+c.setAttribute("value","blank");mxUtils.write(c,mxResources.get("makeCopy"));f.appendChild(c);c=document.createElement("option");c.setAttribute("value","custom");mxUtils.write(c,mxResources.get("custom")+"...");f.appendChild(c);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,
+300,80,!0,!1);a.init()}}));mxEvent.addListener(d,"change",mxUtils.bind(this,function(){d.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return d.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return d},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function d(){k.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?
+"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var c=document.createElement("select");c.style.width="100px";c.style.marginLeft="8px";c.style.marginRight="10px";c.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));c.appendChild(e);e=document.createElement("option");
+e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));c.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));c.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),c.appendChild(e));a.appendChild(c);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",k=
+null,k=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;d()});mxEvent.consume(a)}));d();k.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";k.style.marginLeft="4px";k.style.height="22px";k.style.width="22px";k.style.position="relative";k.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";k.className="geColorBtn";a.appendChild(k);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return c.value},focus:function(){c.focus()}}};
+EditorUi.prototype.createLink=function(a,b,c,e,k,l,m,v){var d=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=k&&0<k.length&&f.push("edit="+encodeURIComponent(k)),l&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));c&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&f.push("page-id="+this.currentPage.getId());a=!0;null!=m?c=
+"#U"+encodeURIComponent(m):(d=this.getCurrentFile(),v||null==d||d.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+d.getHash(),a=!1));a&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(d.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:
+"https://"+window.location.host+"/")+(0<f.length?"?"+f.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,e,k,l,m,v,y,p,z){this.getBasenames();var d={};""!=k&&k!=mxConstants.NONE&&(d.highlight=k);"auto"!==e&&(d.target=e);y||(d.lightbox=!1);d.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(d.zoom=c/100);c=[];m&&(c.push("pages"),d.resize=!0,null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),d.resize=!0);
+v&&c.push("layers");0<c.length&&(y&&c.push("lightbox"),d.toolbar=c.join(" "));null!=p&&0<p.length&&(d.edit=p);null!=a?d.url=a:d.xml=this.getFileData(!0,null,null,null,null,!m);b='<div class="mxgraph" style="'+(l?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";z(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
 EditorUi.drawHost+"/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":window.VIEWER_URL?window.VIEWER_URL:EditorUi.drawHost+"/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,e){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=document.createElement("div");
 g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");g.appendChild(f);var q=document.createElement("span");mxUtils.write(q,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(q);mxUtils.br(g);g.appendChild(k);
 q=document.createElement("span");mxUtils.write(q,mxResources.get("publicDiagramUrl"));g.appendChild(q);var m=this.getCurrentFile();null==c&&null!=m&&m.constructor==window.DriveFile&&(q=document.createElement("a"),q.style.paddingLeft="12px",q.style.color="gray",q.setAttribute("href","javascript:void(0);"),mxUtils.write(q,mxResources.get("share")),g.appendChild(q),mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(m.getId())})));f.setAttribute("checked",
-"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var z=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";d.appendChild(C);var y=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,t=t=this.addCheckbox(d,mxResources.get("allPages"),
-g,!g),v=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("lightbox"),!0),A=this.addEditButton(d,J),D=A.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&J.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,p.checked,
-C.value,z.getTarget(),z.getColor(),y.checked,t.checked,v.checked,J.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,n,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
-a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));k.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));
-q.style.marginTop="12px";q.className="geBtn";k.appendChild(q);d.appendChild(k);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));k.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
+"checked");null==c&&k.setAttribute("disabled","disabled");d.appendChild(g);var z=this.addLinkSection(d),p=this.addCheckbox(d,mxResources.get("zoom"),!0,null,!0);mxUtils.write(d,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value="100%";d.appendChild(C);var t=this.addCheckbox(d,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,u=u=this.addCheckbox(d,mxResources.get("allPages"),
+g,!g),x=this.addCheckbox(d,mxResources.get("layers"),!0),J=this.addCheckbox(d,mxResources.get("lightbox"),!0),A=this.addEditButton(d,J),D=A.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(J,"change",function(){J.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&J.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,d,mxUtils.bind(this,function(){e(k.checked?c:null,p.checked,
+C.value,z.getTarget(),z.getColor(),t.checked,u.checked,x.checked,J.checked,A.getLink())}),null,a,b);this.showDialog(a.container,340,384,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,e,k,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";
+a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var q=document.createElement("div");q.style.whiteSpace="normal";mxUtils.write(q,mxResources.get("linkAccountRequired"));n.appendChild(q);q=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));
+q.style.marginTop="12px";q.className="geBtn";n.appendChild(q);d.appendChild(n);q=document.createElement("a");q.style.paddingLeft="12px";q.style.color="gray";q.style.fontSize="11px";q.setAttribute("href","javascript:void(0);");mxUtils.write(q,mxResources.get("check"));n.appendChild(q);mxEvent.addListener(q,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,
 null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=c||null!=e)a+=30,mxUtils.write(d,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",d.appendChild(m),mxUtils.write(d,mxResources.get("height")+
-":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",d.appendChild(p),mxUtils.br(d);var y=this.addLinkSection(d,l);c=null!=this.pages&&1<this.pages.length;var t=null;if(null==g||g.constructor!=window.DriveFile||b)t=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var v=this.addCheckbox(d,mxResources.get("lightbox"),!0),J=this.addEditButton(d,v),A=J.getEditInput(),D=this.addCheckbox(d,mxResources.get("layers"),
-!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(v,"change",function(){v.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&v.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){n(y.getTarget(),y.getColor(),null==t?
-!0:t.checked,v.checked,J.getLink(),D.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):y.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,n){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
-mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";d.appendChild(f);if(n){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,mxResources.get("borderWidth")+":");var k=document.createElement("input");k.setAttribute("type",
-"text");k.style.marginRight="16px";k.style.width="60px";k.style.marginLeft="4px";k.value=this.lastExportBorder||"0";d.appendChild(k);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=p&&(p.style.marginBottom="16px");a=
-new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(k.value)||0;c(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(n?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,n,l,k,m){k=null!=k?k:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==m?196:300,q=document.createElement("h3");mxUtils.write(q,a);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-d.appendChild(q);mxUtils.write(d,mxResources.get("zoom")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";d.appendChild(x);mxUtils.write(d,mxResources.get("borderWidth")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.value=this.lastExportBorder||
-"0";d.appendChild(p);mxUtils.br(d);var B=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=m),t=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),v=document.createElement("input");v.style.marginTop="16px";v.style.marginRight="8px";v.style.marginLeft="24px";v.setAttribute("disabled","disabled");v.setAttribute("type","checkbox");l&&(d.appendChild(v),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(t,"change",function(){t.checked?
-v.removeAttribute("disabled"):v.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(v.setAttribute("checked","checked"),v.defaultChecked=!0);var A=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(d.appendChild(D),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=
-26);var E=null;if("png"==m||"jpeg"==m)E=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var O=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),S=null!=this.pages&&1<this.pages.length,Z=this.addCheckbox(d,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=m);Z.style.marginLeft="24px";Z.style.marginBottom="16px";S?g+=26:Z.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&S?Z.removeAttribute("disabled"):
-Z.setAttribute("disabled","disabled")});k&&S||Z.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option");
-a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==m&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=p.value;this.lastExportZoom=x.value;n(x.value,B.checked,!t.checked,A.checked,O.checked,D.checked,p.value,v.checked,!Z.checked,X.value,null!=E?E.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null,
-null,null,null,!0);x.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?x.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var n=this.addCheckbox(d,mxResources.get("fit"),
-!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),t=this.addEditButton(d,p),y=t.getEditInput(),v=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(d,mxResources.get("layers"),v,!v);A.style.marginLeft=y.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(v&&A.removeAttribute("disabled"),y.removeAttribute("disabled")):
-(A.setAttribute("disabled","disabled"),y.setAttribute("disabled","disabled"));y.checked&&p.checked?t.getEditSelect().removeAttribute("disabled"):t.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,t.getLink(),A.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,k,l,m,x){function d(d){var b=" ",g="";e&&(b=" 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('"+
+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=e+"px",d.appendChild(p),mxUtils.br(d);var t=this.addLinkSection(d,l);c=null!=this.pages&&1<this.pages.length;var u=null;if(null==g||g.constructor!=window.DriveFile||b)u=this.addCheckbox(d,mxResources.get("allPages"),c,!c);var x=this.addCheckbox(d,mxResources.get("lightbox"),!0),J=this.addEditButton(d,x),A=J.getEditInput(),D=this.addCheckbox(d,mxResources.get("layers"),
+!0);D.style.marginLeft=A.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(x,"change",function(){x.checked?(D.removeAttribute("disabled"),A.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&x.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){k(t.getTarget(),t.getColor(),null==u?
+!0:u.checked,x.checked,J.getLink(),D.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,254+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,
+mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(k?"10":"4")+"px";d.appendChild(f);if(k){mxUtils.write(d,mxResources.get("zoom")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginRight="16px";g.style.width="60px";g.style.marginLeft="4px";g.style.marginRight="12px";g.value=this.lastExportZoom||"100%";d.appendChild(g);mxUtils.write(d,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";d.appendChild(n);mxUtils.br(d)}var q=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),m=e?null:this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),!0),f=this.editor.graph,p=e?null:this.addCheckbox(d,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background);null!=p&&(p.style.marginBottom="16px");a=
+new CustomDialog(this,d,mxUtils.bind(this,function(){var a=parseInt(g.value)/100||1,d=parseInt(n.value)||0;c(!q.checked,null!=m?m.checked:!1,null!=p?p.checked:!1,a,d)}),null,a,b);this.showDialog(a.container,300,(k?25:0)+(e?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,e,k,l,m,v){m=null!=m?m:!0;var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==v?196:300,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+d.appendChild(n);mxUtils.write(d,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";d.appendChild(q);mxUtils.write(d,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.value=this.lastExportBorder||
+"0";d.appendChild(t);mxUtils.br(d);var p=this.addCheckbox(d,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=v),B=this.addCheckbox(d,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),u=document.createElement("input");u.style.marginTop="16px";u.style.marginRight="8px";u.style.marginLeft="24px";u.setAttribute("disabled","disabled");u.setAttribute("type","checkbox");l&&(d.appendChild(u),mxUtils.write(d,mxResources.get("crop")),mxUtils.br(d),g+=26,mxEvent.addListener(B,"change",function(){B.checked?
+u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(u.setAttribute("checked","checked"),u.defaultChecked=!0);var x=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");b&&(d.appendChild(A),mxUtils.write(d,mxResources.get("embedImages")),mxUtils.br(d),g+=
+26);var E=null;if("png"==v||"jpeg"==v)E=this.addCheckbox(d,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),g+=26;var O=this.addCheckbox(d,mxResources.get("includeCopyOfMyDiagram"),m,null,null,"jpeg"!=v),S=null!=this.pages&&1<this.pages.length,Z=this.addCheckbox(d,S?mxResources.get("allPages"):"",S,!S,null,"jpeg"!=v);Z.style.marginLeft="24px";Z.style.marginBottom="16px";S?g+=26:Z.style.display="none";mxEvent.addListener(O,"change",function(){O.checked&&S?Z.removeAttribute("disabled"):
+Z.setAttribute("disabled","disabled")});m&&S||Z.setAttribute("disabled","disabled");var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";a=document.createElement("option");a.setAttribute("value","auto");mxUtils.write(a,mxResources.get("automatic"));X.appendChild(a);a=document.createElement("option");a.setAttribute("value","blank");mxUtils.write(a,mxResources.get("openInNewWindow"));X.appendChild(a);a=document.createElement("option");
+a.setAttribute("value","self");mxUtils.write(a,mxResources.get("openInThisWindow"));X.appendChild(a);"svg"==v&&(mxUtils.write(d,mxResources.get("links")+":"),d.appendChild(X),mxUtils.br(d),mxUtils.br(d),g+=26);c=new CustomDialog(this,d,mxUtils.bind(this,function(){this.lastExportBorder=t.value;this.lastExportZoom=q.value;k(q.value,p.checked,!B.checked,x.checked,O.checked,A.checked,t.value,u.checked,!Z.checked,X.value,null!=E?E.checked:null)}),null,c,e);this.showDialog(c.container,340,g,!0,!0,null,
+null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,e,k){var d=document.createElement("div");d.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";d.appendChild(g)}var n=this.addCheckbox(d,mxResources.get("fit"),
+!0),q=this.addCheckbox(d,mxResources.get("shadow"),f.shadowVisible&&e,!e),m=this.addCheckbox(d,c),p=this.addCheckbox(d,mxResources.get("lightbox"),!0),u=this.addEditButton(d,p),t=u.getEditInput(),x=1<f.model.getChildCount(f.model.getRoot()),A=this.addCheckbox(d,mxResources.get("layers"),x,!x);A.style.marginLeft=t.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(p,"change",function(){p.checked?(x&&A.removeAttribute("disabled"),t.removeAttribute("disabled")):
+(A.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"));t.checked&&p.checked?u.getEditSelect().removeAttribute("disabled"):u.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,d,mxUtils.bind(this,function(){a(n.checked,q.checked,m.checked,p.checked,u.getLink(),A.checked)}),null,mxResources.get("embed"),k);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,e,k,l,m,v){function d(d){var b=" ",g="";e&&(b=" 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.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');m('<img src="'+d+'"'+n+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");d(a)}),null,null,null,
-mxUtils.bind(this,function(a){x({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,c,e,n,l,k){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var q=f[g].getAttribute("href");null!=q&&"#"==q.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var m=" ",p="";e&&(m="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.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",e&&(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.drawHost+"/?client=1&lightbox=1"+(n?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),k(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
+mxUtils.bind(this,function(a){v({message:mxResources.get("unknownError")})}),null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";c&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?d("data:image/png;base64,"+n.getText()):v({message:mxResources.get("unknownError")})}))}else v({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,c,e,k,l,m){var d=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!c),f=d.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var n=f[g].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&d.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(d);if(c){var q=" ",p="";e&&(q="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.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(d,mxUtils.bind(this,function(a){m('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+q+"/>")}))}else p="",e&&(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.drawHost+"/?client=1&lightbox=1"+(k?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(d.getAttribute("width")),b=parseInt(d.getAttribute("height")),d.setAttribute("viewBox","-0.5 -0.5 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",d.removeAttribute("height")),""!=p&&d.setAttribute("style",p),this.editor.addFontCss(d),this.editor.graph.mathEnabled&&this.editor.addMathCss(d),m(mxUtils.getXml(d))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-
 a)/1E3);var d=Math.floor(a/31536E3);if(1<d)return d+" "+mxResources.get("years");d=Math.floor(a/2592E3);if(1<d)return d+" "+mxResources.get("months");d=Math.floor(a/86400);if(1<d)return d+" "+mxResources.get("days");d=Math.floor(a/3600);if(1<d)return d+" "+mxResources.get("hours");d=Math.floor(a/60);return 1<d?d+" "+mxResources.get("minutes"):1==d?d+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var d=null;if("diagram"==a.nodeName)d=a;else if("mxfile"==
 a.nodeName){var c=a.getElementsByTagName("diagram");if(0<c.length){var d=c[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?d.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=d&&(a=Editor.parseDiagramNode(d))}c=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(l){}finally{this.editor.graph=c}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){try{var d=this.editor.graph,e=null;if(null!=
 c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
-d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(H){null!=b&&b(H)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(x){null!=
-b&&b(x)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,k,l,m,x){x=null!=x?x:!0;m=b.background;m==mxConstants.NONE&&(m=null);l=b.getSvg(m,null,null,null,null,l);b.shadowVisible&&b.addSvgShadow(l);null!=a&&l.setAttribute("content",a);null!=c&&l.setAttribute("resource",c);if(null!=k)this.embedFonts(l,mxUtils.bind(this,function(a){x?this.convertImages(a,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"tEXt","mxfile",encodeURIComponent(e));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(H){null!=b&&b(H)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)}catch(v){null!=
+b&&b(v)}};EditorUi.prototype.getEmbeddedSvg=function(a,b,c,e,k,l,m,v){v=null!=v?v:!0;m=b.background;m==mxConstants.NONE&&(m=null);l=b.getSvg(m,null,null,null,null,l);b.shadowVisible&&b.addSvgShadow(l);null!=a&&l.setAttribute("content",a);null!=c&&l.setAttribute("resource",c);if(null!=k)this.embedFonts(l,mxUtils.bind(this,function(a){v?this.convertImages(a,mxUtils.bind(this,function(a){k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a))})):k((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(l)};EditorUi.prototype.embedFonts=function(a,b){this.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
-this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(q){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,k,l,m,x,u,p,z){u=null!=u?u:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
-try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,x):null,u,null==this.pages||0==this.pages.length,z)}catch(y){"Invalid image"==y.message?this.downloadFile(u):this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,l,m,p)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
-"g"),"")}var c=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[c[0]],f=1;f<c.length;f++){var g=c[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[d(c[f].substring(0,g))]);a.push('"'+c[f].substring(g))}b(a.join(""))}});if(0<c.length){for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),u=null,p=c[k].indexOf("format(",m);0<p&&(u=d(c[k].substring(p+7,c[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
-a;e++;var d="application/x-font-ttf";if("svg"==u||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==u||"embedded-opentype"==u||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==u||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==u||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==u||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==u||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
-!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(c[k].substring(0,m)),u)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(d){this.editor.resolvedFontCss=d;a()})):a()};EditorUi.prototype.embedExtFonts=
+this.editor.addFontCss(a,this.editor.resolvedFontCss),this.embedExtFonts(mxUtils.bind(this,function(d){try{null!=d&&this.editor.addFontCss(a,d),b(a)}catch(q){b(a)}}))}catch(g){b(a)}}))};EditorUi.prototype.exportImage=function(a,b,c,e,k,l,m,v,y,p,z){y=null!=y?y:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var d=this.editor.graph.isSelectionEmpty();c=null!=c?c:d;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();
+try{this.saveCanvas(a,k?this.getFileData(!0,null,null,null,c,v):null,y,null==this.pages||0==this.pages.length,z)}catch(t){"Invalid image"==t.message?this.downloadFile(y):this.handleError(t)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,e,null,null,l,m,p)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.embedCssFonts=function(a,b){function d(a){return a.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$",
+"g"),"")}var c=a.split("url("),e=0;null==this.cachedFonts&&(this.cachedFonts={});var f=mxUtils.bind(this,function(){if(0==e){for(var a=[c[0]],f=1;f<c.length;f++){var g=c[f].indexOf(")");a.push('url("');a.push(this.cachedFonts[d(c[f].substring(0,g))]);a.push('"'+c[f].substring(g))}b(a.join(""))}});if(0<c.length){for(var k=1;k<c.length;k++){var m=c[k].indexOf(")"),y=null,p=c[k].indexOf("format(",m);0<p&&(y=d(c[k].substring(p+7,c[k].indexOf(")",p))));mxUtils.bind(this,function(a){if(null==this.cachedFonts[a]){this.cachedFonts[a]=
+a;e++;var d="application/x-font-ttf";if("svg"==y||/(\.svg)($|\?)/i.test(a))d="image/svg+xml";else if("otf"==y||"embedded-opentype"==y||/(\.otf)($|\?)/i.test(a))d="application/x-font-opentype";else if("woff"==y||/(\.woff)($|\?)/i.test(a))d="application/font-woff";else if("woff2"==y||/(\.woff2)($|\?)/i.test(a))d="application/font-woff2";else if("eot"==y||/(\.eot)($|\?)/i.test(a))d="application/vnd.ms-fontobject";else if("sfnt"==y||/(\.sfnt)($|\?)/i.test(a))d="application/font-sfnt";var b=a;/^https?:\/\//.test(b)&&
+!this.editor.isCorsEnabledForUrl(b)&&(b=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(b,mxUtils.bind(this,function(d){this.cachedFonts[a]=d;e--;f()}),mxUtils.bind(this,function(a){e--;f()}),!0,null,"data:"+d+";charset=utf-8;base64,")}})(d(c[k].substring(0,m)),y)}f()}else b(a)};EditorUi.prototype.loadFonts=function(a){null!=this.editor.fontCss&&null==this.editor.resolvedFontCss?this.embedCssFonts(this.editor.fontCss,mxUtils.bind(this,function(d){this.editor.resolvedFontCss=d;a()})):a()};EditorUi.prototype.embedExtFonts=
 function(a){var d=this.editor.graph.extFonts;if(null!=d&&0<d.length){var b="",c=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var e=mxUtils.bind(this,function(){0==c&&this.embedCssFonts(b,a)}),l=0;l<d.length;l++)mxUtils.bind(this,function(a,d){0==d.indexOf(Editor.GOOGLE_FONTS)?null==this.cachedGoogleFonts[d]?(c++,this.loadUrl(d,mxUtils.bind(this,function(a){this.cachedGoogleFonts[d]=a;b+=a;c--;e()}),mxUtils.bind(this,function(a){c--;b+="@import url("+d+");";e()}))):b+=this.cachedGoogleFonts[d]:
-b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[l].name,d[l].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,l,m,p,u,t,z,v,C,y,A){try{l=null!=l?l:!0;m=null!=m?m:!0;v=null!=v?v:this.editor.graph;C=null!=C?C:0;var d=u?null:v.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==u&&(d="#ffffff");this.convertImages(v.getSvg(null,null,null,y,null,m,null,null,null,t),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=
-function(){mxClient.IS_SF?window.setTimeout(function(){q.drawImage(e,C/p,C/p);a(g)},0):(q.drawImage(e,C/p,C/p),a(g))},g=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));p=null!=p?p:1;null!=b&&(p=l?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(p*n)+2*C;m=Math.ceil(p*m)+2*C;g.setAttribute("width",n);g.setAttribute("height",m);var q=g.getContext("2d");null!=d&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=d,q.fill());q.scale(p,p);if(A){var z=
-v.view,u=z.scale;z.scale=1;var x=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=u;var x="data:image/svg+xml;base64,"+x,y=v.gridSize*z.gridSteps*p,t=v.getGraphBounds(),B=z.translate.x*u,F=z.translate.y*u,J=B+(t.x-B)/u,H=F+(t.y-F)/u,D=new Image;D.onload=function(){try{for(var a=-Math.round(y-mxUtils.mod((B-J)*p,y)),d=-Math.round(y-mxUtils.mod((F-H)*p,y));a<n;a+=y)for(var b=d;b<m;b+=y)q.drawImage(D,a/p,b/p);f()}catch(L){null!=k&&k(L)}};D.onerror=function(a){null!=k&&k(a)};D.src=
-x}else f()}catch(aa){null!=k&&k(aa)}});e.onerror=function(a){null!=k&&k(a)};t&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(E){null!=k&&k(E)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(O){null!=k&&k(O)}}))}catch(E){null!=
+b+='@font-face {font-family: "'+a+'";src: url("'+d+'");}'})(d[l].name,d[l].url);e()}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,e,k,l,m,v,y,p,z,u,C,t,x){try{l=null!=l?l:!0;m=null!=m?m:!0;u=null!=u?u:this.editor.graph;C=null!=C?C:0;var d=y?null:u.background;d==mxConstants.NONE&&(d=null);null==d&&(d=e);null==d&&0==y&&(d="#ffffff");this.convertImages(u.getSvg(null,null,null,t,null,m,null,null,null,p),mxUtils.bind(this,function(c){try{var e=new Image;e.onload=mxUtils.bind(this,function(){try{var f=
+function(){mxClient.IS_SF?window.setTimeout(function(){q.drawImage(e,C/v,C/v);a(g)},0):(q.drawImage(e,C/v,C/v),a(g))},g=document.createElement("canvas"),n=parseInt(c.getAttribute("width")),m=parseInt(c.getAttribute("height"));v=null!=v?v:1;null!=b&&(v=l?Math.min(1,Math.min(3*b/(4*m),b/n)):b/n);n=Math.ceil(v*n)+2*C;m=Math.ceil(v*m)+2*C;g.setAttribute("width",n);g.setAttribute("height",m);var q=g.getContext("2d");null!=d&&(q.beginPath(),q.rect(0,0,n,m),q.fillStyle=d,q.fill());q.scale(v,v);if(x){var z=
+u.view,y=z.scale;z.scale=1;var t=btoa(unescape(encodeURIComponent(z.createSvgGrid(z.gridColor))));z.scale=y;var t="data:image/svg+xml;base64,"+t,p=u.gridSize*z.gridSteps*v,B=u.getGraphBounds(),F=z.translate.x*y,A=z.translate.y*y,J=F+(B.x-F)/y,H=A+(B.y-A)/y,D=new Image;D.onload=function(){try{for(var a=-Math.round(p-mxUtils.mod((F-J)*v,p)),d=-Math.round(p-mxUtils.mod((A-H)*v,p));a<n;a+=p)for(var b=d;b<m;b+=p)q.drawImage(D,a/v,b/v);f()}catch(L){null!=k&&k(L)}};D.onerror=function(a){null!=k&&k(a)};D.src=
+t}else f()}catch(aa){null!=k&&k(aa)}});e.onerror=function(a){null!=k&&k(a)};p&&this.editor.graph.addSvgShadow(c);this.editor.graph.mathEnabled&&this.editor.addMathCss(c);var f=mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),e.src=this.createSvgDataUri(mxUtils.getXml(c))}catch(E){null!=k&&k(E)}});this.embedExtFonts(mxUtils.bind(this,function(a){try{null!=a&&this.editor.addFontCss(c,a),this.loadFonts(f)}catch(O){null!=k&&k(O)}}))}catch(E){null!=
 k&&k(E)}}),c,z)}catch(J){null!=k&&k(J)}};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert,c=this;a.convert=function(d){if(null!=d){var e="http://"==d.substring(0,7)||"https://"==d.substring(0,8);e&&!navigator.onLine?d=c.svgBrokenImage.src:!e||d.substring(0,a.baseUrl.length)==a.baseUrl||c.crossOriginImages&&c.editor.isCorsEnabledForUrl(d)?"chrome-extension://"==d.substring(0,19)||mxClient.IS_CHROMEAPP||(d=b.apply(this,arguments)):d=PROXY_URL+
 "?url="+encodeURIComponent(d)}return d};return a};EditorUi.prototype.convertImages=function(a,b,c,e){null==e&&(e=this.createImageUrlConverter());var d=0,f=c||{};c=mxUtils.bind(this,function(c,g){for(var l=a.getElementsByTagName(c),k=0;k<l.length;k++)mxUtils.bind(this,function(c){try{if(null!=c){var l=e.convert(c.getAttribute(g));if(null!=l&&"data:"!=l.substring(0,5)){var k=f[l];null==k?(d++,this.convertImageToDataUri(l,function(e){null!=e&&(f[l]=e,c.setAttribute(g,e));d--;0==d&&b(a)})):c.setAttribute(g,
-k)}else null!=l&&c.setAttribute(g,l)}}catch(y){}})(l[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,l,m,p){try{var d=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
+k)}else null!=l&&c.setAttribute(g,l)}}catch(t){}})(l[k])});c("image","xlink:href");c("img","src");0==d&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,e,k,l,m,v){try{var d=!m&&(e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a)||/(\.pdf)($|\?)/i.test(a));k=null!=k?k:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var e=a.getText();if(d){if((9==document.documentMode||10==document.documentMode)&&
 "undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var e=Array(a.length),f=0;f<a.length;f++)e[f]=String.fromCharCode(a[f]);e=e.join("")}l=null!=l?l:"data:image/png;base64,";e=l+this.base64Encode(e)}b(e)}}else null!=c&&(0==a.getStatus()?c({message:mxResources.get("accessDenied")},a):c({message:mxResources.get("error")+" "+a.getStatus()},a))}),function(a){null!=c&&c({message:mxResources.get("error")+" "+a.getStatus()})},d,this.timeout,function(){k&&
-null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},p)});f()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);
-d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(u){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(B){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=
+null!=c&&c({code:App.ERROR_TIMEOUT,retry:f})},v)});f()}catch(z){null!=c&&c(z)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return this.editor.isCorsEnabledForUrl(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){try{var d=!0,c=window.setTimeout(mxUtils.bind(this,function(){d=!1;b(this.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){window.clearTimeout(c);d&&b(this.createSvgDataUri(a.getText()))}),function(){window.clearTimeout(c);
+d&&b(this.svgBrokenImage.src)});else{var e=new Image,f=this;this.crossOriginImages&&(e.crossOrigin="anonymous");e.onload=function(){window.clearTimeout(c);if(d)try{var a=document.createElement("canvas"),g=a.getContext("2d");a.height=e.height;a.width=e.width;g.drawImage(e,0,0);b(a.toDataURL())}catch(y){b(f.svgBrokenImage.src)}};e.onerror=function(){window.clearTimeout(c);d&&b(f.svgBrokenImage.src)};e.src=a}}catch(B){b(this.svgBrokenImage.src)}};EditorUi.prototype.importXml=function(a,b,c,e,k){b=null!=
 b?b:0;c=null!=c?c:0;var d=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){f.model.beginUpdate();try{var g=mxUtils.parseXml(a);a={};var n=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=n&&"mxfile"==n.nodeName&&null!=this.pages){var m=n.getElementsByTagName("diagram");if(1==m.length)n=Editor.parseDiagramNode(m[0]),null!=this.currentPage&&(a[m[0].getAttribute("id")]=this.currentPage.getId());else if(1<m.length){var g=[],q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&
-(a[m[0].getAttribute("id")]=this.pages[0].getId(),n=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var t=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var y=this.pages.length;null==t.getName()&&t.setName(mxResources.get("pageWithNumber",[y+1]));f.model.execute(new ChangePage(this,t,t,y,!0));g.push(t)}this.updatePageLinks(a,g)}}if(null!=n&&"mxGraphModel"===n.nodeName&&(d=f.importGraphModel(n,b,c,e),null!=
+(a[m[0].getAttribute("id")]=this.pages[0].getId(),n=Editor.parseDiagramNode(m[0]),e=!1,q=1);for(;q<m.length;q++){var p=m[q].getAttribute("id");m[q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(m[q]));a[p]=m[q].getAttribute("id");var t=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,u,u,t,!0));g.push(u)}this.updatePageLinks(a,g)}}if(null!=n&&"mxGraphModel"===n.nodeName&&(d=f.importGraphModel(n,b,c,e),null!=
 d))for(q=0;q<d.length;q++)this.updatePageLinksForCell(a,d[q])}finally{f.model.endUpdate()}}}catch(I){if(k)throw I;this.handleError(I)}return d};EditorUi.prototype.updatePageLinks=function(a,b){for(var d=0;d<b.length;d++)this.updatePageLinksForCell(a,b[d].root)};EditorUi.prototype.updatePageLinksForCell=function(a,b){var d=document.createElement("div"),c=this.editor.graph,e=c.getLinkForCell(b);null!=e&&c.setLinkForCell(b,this.updatePageLink(a,e));if(c.isHtmlLabel(b)){d.innerHTML=c.getLabel(b);for(var f=
 d.getElementsByTagName("a"),k=!1,m=0;m<f.length;m++)e=f[m].getAttribute("href"),null!=e&&(f[m].setAttribute("href",this.updatePageLink(a,e)),k=!0);k&&c.labelChanged(b,d.innerHTML)}for(m=0;m<c.model.getChildCount(b);m++)this.updatePageLinksForCell(a,c.model.getChildAt(b,m))};EditorUi.prototype.updatePageLink=function(a,b){if("data:page/id,"==b.substring(0,13)){var d=a[b.substring(b.indexOf(",")+1)];b=null!=d?"data:page/id,"+d:null}else if("data:action/json,"==b.substring(0,17))try{var c=JSON.parse(b.substring(17));
 if(null!=c.actions){for(var e=0;e<c.actions.length;e++){var f=c.actions[e];null!=f.open&&"data:page/id,"==f.open.substring(0,13)&&(d=a[f.open.substring(f.open.indexOf(",")+1)],null!=d?f.open="data:page/id,"+d:delete f.open)}b="data:action/json,"+JSON.stringify(c)}}catch(B){}return b};EditorUi.prototype.isRemoteVisioFormat=function(a){return/(\.v(sd|dx))($|\?)/i.test(a)||/(\.vs(s|x))($|\?)/i.test(a)};EditorUi.prototype.importVisio=function(a,b,c,e){e=null!=e?e:a.name;c=null!=c?c:mxUtils.bind(this,
@@ -3253,187 +3254,188 @@ this.maxTextBytes&&(a=a.substring(0,this.maxTextBytes)+"..."),k.value=a,d.update
 !1;window.openKey="import";if(!b){var c=Editor.useLocalStorage;Editor.useLocalStorage=!a}window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){if(null!=b&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(b)){var d=new Blob([a],{type:"application/octet-stream"});this.importVisio(d,mxUtils.bind(this,function(a){this.importXml(a,0,0,!0)}),null,b)}else this.editor.graph.setSelectionCells(this.importXml(a,0,0,!0))}));
 this.showDialog((new OpenDialog(this)).container,360,220,!0,!0,function(){window.openFile=null});if(!b){var e=this.dialog,f=e.close;this.dialog.close=mxUtils.bind(this,function(a){Editor.useLocalStorage=c;f.apply(e,arguments);a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(a,b,c){var d=this,e=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(a).then(function(e){if(0==Object.keys(e.files).length)c();
 else{var f=0,g,l=!1;e.forEach(function(a,d){var e=d.name.toLowerCase();"diagram/diagram.xml"==e?(l=!0,d.async("string").then(function(a){0==a.indexOf("<mxfile ")?b(a):c()})):0==e.indexOf("versions/")&&(e=parseInt(e.substr(9)),e>f&&(f=e,g=d))});0<f?g.async("string").then(function(e){!d.isOffline()&&(new XMLHttpRequest).upload&&d.isRemoteFileFormat(e,a.name)?d.parseFile(new Blob([e],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?b(a.responseText):
-c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,k,l,m,p,u,t,z){t=null!=t?t:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,t);null!=p&&p(b)});"image"==b.substring(0,5)?(u=!1,"image/png"==
-b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,t),u=!0)),u||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),t&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,k,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=u&&
-null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(u,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=u?u:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=u?(d=!0,this.importZipFile(u,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),
-c,e,!0,null,t);p(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,t));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,l,k;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}l=a.charCodeAt(d++);if(d==
+c())}),a.name):c()}):l||c()}},function(a){c(a)}):c()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.importFile=function(a,b,c,e,k,l,m,p,y,u,z){u=null!=u?u:!0;var d=!1,f=null,g=mxUtils.bind(this,function(a){var b=null;null!=a&&"<mxlibrary"==a.substring(0,10)?this.loadLibrary(new LocalLibrary(this,a,m)):b=this.importXml(a,c,e,u);null!=p&&p(b)});"image"==b.substring(0,5)?(y=!1,"image/png"==
+b.substring(0,9)&&(b=z?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,c,e,u),y=!0)),y||(b=this.editor.graph,z=a.indexOf(";"),0<z&&(a=a.substring(0,z)+a.substring(a.indexOf(",",z+1))),u&&b.isGridEnabled()&&(c=b.snap(c),e=b.snap(e)),f=[b.insertVertex(null,null,"",c,e,k,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";")])):/(\.*<graphml )/.test(a)?(d=!0,this.importGraphML(a,g)):null!=y&&
+null!=m&&(/(\.v(dx|sdx?))($|\?)/i.test(m)||/(\.vs(x|sx?))($|\?)/i.test(m))?(d=!0,this.importVisio(y,g)):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,m)?(d=!0,this.parseFile(null!=y?y:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&(200<=a.status&&299>=a.status?g(a.responseText):null!=p&&p(null))}),m)):0==a.indexOf("PK")&&null!=y?(d=!0,this.importZipFile(y,g,mxUtils.bind(this,function(){f=this.insertTextAt(this.validateFileData(a),
+c,e,!0,null,u);p(f)}))):/(\.v(sd|dx))($|\?)/i.test(m)||/(\.vs(s|x))($|\?)/i.test(m)||(f=this.insertTextAt(this.validateFileData(a),c,e,!0,null,u));d||null==p||p(f);return f};EditorUi.prototype.base64Encode=function(a){for(var b="",d=0,c=a.length,e,l,k;d<c;){e=a.charCodeAt(d++)&255;if(d==c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}l=a.charCodeAt(d++);if(d==
 c){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&15)<<2);b+="=";break}k=a.charCodeAt(d++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(l&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((l&
-15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,l,m,p,u,t,z,v){e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){g=!0;break}var x=mxUtils.bind(this,function(){var g=this.editor.graph,
-n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,l,k,n){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,k,n,d,v)}catch(aa){return this.handleError(aa),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,u=q,x=[],y=mxUtils.bind(this,function(a,b){x[a]=b;if(0==--u){this.spinner.stop();
-if(null!=p)p(x);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<x.length;c++){var e=x[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}l(d)}}),B=0;B<q;B++)mxUtils.bind(this,function(d){var l=a[d];if(null!=l){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var q=a.target.result,p=q.indexOf(","),u=decodeURIComponent(escape(atob(q.substring(p+1)))),x=mxUtils.parseXml(u),u=
-x.getElementsByTagName("svg");if(0<u.length){var u=u[0],B=v?null:u.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?y(d,mxUtils.bind(this,function(){try{if(q.substring(0,p+1),null!=x){var a=x.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),u=f.getAttribute("height"),
-m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,u=null!=u&&"%"!=u.charAt(u.length-1)?parseFloat(u):NaN,z=f.getAttribute("viewBox");if(null==z||0==z.length)f.setAttribute("viewBox","0 0 "+m+" "+u);else if(isNaN(m)||isNaN(u)){var t=z.split(" ");3<t.length&&(m=parseFloat(t[2]),u=parseFloat(t[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var y=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,u)),B=k(q,l.type,b+d*n,c+d*n,Math.max(1,Math.round(m*y)),Math.max(1,Math.round(u*y)),l.name);if(isNaN(m)||
-isNaN(u)){var v=new Image;v.onload=mxUtils.bind(this,function(){m=Math.max(1,v.width);u=Math.max(1,v.height);B[0].geometry.width=m;B[0].geometry.height=u;f.setAttribute("viewBox","0 0 "+m+" "+u);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[B[0]])});v.src=this.createSvgDataUri(mxUtils.getXml(f))}return B}}}catch(ea){}return null})):y(d,mxUtils.bind(this,function(){return k(B,"text/xml",b+d*n,c+d*
-n,0,0,l.name)}))}else y(d,mxUtils.bind(this,function(){return null}))}else{u=!1;if("image/png"==l.type){var C=v?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var E=new Image;E.src=a.target.result;y(d,mxUtils.bind(this,function(){return k(C,"text/xml",b+d*n,c+d*n,E.width,E.height,l.name)}));u=!0}}u||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){y(d,mxUtils.bind(this,function(){if(null!=g&&g.length<t){var p=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/m,e/q)):1;return k(g,l.type,b+d*n,c+d*n,Math.round(m*p),Math.round(q*p),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=a.target.result,k(q,l.type,b+d*n,c+d*n,240,160,l.name,function(a){y(d,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?k(null,l.type,b+d*n,c+d*n,240,160,l.name,function(a){y(d,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?q.readAsDataURL(l):q.readAsText(l)}})(B)});if(g){g=[];
-for(q=0;q<a.length;q++)g.push(a[q]);a=g;this.confirmImageResize(function(a){f=a;x()},u)}else x()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
+15)<<2|(k&192)>>6);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,e,k,l,m,p,y,u,z,x){e=null!=e?e:this.maxImageSize;u=null!=u?u:this.maxImageBytes;var d=null!=b&&null!=c,f=!0;b=null!=b?b:0;c=null!=c?c:0;var g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=z||this.resampleThreshold,q=0;q<a.length;q++)if("image/"==a[q].type.substring(0,6)&&a[q].size>n){g=!0;break}var v=mxUtils.bind(this,function(){var g=this.editor.graph,
+n=g.gridSize;k=null!=k?k:mxUtils.bind(this,function(a,b,c,e,f,g,l,k,m){try{return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,l)),null):this.importFile(a,b,c,e,f,g,l,k,m,d,x)}catch(aa){return this.handleError(aa),null}});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=a.length,t=q,y=[],v=mxUtils.bind(this,function(a,b){y[a]=b;if(0==--t){this.spinner.stop();
+if(null!=p)p(y);else{var d=[];g.getModel().beginUpdate();try{for(var c=0;c<y.length;c++){var e=y[c]();null!=e&&(d=d.concat(e))}}finally{g.getModel().endUpdate()}}l(d)}}),B=0;B<q;B++)mxUtils.bind(this,function(d){var l=a[d];if(null!=l){var q=new FileReader;q.onload=mxUtils.bind(this,function(a){if(null==m||m(l))if("image/"==l.type.substring(0,6))if("image/svg"==l.type.substring(0,9)){var q=a.target.result,t=q.indexOf(","),p=decodeURIComponent(escape(atob(q.substring(t+1)))),y=mxUtils.parseXml(p),p=
+y.getElementsByTagName("svg");if(0<p.length){var p=p[0],B=x?null:p.getAttribute("content");null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(B,!0)));null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B));null==B||"<mxfile "!==B.substring(0,8)&&"<mxGraphModel "!==B.substring(0,14)?v(d,mxUtils.bind(this,function(){try{if(q.substring(0,t+1),null!=y){var a=y.getElementsByTagName("svg");if(0<a.length){var f=a[0],m=f.getAttribute("width"),p=f.getAttribute("height"),
+m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN,p=null!=p&&"%"!=p.charAt(p.length-1)?parseFloat(p):NaN,z=f.getAttribute("viewBox");if(null==z||0==z.length)f.setAttribute("viewBox","0 0 "+m+" "+p);else if(isNaN(m)||isNaN(p)){var u=z.split(" ");3<u.length&&(m=parseFloat(u[2]),p=parseFloat(u[3]))}q=this.createSvgDataUri(mxUtils.getXml(f));var v=Math.min(1,Math.min(e/Math.max(1,m)),e/Math.max(1,p)),B=k(q,l.type,b+d*n,c+d*n,Math.max(1,Math.round(m*v)),Math.max(1,Math.round(p*v)),l.name);if(isNaN(m)||
+isNaN(p)){var C=new Image;C.onload=mxUtils.bind(this,function(){m=Math.max(1,C.width);p=Math.max(1,C.height);B[0].geometry.width=m;B[0].geometry.height=p;f.setAttribute("viewBox","0 0 "+m+" "+p);q=this.createSvgDataUri(mxUtils.getXml(f));var a=q.indexOf(";");0<a&&(q=q.substring(0,a)+q.substring(q.indexOf(",",a+1)));g.setCellStyles("image",q,[B[0]])});C.src=this.createSvgDataUri(mxUtils.getXml(f))}return B}}}catch(ea){}return null})):v(d,mxUtils.bind(this,function(){return k(B,"text/xml",b+d*n,c+d*
+n,0,0,l.name)}))}else v(d,mxUtils.bind(this,function(){return null}))}else{p=!1;if("image/png"==l.type){var C=x?null:this.extractGraphModelFromPng(a.target.result);if(null!=C&&0<C.length){var E=new Image;E.src=a.target.result;v(d,mxUtils.bind(this,function(){return k(C,"text/xml",b+d*n,c+d*n,E.width,E.height,l.name)}));p=!0}}p||(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(a.target.result,mxUtils.bind(this,function(g){this.resizeImage(g,a.target.result,mxUtils.bind(this,function(g,m,q){v(d,mxUtils.bind(this,function(){if(null!=g&&g.length<u){var t=f&&this.isResampleImage(a.target.result,z)?Math.min(1,Math.min(e/m,e/q)):1;return k(g,l.type,b+d*n,c+d*n,Math.round(m*t),Math.round(q*t),l.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),f,e,z)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else q=a.target.result,k(q,l.type,b+d*n,c+d*n,240,160,l.name,function(a){v(d,function(){return a})},l)});/(\.v(dx|sdx?))($|\?)/i.test(l.name)||/(\.vs(x|sx?))($|\?)/i.test(l.name)?k(null,l.type,b+d*n,c+d*n,240,160,l.name,function(a){v(d,function(){return a})},l):"image"==l.type.substring(0,5)||"application/pdf"==l.type?q.readAsDataURL(l):q.readAsText(l)}})(B)});if(g){g=[];
+for(q=0;q<a.length;q++)g.push(a[q]);a=g;this.confirmImageResize(function(a){f=a;v()},y)}else v()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},c=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(c,e){if(c||b)mxSettings.setResizeImages(c?e:null),mxSettings.save();d();a(e)};null==c||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),
 function(a){e(a,!0)},function(a){e(a,!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):e(!1,c)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",
-OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,l){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(d/k,f/k);if(1<g){var n=Math.round(d/g),m=Math.round(f/g),q=document.createElement("canvas");
-q.width=n;q.height=m;q.getContext("2d").drawImage(a,0,0,n,m);var p=q.toDataURL();if(p.length<b.length){var t=document.createElement("canvas");t.width=n;t.height=m;var v=t.toDataURL();p!==v&&(b=p,d=n,f=m)}}}catch(M){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var k=c,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[c]=k;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a};
-EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=n;n+=b;return a.substring(d,n)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+
-1);a=window.atob?atob(a):Base64.decode(a,!0);var n=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,n);do{var m=f(a);if("IDAT"==d(a,4)){k=a.substring(0,n-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=g(c.length)+
-b+c+g(e^4294967295);k+=a.substring(n-8,a.length);break}k+=a.substring(n-8,n-4+m);d(a,m);d(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(n){if(null!=c)c(n);else throw n;
+OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d);try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+a.size})}catch(l){}};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,e,k,l){k=null!=k?k:this.maxImageSize;var d=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(d/k,f/k);if(1<g){var m=Math.round(d/g),n=Math.round(f/g),q=document.createElement("canvas");
+q.width=m;q.height=n;q.getContext("2d").drawImage(a,0,0,m,n);var p=q.toDataURL();if(p.length<b.length){var t=document.createElement("canvas");t.width=m;t.height=n;var u=t.toDataURL();p!==u&&(b=p,d=m,f=n)}}}catch(M){}c(b,d,f)};EditorUi.prototype.crcTable=[];for(var c=0;256>c;c++)for(var k=c,m=0;8>m;m++)k=1==(k&1)?3988292384^k>>>1:k>>>1,EditorUi.prototype.crcTable[c]=k;EditorUi.prototype.updateCRC=function(a,b,c,e){for(var d=0;d<e;d++)a=EditorUi.prototype.crcTable[(a^b.charCodeAt(c+d))&255]^a>>>8;return a};
+EditorUi.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,e,k){function d(a,b){var d=m;m+=b;return a.substring(d,m)}function f(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+
+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(d(a,4),"IHDR"!=d(a,4))null!=k&&k();else{d(a,17);k=a.substring(0,m);do{var n=f(a);if("IDAT"==d(a,4)){k=a.substring(0,m-8);"pHYs"==b&&"dpi"==c?(c=Math.round(e/.0254),c=g(c)+g(c)+String.fromCharCode(1)):c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,c,0,c.length);k+=g(c.length)+
+b+c+g(e^4294967295);k+=a.substring(m-8,a.length);break}k+=a.substring(m-8,m-4+n);d(a,n);d(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(k):Base64.encode(k,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){return Editor.extractGraphModelFromPng(a)};EditorUi.prototype.loadImage=function(a,b,c){try{var d=new Image;d.onload=function(){d.width=0<d.width?d.width:120;d.height=0<d.height?d.height:120;b(d)};null!=c&&(d.onerror=c);d.src=a}catch(n){if(null!=c)c(n);else throw n;
 }};var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,b=this.editor.graph;b.cellEditor.editPlantUmlData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("plantUml")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generatePlantUmlImage(c,f.format,
 function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{if("txt"==f.format)b.labelChanged(d,"<pre>"+e+"</pre>"),b.updateCellSize(d,!0);else{b.setCellStyles("image",a.convertDataUri(e),[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=g,k.height=l,b.cellsResized([d],[k],!1))}b.setAttributeForCell(d,"plantUmlData",JSON.stringify({data:c,format:f.format}))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);
 c.init()};b.cellEditor.editMermaidData=function(d,c,e){var f=JSON.parse(e);c=new TextareaDialog(a,mxResources.get("mermaid")+":",f.data,function(c){null!=c&&a.spinner.spin(document.body,mxResources.get("inserting"))&&a.generateMermaidImage(c,f.config,function(e,g,l){a.spinner.stop();b.getModel().beginUpdate();try{b.setCellStyles("image",e,[d]);var k=b.model.getGeometry(d);null!=k&&(k=k.clone(),k.width=Math.max(k.width,g),k.height=Math.max(k.height,l),b.cellsResized([d],[k],!1));b.setAttributeForCell(d,
 "mermaidData",JSON.stringify({data:c,config:f.config},null,2))}finally{b.getModel().endUpdate()}},function(b){a.handleError(b)})},null,null,400,220);a.showDialog(c.container,420,300,!0,!0);c.init()};var c=b.cellEditor.startEditing;b.cellEditor.startEditing=function(b,d){try{var e=this.graph.getAttributeForCell(b,"plantUmlData");null!=e?this.editPlantUmlData(b,d,e):(e=this.graph.getAttributeForCell(b,"mermaidData"),null!=e?this.editMermaidData(b,d,e):c.apply(this,arguments))}catch(M){a.handleError(M)}};
 b.getLinkTitle=function(b){return a.getLinkTitle(b)};b.customLinkClicked=function(b){var d=!1;try{a.handleCustomLink(b),d=!0}catch(I){a.handleError(I)}return d};var e=this.clearDefaultStyle;this.clearDefaultStyle=function(){e.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://desk.draw.io/support/solutions/articles/16000051979");var k=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=
 a.pages&&null!=a.currentPage)for(var d=0;d<a.pages.length;d++)if(a.pages[d]==a.currentPage){0<d&&(b+=(0<b.length?"&":"?")+"page="+d);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return k.apply(this,arguments)};var l=b.addClickHandler;b.addClickHandler=function(a,d,c){var e=d;d=function(a,d){if(null==d){var c=mxEvent.getSource(a);"a"==c.nodeName.toLowerCase()&&(d=c.getAttribute("href"))}null!=d&&b.isCustomLink(d)&&(mxEvent.isTouchEvent(a)||!mxEvent.isPopupTrigger(a))&&b.customLinkClicked(d)&&
-mxEvent.consume(a);null!=e&&e(a,d)};l.call(this,a,d,c)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments);b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=
-a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var t=b.getGlobalVariable;b.getGlobalVariable=function(b){return"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?a.pages.length:1:t.apply(this,arguments)};var u=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");
-if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))u.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();
-this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=
-mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(v=this.editor.graph.view,v.setUnit(mxSettings.getUnit()),v.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.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,v.unit),this.refresh());if("1"==urlParams.styledev){v=document.getElementById("geFooter");null!=v&&(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)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||
-"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),
-A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),
-c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,
-f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var n=null,c=d.getElementsByTagName("img");null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(n=!0)):(c=d.getElementsByTagName("a"),null!=c&&1==c.length?k=c[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(k=mxUtils.getTextContent(d[0]))));var m=!0,q=mxUtils.bind(this,
-function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,n,null,m))});n&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;q()},mxEvent.isControlDown(a)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",
-mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var k=f[index];if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=
-this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(u){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML="&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck",
-"false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,
-null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),
-e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,
-"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c,!0),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),
-mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:k.apply(this,arguments)}};EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==
-a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=
-function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){var d=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();
-this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,
-b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(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.copyCells=
-function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=
-a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),
-null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&
-(f=f.substring(0,k+3))}catch(C){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(C){}try{var p=this.editor.graph;if(null!=f&&0<f.length){p.lastPasteXml==f?p.pasteCounter++:(p.lastPasteXml=f,p.pasteCounter=0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(f))p.setSelectionCells(this.importXml(f,z,z));else{var t=p.getInsertPoint();p.isMouseInsertPoint()&&
-(z=0,p.lastPasteXml==f&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(f,t.x+z,t.y+z,!0))}p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||(p.lastPasteXml=null,p.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],
-"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||
-"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,
-"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?
-(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var l=document.documentElement;c=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=d+"px";l.style.width=
-Math.max(0,c-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=
-function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":
-e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,
-mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,
-e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(z){this.handleError(z)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);
-window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
-a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?
-this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=
-function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");
-a||(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))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&
-this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();
-window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,
-pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,c=!1,e=null,l=mxUtils.bind(this,function(a,b){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,
-l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&
-(a=Graph.decompress(a)))}catch(ia){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(ba){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("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?
-mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),
-mxUtils.bind(this,function(){this.hideDialog();k.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();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(ba){k.postMessage(JSON.stringify({event:"draft",
-error:ba.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,
-function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,
-!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var x=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:x,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 v=
-null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,v):this.spinner.stop();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 B=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=this.editor.graph,E=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();
-var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(B);k.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(B)));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);E(a)}),S=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=
-S){for(var Z=A.getGlobalVariable,A=this.createTemporaryGraph(A.getStylesheet()),X,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==S){X=this.updatePageRoot(this.pages[G]);break}A.getGlobalVariable=function(a){return"page"==a?X.getName():"pagenumber"==a?1:Z.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=A.model,ga=T.getChildCells(T.getRoot()),m={},G=0;G<g.layerIds.length;G++)m[g.layerIds[G]]=!0;for(G=0;G<ga.length;G++)T.setVisible(ga[G],
-m[ga[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,g.scale,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(B))).send(mxUtils.bind(this,function(a){200<=
-a.getStatus()&&299>=a.getStatus()?E("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);v=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();v.xml=mxUtils.getXml(ja);v.data=this.getFileData(null,null,!0,null,null,null,ja);v.format=g.format}else if("html"==g.format)B=this.editor.getGraphXml(),
-v.data=this.getHtml(B,this.editor.graph),v.xml=mxUtils.getXml(B),v.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var U=this.editor.graph.background;U==mxConstants.NONE&&(U=null);v.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);v.format="svg";var ha=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();v.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(v),"*")});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(v.xml,this.editor.graph,null,!0,ha,null,null,g.embedImages);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);var Y=this.editor.graph.getSvg(U);this.embedFonts(Y,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ha(mxUtils.getXml(a))})):ha(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(v),
-"*")}return}if("load"==g.action)c=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.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight=
-"38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",
-data:JSON.stringify(g)}),"*");return}}catch(ba){this.handleError(ba)}}var W=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ca){this.handleError(ca)}d=!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=
-c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",
-b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){W(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),
-l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&W(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){W(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):
-(g=l(g),W(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?
-(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),
-mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight=
-"20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),
-this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-
-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,p=null,t=null,z=null,v=null,A=null,y=null,I=null,M="",J="auto",N="auto",D=null,E=null,O=40,S=40,Z=100,X=0,G=this.editor.graph;G.getGraphBounds();for(var T=function(){null!=b?b(oa):(G.setSelectionCells(oa),G.scrollCellToVisible(G.getSelectionCell()))},ga=G.getFreeInsertPoint(),ja=ga.x,U=ga.y,ga=U,ha=null,Y="auto",I=null,W=[],ba=null,ia=null,aa=0;aa<d.length&&"#"==d[aa].charAt(0);){a=
-d[aa];for(aa++;aa<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var ca=a.indexOf(":");if(0<ca){var P=mxUtils.trim(a.substring(1,ca)),L=mxUtils.trim(a.substring(ca+1));"label"==P?ha=G.sanitizeHtml(L):"labelname"==P&&0<L.length&&"-"!=L?z=L:"labels"==P&&0<L.length&&"-"!=L?v=JSON.parse(L):"style"==P?m=L:"parentstyle"==P?A=L:"stylename"==P&&0<L.length&&"-"!=L?t=L:"styles"==P&&0<L.length&&"-"!=L?p=JSON.parse(L):
-"identity"==P&&0<L.length&&"-"!=L?y=L:"parent"==P&&0<L.length&&"-"!=L?I=L:"namespace"==P&&0<L.length&&"-"!=L?M=L:"width"==P?J=L:"height"==P?N=L:"left"==P&&0<L.length?D=L:"top"==P&&0<L.length?E=L:"ignore"==P?ia=L.split(","):"connect"==P?W.push(JSON.parse(L)):"link"==P?ba=L:"padding"==P?X=parseFloat(L):"edgespacing"==P?O=parseFloat(L):"nodespacing"==P?S=parseFloat(L):"levelspacing"==P?Z=parseFloat(L):"layout"==P&&(Y=L)}}}if(null==d[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ka=
-this.editor.csvToArray(d[aa]),P=ca=null,L=[],Q=0;Q<ka.length;Q++)y==ka[Q]&&(ca=Q),I==ka[Q]&&(P=Q),L.push(mxUtils.trim(ka[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ha&&(ha="%"+L[0]+"%");if(null!=W)for(var R=0;R<W.length;R++)null==k[W[R].to]&&(k[W[R].to]={});y=[];for(Q=aa+1;Q<d.length;Q++){var da=this.editor.csvToArray(d[Q]);if(null==da){var pa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(pa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<
-da.length&&y.push(da)}G.model.beginUpdate();try{for(Q=0;Q<y.length;Q++){var da=y[Q],K=null,ma=null!=ca?M+da[ca]:null;null!=ma&&(K=G.model.getCell(ma));var d=null!=K,ea=new mxCell(ha,new mxGeometry(ja,ga,0,0),m||"whiteSpace=wrap;html=1;");ea.vertex=!0;ea.id=ma;for(var fa=0;fa<da.length;fa++)G.setAttributeForCell(ea,L[fa],da[fa]);if(null!=z&&null!=v){var ya=v[ea.getAttribute(z)];null!=ya&&G.labelChanged(ea,ya)}if(null!=t&&null!=p){var za=p[ea.getAttribute(t)];null!=za&&(ea.style=za)}G.setAttributeForCell(ea,
-"placeholders","1");ea.style=G.replacePlaceholders(ea,ea.style);d&&(G.model.setGeometry(K,ea.geometry),G.model.setStyle(K,ea.style),0>mxUtils.indexOf(e,K)&&e.push(K));K=ea;if(!d)for(R=0;R<W.length;R++)k[W[R].to][K.getAttribute(W[R].to)]=K;null!=ba&&"link"!=ba&&(G.setLinkForCell(K,K.getAttribute(ba)),G.setAttributeForCell(K,ba,null));G.fireEvent(new mxEventObject("cellsInserted","cells",[K]));var Ca=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=D&&null!=K.getAttribute(D)&&(K.geometry.x=
-ja+parseFloat(K.getAttribute(D))),null!=E&&null!=K.getAttribute(E)&&(K.geometry.y=U+parseFloat(K.getAttribute(E))),"@"==J.charAt(0)&&null!=K.getAttribute(J.substring(1))?K.geometry.width=parseFloat(K.getAttribute(J.substring(1))):K.geometry.width="auto"==J?Ca.width+X:parseFloat(J),"@"==N.charAt(0)&&null!=K.getAttribute(N.substring(1))?K.geometry.height=parseFloat(K.getAttribute(N.substring(1))):K.geometry.height="auto"==N?Ca.height+X:parseFloat(N),ga+=K.geometry.height+S);d?(null==f[ma]&&(f[ma]=[]),
-f[ma].push(K)):(I=null!=P?G.model.getCell(M+da[P]):null,c.push(K),null!=I?(I.style=G.replacePlaceholders(I,A),G.addCell(K,I)):e.push(G.addCell(K)))}for(var ra=e.slice(),oa=e.slice(),R=0;R<W.length;R++)for(var ta=W[R],Q=0;Q<c.length;Q++){var K=c[Q],ua=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(G.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||
-"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?G.replacePlaceholders(l,d.style):G.createCurrentEdgeStyle();oa.push(G.insertEdge(null,null,g||"",d.invert?f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ua(K,K,ta);if(null!=f[K.id])for(fa=0;fa<f[K.id].length;fa++)ua(K,f[K.id][fa],ta)}if(null!=ia)for(Q=0;Q<c.length;Q++)for(K=c[Q],fa=0;fa<ia.length;fa++)G.setAttributeForCell(K,mxUtils.trim(ia[fa]),null);if(0<
-e.length){var la=new mxParallelEdgeLayout(G);la.spacing=O;var Aa=function(){0<la.spacing&&la.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));b.y=Math.round(G.snap(b.y));"auto"==J&&(b.width=Math.round(G.snap(b.width)));"auto"==N&&(b.height=Math.round(G.snap(b.height)))}};if("["==Y.charAt(0)){var Da=T;G.view.validate();this.executeLayoutList(JSON.parse(Y),function(){Aa();Da()});T=null}else if("circle"==Y){var na=new mxCircleLayout(G);
-na.resetEdges=!1;var La=na.isVertexIgnored;na.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(G.getDefaultParent());Aa()},!0,T);T=null}else if("horizontaltree"==Y||"verticaltree"==Y||"auto"==Y&&oa.length==2*e.length-1&&1==ra.length){G.view.validate();var Ba=new mxCompactTreeLayout(G,"horizontaltree"==Y);Ba.levelDistance=S;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(G.getDefaultParent(),0<
-ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ra.length){G.view.validate();var wa=new mxHierarchicalLayout(G,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=S;wa.parallelEdgeSpacing=O;wa.interRankCellSpacing=Z;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(G.getDefaultParent(),oa);G.moveCells(oa,ja,U)},!0,T);T=null}else if("organic"==Y||"auto"==Y&&oa.length>e.length){G.view.validate();
-var xa=new mxFastOrganicLayout(G);xa.forceConstant=3*S;xa.resetEdges=!1;var Ma=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Ma.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(G);la.spacing=O;this.executeLayout(function(){xa.execute(G.getDefaultParent());Aa()},!0,T);T=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=T&&T()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&
-null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&
-(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var t=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=t.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=
-this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*
-a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,
-8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||
-d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.gitLab||d++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);
-var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||
-null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&
-this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};
-var v=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){v.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);
-this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&
-(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=c&&c.isRenamable()||
-"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,l,m){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*k/d.view.scale),p=Math.floor(g.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),
-"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,
-!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);
-return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxUtils.htmlEntities(a));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(c);var e=document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';
-var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));l[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];l[c.id]&&
-(b[c.id]=c);var f=this.addCheckbox(e,c.title,l[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==l[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));
-for(d in l)b[d]||this.closeLibrary(new RemoteLibrary(this,null,l[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=a.msgMarkers,d=this.remoteInvokeCallbacks[b.callbackId];if(null==d)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?d.error&&d.error(a.error.errResp):
-d.callback&&d.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",
-funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var d=mxUtils.bind(this,function(b,d){var c={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=d?c.error={errResp:d}:null!=b&&(c.resp=b);this.remoteWin.postMessage(JSON.stringify(c),"*")});try{var c=a.funtionName,e=this.remoteInvokableFns[c];if(null!=e&&"function"===typeof this[c]){if(e.allowedDomains){for(var f=
-!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+c+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){d(Array.prototype.slice.apply(arguments))}),m.push(function(a){d(null,a||"Unkown Error")}),this[c].apply(this,m);else{var p=this[c].apply(this,m);d([p])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(H){d(null,"Invalid Call: An error occured, "+H.message)}};EditorUi.prototype.openDatabase=
-function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=!0)};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&
-(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src","https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml?b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}}),m=mxUtils.bind(this,
-function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}});a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var n=JSON.parse(a.data);"init"==n.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=n.event||c||(d?null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?(e=n.resp[0],d=!1,k()):g():null!=n.resp&&0<n.resp.length&&null!=n.resp[0]?m(n.resp[0]):l())}}catch(E){try{f=JSON.stringify(f)}catch(O){}EditorUi.logError("Migration Caught: "+E.message+(0<=E.message.indexOf("JSON")?" >> "+f:""),null,null,null,E,"INFO")}});window.addEventListener("message",a)}})));a(d);d.onversionchange=function(){d.close()}});c.onerror=b;c.onblocked=
-function(){}}catch(n){null!=b&&b(n)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(x){null!=e&&e(x)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,
-function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(B){null!=c&&c(B)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,
-function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),b.target.result["continue"]())};e.onerror=b}catch(B){null!=b&&b(B)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};
-e.onerror=b}catch(l){null!=b&&b(l)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile();null!=d?d.getComments(a,b):
-a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();return null!=d?d.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),
-!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!=d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=
-function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===
-e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null;var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(a,b,e,c,k,m){function p(){for(var a=u.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==u&&b++;H.style.display=0==b?"block":"none"}function t(a,b,d,c){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}l={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
+mxEvent.consume(a);null!=e&&e(a,d)};l.call(this,a,d,c)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(b.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?450:370,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var m=b.getExportVariables;b.getExportVariables=function(){var b=m.apply(this,arguments),d=a.getCurrentFile();null!=d&&(b.filename=d.getTitle());
+b.pagecount=null!=a.pages?a.pages.length:1;b.page=null!=a.currentPage?a.currentPage.getName():"";b.pagenumber=null!=a.pages&&null!=a.currentPage?mxUtils.indexOf(a.pages,a.currentPage)+1:1;return b};var u=b.getGlobalVariable;b.getGlobalVariable=function(b){var d=a.getCurrentFile();return"filename"==b&&null!=d?d.getTitle():"page"==b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:"pagecount"==b?null!=a.pages?
+a.pages.length:1:u.apply(this,arguments)};var y=b.labelLinkClicked;b.labelLinkClicked=function(a,d,c){var e=d.getAttribute("href");if(null==e||!b.isCustomLink(e)||!mxEvent.isTouchEvent(c)&&mxEvent.isPopupTrigger(c))y.apply(this,arguments);else{if(!b.isEnabled()||null!=a&&b.isCellLocked(a.cell))b.customLinkClicked(e),b.getRubberband().reset();mxEvent.consume(c)}};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,d=a.getCurrentFile();null!=d&&(b=null!=d.getTitle()?d.getTitle():b);return b};
+var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"find"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",
+!0),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(this.altShiftActions[83]="synchronize"),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,d=b.cellEditor.text2,c=null;null!=d&&(mxEvent.addListener(d,"dragleave",
+function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=this.highlightElement(d));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,d,c,e,
+f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var d=a.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)?this.loadImage(decodeURIComponent(d),mxUtils.bind(this,function(a){var c=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,c)),e/Math.max(1,
+a));b.insertImage(decodeURIComponent(d),c*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));"undefined"!==typeof window.mxSettings&&(x=this.editor.graph.view,
+x.setUnit(mxSettings.getUnit()),x.addListener("unitChanged",function(a,b){mxSettings.setUnit(b.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,x.unit),this.refresh());if("1"==urlParams.styledev){x=document.getElementById("geFooter");null!=x&&(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)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
+function(a,b){if(0<this.editor.graph.getSelectionCount()){var d=this.editor.graph.getSelectionCell(),d=this.editor.graph.getModel().getStyle(d);this.styleInput.value=d||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var z=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:z.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&(!this.editor.chromeless||
+this.editor.editable)){var A=null;mxEvent.addListener(b.container,"dragleave",function(a){b.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(b.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(b.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(b.container,"drop",mxUtils.bind(this,
+function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(b.isEnabled()){var d=mxUtils.convertPoint(b.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=b.view.translate,e=b.view.scale,f=d.x/e-c.x,g=d.y/e-c.y;if(0<a.dataTransfer.files.length)mxEvent.isAltDown(a)&&(g=f=null),this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{mxEvent.isAltDown(a)&&(g=f=0);var l=0<=mxUtils.indexOf(a.dataTransfer.types,
+"text/uri-list")?a.dataTransfer.getData("text/uri-list"):null,d=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=d)b.setSelectionCells(this.importXml(d,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),d=document.createElement("div");d.innerHTML=k;var m=null,c=d.getElementsByTagName("img");null!=c&&1==c.length?(k=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(m=!0)):(c=d.getElementsByTagName("a"),null!=
+c&&1==c.length?k=c[0].getAttribute("href"):(d=d.getElementsByTagName("pre"),null!=d&&1==d.length&&(k=mxUtils.getTextContent(d[0]))));var n=!0,q=mxUtils.bind(this,function(){b.setSelectionCells(this.insertTextAt(k,f,g,!0,m,null,n))});m&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;q()},mxEvent.isControlDown(a)):q()}else null!=l&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)?this.loadImage(decodeURIComponent(l),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,
+a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,d)),c/Math.max(1,a));b.setSelectionCell(b.insertVertex(null,null,"",f,g,d*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+l+";"))}),mxUtils.bind(this,function(a){b.setSelectionCells(this.insertTextAt(l,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&b.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();
+a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var a=this.editor.graph;a.container.addEventListener("paste",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b))try{for(var d=b.clipboardData||b.originalEvent.clipboardData,c=!1,e=0;e<d.types.length;e++)if("text/"===d.types[e].substring(0,5)){c=!0;break}if(!c){var f=d.items;for(index in f){var k=f[index];
+if("file"===k.kind){if(a.isEditing())this.importFiles([k.getAsFile()],0,0,this.maxImageSize,function(b,d,c,e,f,g){a.insertImage(b,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});else{var m=this.editor.graph.getInsertPoint();this.importFiles([k.getAsFile()],m.x,m.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(y){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function a(){window.setTimeout(function(){c.innerHTML=
+"&nbsp;";c.focus();document.execCommand("selectAll",!1,null)},0)}var b=this.editor.graph,c=document.createElement("div");c.setAttribute("autocomplete","off");c.setAttribute("autocorrect","off");c.setAttribute("autocapitalize","off");c.setAttribute("spellcheck","false");c.style.textRendering="optimizeSpeed";c.style.fontFamily="monospace";c.style.wordBreak="break-all";c.style.background="transparent";c.style.color="transparent";c.style.position="absolute";c.style.whiteSpace="nowrap";c.style.overflow=
+"hidden";c.style.display="block";c.style.fontSize="1";c.style.zIndex="-1";c.style.resize="none";c.style.outline="none";c.style.width="1px";c.style.height="1px";mxUtils.setOpacity(c,0);c.contentEditable=!0;c.innerHTML="&nbsp;";var e=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var d=mxEvent.getSource(a);null==b.container||!b.isEnabled()||b.isMouseDown||
+b.isEditing()||null!=this.dialog||"INPUT"==d.nodeName||"TEXTAREA"==d.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||e||(c.style.left=b.container.scrollLeft+10+"px",c.style.top=b.container.scrollTop+10+"px",b.container.appendChild(c),e=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){c.focus();document.execCommand("selectAll",!1,null)},0):(c.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,
+function(a){var d=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!e||224!=d&&17!=d&&91!=d||(e=!1,b.isEditing()||null!=this.dialog||null==b.container||b.container.focus(),c.parentNode.removeChild(c),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(c,"copy",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),this.copyCells(c),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"cut",mxUtils.bind(this,function(d){if(b.isEnabled())try{mxClipboard.copy(b),
+this.copyCells(c,!0),a()}catch(B){this.handleError(B)}}));mxEvent.addListener(c,"paste",mxUtils.bind(this,function(a){b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&((new Date).getTime(),c.innerHTML="&nbsp;",c.focus(),null!=a.clipboardData&&this.pasteCells(a,c,!0),mxEvent.isConsumed(a)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,c,!1)}),0))}),!0);var k=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==c?!0:k.apply(this,arguments)}};
+EditorUi.prototype.getLinkTitle=function(a){var b=Graph.prototype.getLinkTitle.apply(this,arguments);if("data:page/id,"==a.substring(0,13)){var d=a.indexOf(",");0<d&&(b=this.getPageById(a.substring(d+1)),b=null!=b?b.getName():mxResources.get("pageNotFound"))}else"data:"==a.substring(0,5)&&(b=mxResources.get("action"));return b};EditorUi.prototype.handleCustomLink=function(a){if("data:page/id,"==a.substring(0,13)){var b=a.indexOf(",");if(a=this.getPageById(a.substring(b+1)))this.selectPage(a);else throw Error(mxResources.get("pageNotFound")||
+"Page not found");}else this.editor.graph.handleCustomLink(a)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(a){a.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(a,b){var d=b.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(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor("dark"==uiTheme);this.addListener("gridColorChanged",mxUtils.bind(this,
+function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor,"dark"==uiTheme);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(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.copyCells=function(a,b){var d=this.editor.graph;if(d.isSelectionEmpty())a.innerHTML="";else{var c=mxUtils.sortCells(d.model.getTopmostCells(d.getSelectionCells())),e=mxUtils.getXml(d.encodeCells(c));mxUtils.setTextContent(a,encodeURIComponent(e));b?(d.removeCells(c,!1),d.lastPasteXml=
+null):(d.lastPasteXml=e,d.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b,c){if(!mxEvent.isConsumed(a)){var d=b;if(c&&null!=a.clipboardData&&a.clipboardData.getData){var e=a.clipboardData.getData("text/html");if(null!=e&&0<e.length){if(d=document.createElement("div"),d.innerHTML=e,e=d.getElementsByTagName("style"),null!=e)for(;0<e.length;)e[0].parentNode.removeChild(e[0])}else e=a.clipboardData.getData("text/plain"),null!=e&&0<e.length&&
+(d=document.createElement("div"),mxUtils.setTextContent(d,e))}e=d.getElementsByTagName("span");if(null!=e&&0<e.length&&"application/vnd.lucid.chart.objects"===e[0].getAttribute("data-lucid-type"))c=e[0].getAttribute("data-lucid-content"),null!=c&&0<c.length&&(this.convertLucidChart(c,mxUtils.bind(this,function(a){var b=this.editor.graph;b.lastPasteXml==a?b.pasteCounter++:(b.lastPasteXml=a,b.pasteCounter=0);var d=b.pasteCounter*b.gridSize;b.setSelectionCells(this.importXml(a,d,d));b.scrollCellToVisible(b.getSelectionCell())}),
+mxUtils.bind(this,function(a){this.handleError(a)})),mxEvent.consume(a));else{var f=mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText),g=!1;try{var k=f.lastIndexOf("%3E");0<=k&&k<f.length-3&&(f=f.substring(0,k+3))}catch(C){}try{var e=d.getElementsByTagName("span"),m=null!=e&&0<e.length?mxUtils.trim(decodeURIComponent(e[0].textContent)):decodeURIComponent(f);this.isCompatibleString(m)&&(g=!0,f=m)}catch(C){}try{var p=this.editor.graph;if(null!=f&&0<f.length){p.lastPasteXml==f?p.pasteCounter++:
+(p.lastPasteXml=f,p.pasteCounter=0);var z=p.pasteCounter*p.gridSize;if(g||this.isCompatibleString(f))p.setSelectionCells(this.importXml(f,z,z));else{var u=p.getInsertPoint();p.isMouseInsertPoint()&&(z=0,p.lastPasteXml==f&&0<p.pasteCounter&&p.pasteCounter--);p.setSelectionCells(this.insertTextAt(f,u.x+z,u.y+z,!0))}p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));try{mxEvent.consume(a)}catch(C){}}else c||
+(p.lastPasteXml=null,p.pasteCounter=0)}catch(C){this.handleError(C)}}}b.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,d=0;d<a.length;d++)mxEvent.addListener(a[d],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[d],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[d],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
+else{var d=this.extractGraphModelFromEvent(a);if(null==d){var c=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=c&&(10==document.documentMode||11==document.documentMode?d=c.getData("Text"):(d=null,d=0<=mxUtils.indexOf(c.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(c.types,"text/html")?c.getData("text/html"):null,null!=d&&0<d.length?(c=document.createElement("div"),c.innerHTML=d,c=c.getElementsByTagName("img"),0<c.length&&(d=c[0].getAttribute("src"))):
+0<=mxUtils.indexOf(c.types,"text/plain")&&(d=c.getData("text/plain"))),null!=d&&("data:image/png;base64,"==d.substring(0,22)?(d=this.extractGraphModelFromPng(d),null!=d&&0<d.length&&this.openLocalFile(d,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(d)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(d))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(d)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(d):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(d)))))}else this.openLocalFile(d,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,d=0,c,e;if(null==a){e=document.body;var l=document.documentElement;c=(e.clientWidth||l.clientWidth)-3;e=Math.max(e.clientHeight||0,l.clientHeight)-3}else b=a.offsetTop,d=a.offsetLeft,c=a.clientWidth,
+e=a.clientHeight;l=document.createElement("div");l.style.zIndex=mxPopupMenu.prototype.zIndex+2;l.style.border="3px dotted rgb(254, 137, 12)";l.style.pointerEvents="none";l.style.position="absolute";l.style.top=b+"px";l.style.left=d+"px";l.style.width=Math.max(0,c-3)+"px";l.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(l):document.body.appendChild(l);return l};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
+var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var d=new mxCodec(b.ownerDocument),c=new mxGraphModel;d.decode(b,c);b=c.getChildAt(c.getRoot(),0);for(d=0;d<c.getChildCount(b);d++)a.push(c.getChildAt(b,d))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var d=0;d<a.length;d++)mxUtils.bind(this,function(a){var d=new FileReader;d.onload=mxUtils.bind(this,function(d){try{var c=d.target.result,e=a.name;if(null!=
+e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var f=mxUtils.bind(this,function(a){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(F){this.handleError(F,
+mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}));else if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.parseFile(a,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),
+200<=a.status&&299>=a.status?f(a.responseText):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(a){this.spinner.stop();this.openLocalFile(a,e,b)}),mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));else if("<mxlibrary"==d.target.result.substring(0,
+10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,d.target.result,a.name))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(a,mxUtils.bind(this,function(a){this.spinner.stop();f(a)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,b)}));else{if("image/png"==a.type.substring(0,9))c=
+this.extractGraphModelFromPng(c);else if("application/pdf"==a.type){var g=Editor.extractGraphModelFromPdf(c);null!=g&&(c=g)}this.spinner.stop();this.openLocalFile(c,e,b)}}}catch(z){this.handleError(z)}});d.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"!==a.type.substring(0,5)&&"application/pdf"!==a.type||"image/svg"===a.type.substring(0,9)?d.readAsText(a):d.readAsDataURL(a)})(a[d])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=
+this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});if(null!=a&&0<a.length)null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=
+0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function d(a){if(null!=a){var d=a.lastIndexOf(".");0<d&&(a=a.substring(d+1,a.length));null==b[a]&&(b[a]=!0)}}var c=this.editor.graph,e=c.getCellStyle(a);d(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));c.model.isEdge(a)&&
+(d(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),d(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=c.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(c.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=
+a?"":"none";this.editor.graph.setEnabled(a);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=a?"":"hidden",this.ruler.vRuler.container.style.visibility=a?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden");a||(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))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&
+this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
+this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,bounds:b.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:b.view.scale,page:b.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,d=!1,
+c=!1,e=null,l=mxUtils.bind(this,function(a,b){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,l);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==
+a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(ia){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(ba){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("prompt"==g.action){this.spinner.stop();var m=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&k.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(m.container,300,80,!0,!1);m.init();return}if("draft"==
+g.action){var n=l(g.xml);this.spinner.stop();m=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),n,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.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();
+k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(m.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{m.init()}catch(ba){k.postMessage(JSON.stringify({event:"draft",error:ba.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,u=1==g.enableCustomTemp,m=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,d){b=b||this.emptyDiagramXml;
+null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:d}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,b){this.remoteInvoke("searchDiagrams",[a],null,b,function(){b(null,"Network Error!")})}):null,mxUtils.bind(this,
+function(a,b,d){k.postMessage(JSON.stringify({event:"template",docUrl:a,info:b,name:d}),"*")}),null,null,u?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(m.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));m.init();return}if("textContent"==g.action){var v=this.getDiagramTextContent();k.postMessage(JSON.stringify({event:"textContent",data:v,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 x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();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 B=null!=g.xml?g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var A=this.editor.graph,E=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(B);k.postMessage(JSON.stringify(b),"*")}),O=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=
+this.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(B)));A!=this.editor.graph&&A.container.parentNode.removeChild(A.container);E(a)}),S=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=S){for(var Z=A.getGlobalVariable,A=this.createTemporaryGraph(A.getStylesheet()),X,G=0;G<this.pages.length;G++)if(this.pages[G].getId()==S){X=this.updatePageRoot(this.pages[G]);break}A.getGlobalVariable=function(a){return"page"==
+a?X.getName():"pagenumber"==a?1:Z.apply(this,arguments)};document.body.appendChild(A.container);A.model.setRoot(X.root)}if(null!=g.layerIds){for(var T=A.model,ga=T.getChildCells(T.getRoot()),m={},G=0;G<g.layerIds.length;G++)m[g.layerIds[G]]=!0;for(G=0;G<ga.length;G++)T.setVisible(ga[G],m[ga[G].id]||!1)}this.exportToCanvas(mxUtils.bind(this,function(a){O(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,function(){O(null)}),null,null,g.scale,null,null,null,A)}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+(null!=S?"&pageId="+S:"")+(null!=g.layerIds?"&extras="+encodeURIComponent(JSON.stringify({layerIds:g.layerIds})):"")+(null!=g.scale?"&scale="+g.scale:"")+"&base64=1&xml="+encodeURIComponent(B))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?E("data:image/png;base64,"+a.getText()):O(null)}),mxUtils.bind(this,function(){O(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);x=this.createLoadMessage("export");
+if("html2"==g.format||"html"==g.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ja=this.getXmlFileData();x.xml=mxUtils.getXml(ja);x.data=this.getFileData(null,null,!0,null,null,null,ja);x.format=g.format}else if("html"==g.format)B=this.editor.getGraphXml(),x.data=this.getHtml(B,this.editor.graph),x.xml=mxUtils.getXml(B),x.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;var U=this.editor.graph.background;U==mxConstants.NONE&&(U=null);x.xml=this.getFileData(!0,
+null,null,null,null,null,null,null,null,!1);x.format="svg";var ha=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();x.data=this.createSvgDataUri(a);k.postMessage(JSON.stringify(x),"*")});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(x.xml,this.editor.graph,null,!0,ha,null,null,g.embedImages);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);var Y=this.editor.graph.getSvg(U);this.embedFonts(Y,mxUtils.bind(this,function(a){g.embedImages||null==g.embedImages?this.convertImages(a,mxUtils.bind(this,function(a){ha(mxUtils.getXml(a))})):ha(mxUtils.getXml(a))}))}return}k.postMessage(JSON.stringify(x),"*")}return}if("load"==g.action)c=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.title&&null!=this.buttonContainer&&(n=document.createElement("span"),mxUtils.write(n,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(n),this.embedFilenameSpan=n),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):g.xml;else{"remoteInvokeReady"==g.action?this.handleRemoteInvokeReady(k):"remoteInvoke"==g.action?this.handleRemoteInvoke(g,f.origin):"remoteInvokeResponse"==g.action?this.handleRemoteInvokeResponse(g):k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}catch(ba){this.handleError(ba)}}var W=mxUtils.bind(this,function(f,g){d=!0;try{a(f,g)}catch(ca){this.handleError(ca)}d=
+!1;null!=urlParams.modified&&this.editor.setStatus("");var l=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())});e=l();c&&null==b&&(b=mxUtils.bind(this,function(a,b){var c=l();if(c!=e&&!d){var f=this.createLoadMessage("autosave");f.xml=c;c=JSON.stringify(f);(window.opener||window.parent).postMessage(c,"*")}e=c}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",
+b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),
+"*")});null!=g&&"function"===typeof g.substring&&"data:application/vnd.visio;base64,"==g.substring(0,34)?(l="0M8R4KGxGuE"==g.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(a){W(a,f)},mxUtils.bind(this,function(a){this.handleError(a)}),l)):null!=g&&"function"===typeof g.substring&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,"")?this.parseFile(new Blob([g],{type:"application/octet-stream"}),mxUtils.bind(this,
+function(a){4==a.readyState&&200<=a.status&&299>=a.status&&"<mxGraphModel"==a.responseText.substring(0,13)&&W(a.responseText,f)}),""):null!=g&&"function"===typeof g.substring&&this.isLucidChartData(g)?this.convertLucidChart(g,mxUtils.bind(this,function(a){W(a)}),mxUtils.bind(this,function(a){this.handleError(a)})):(g=l(g),W(g,f))}}));var k=window.opener||window.parent,l="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(l,"*")};EditorUi.prototype.addEmbedButtons=
+function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"0px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");b.className="geBigButton";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),
+a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),a.appendChild(b),"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.className="geBigButton geBigStandardButton",b.style.marginLeft="6px",mxEvent.addListener(b,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)));b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.className="geBigButton geBigStandardButton";b.style.marginLeft="6px";b.style.marginRight="20px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);
+a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://about.draw.io/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};
+EditorUi.prototype.executeLayoutList=function(a,b){for(var d=this.editor.graph,c=d.getSelectionCells(),e=0;e<a.length;e++){var f=new window[a[e].layout](d);if(null!=a[e].config)for(var k in a[e].config)f[k]=a[e].config[k];this.executeLayout(function(){f.execute(d.getDefaultParent(),0==c.length?null:c)},e==a.length-1,b)}};EditorUi.prototype.importCsv=function(a,b){try{var d=a.split("\n"),c=[],e=[],f={};if(0<d.length){var k={},m=null,p=null,u=null,z=null,x=null,A=null,t=null,I=null,M="",J="auto",N=
+"auto",D=null,E=null,O=40,S=40,Z=100,X=0,G=this.editor.graph;G.getGraphBounds();for(var T=function(){null!=b?b(oa):(G.setSelectionCells(oa),G.scrollCellToVisible(G.getSelectionCell()))},ga=G.getFreeInsertPoint(),ja=ga.x,U=ga.y,ga=U,ha=null,Y="auto",I=null,W=[],ba=null,ia=null,aa=0;aa<d.length&&"#"==d[aa].charAt(0);){a=d[aa];for(aa++;aa<d.length&&"\\"==a.charAt(a.length-1)&&"#"==d[aa].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(d[aa].substring(1)),aa++;if("#"!=a.charAt(1)){var ca=a.indexOf(":");
+if(0<ca){var P=mxUtils.trim(a.substring(1,ca)),L=mxUtils.trim(a.substring(ca+1));"label"==P?ha=G.sanitizeHtml(L):"labelname"==P&&0<L.length&&"-"!=L?z=L:"labels"==P&&0<L.length&&"-"!=L?x=JSON.parse(L):"style"==P?m=L:"parentstyle"==P?A=L:"stylename"==P&&0<L.length&&"-"!=L?u=L:"styles"==P&&0<L.length&&"-"!=L?p=JSON.parse(L):"identity"==P&&0<L.length&&"-"!=L?t=L:"parent"==P&&0<L.length&&"-"!=L?I=L:"namespace"==P&&0<L.length&&"-"!=L?M=L:"width"==P?J=L:"height"==P?N=L:"left"==P&&0<L.length?D=L:"top"==P&&
+0<L.length?E=L:"ignore"==P?ia=L.split(","):"connect"==P?W.push(JSON.parse(L)):"link"==P?ba=L:"padding"==P?X=parseFloat(L):"edgespacing"==P?O=parseFloat(L):"nodespacing"==P?S=parseFloat(L):"levelspacing"==P?Z=parseFloat(L):"layout"==P&&(Y=L)}}}if(null==d[aa])throw Error(mxResources.get("invalidOrMissingFile"));for(var ka=this.editor.csvToArray(d[aa]),P=ca=null,L=[],Q=0;Q<ka.length;Q++)t==ka[Q]&&(ca=Q),I==ka[Q]&&(P=Q),L.push(mxUtils.trim(ka[Q]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
+""));null==ha&&(ha="%"+L[0]+"%");if(null!=W)for(var R=0;R<W.length;R++)null==k[W[R].to]&&(k[W[R].to]={});t=[];for(Q=aa+1;Q<d.length;Q++){var da=this.editor.csvToArray(d[Q]);if(null==da){var pa=40<d[Q].length?d[Q].substring(0,40)+"...":d[Q];throw Error(pa+" ("+Q+"):\n"+mxResources.get("containsValidationErrors"));}0<da.length&&t.push(da)}G.model.beginUpdate();try{for(Q=0;Q<t.length;Q++){var da=t[Q],K=null,ma=null!=ca?M+da[ca]:null;null!=ma&&(K=G.model.getCell(ma));var d=null!=K,ea=new mxCell(ha,new mxGeometry(ja,
+ga,0,0),m||"whiteSpace=wrap;html=1;");ea.vertex=!0;ea.id=ma;for(var fa=0;fa<da.length;fa++)G.setAttributeForCell(ea,L[fa],da[fa]);if(null!=z&&null!=x){var ya=x[ea.getAttribute(z)];null!=ya&&G.labelChanged(ea,ya)}if(null!=u&&null!=p){var za=p[ea.getAttribute(u)];null!=za&&(ea.style=za)}G.setAttributeForCell(ea,"placeholders","1");ea.style=G.replacePlaceholders(ea,ea.style);d&&(G.model.setGeometry(K,ea.geometry),G.model.setStyle(K,ea.style),0>mxUtils.indexOf(e,K)&&e.push(K));K=ea;if(!d)for(R=0;R<W.length;R++)k[W[R].to][K.getAttribute(W[R].to)]=
+K;null!=ba&&"link"!=ba&&(G.setLinkForCell(K,K.getAttribute(ba)),G.setAttributeForCell(K,ba,null));G.fireEvent(new mxEventObject("cellsInserted","cells",[K]));var Ca=this.editor.graph.getPreferredSizeForCell(K);K.vertex&&(null!=D&&null!=K.getAttribute(D)&&(K.geometry.x=ja+parseFloat(K.getAttribute(D))),null!=E&&null!=K.getAttribute(E)&&(K.geometry.y=U+parseFloat(K.getAttribute(E))),"@"==J.charAt(0)&&null!=K.getAttribute(J.substring(1))?K.geometry.width=parseFloat(K.getAttribute(J.substring(1))):K.geometry.width=
+"auto"==J?Ca.width+X:parseFloat(J),"@"==N.charAt(0)&&null!=K.getAttribute(N.substring(1))?K.geometry.height=parseFloat(K.getAttribute(N.substring(1))):K.geometry.height="auto"==N?Ca.height+X:parseFloat(N),ga+=K.geometry.height+S);d?(null==f[ma]&&(f[ma]=[]),f[ma].push(K)):(I=null!=P?G.model.getCell(M+da[P]):null,c.push(K),null!=I?(I.style=G.replacePlaceholders(I,A),G.addCell(K,I)):e.push(G.addCell(K)))}for(var ra=e.slice(),oa=e.slice(),R=0;R<W.length;R++)for(var ta=W[R],Q=0;Q<c.length;Q++){var K=c[Q],
+ua=mxUtils.bind(this,function(a,b,d){var c=b.getAttribute(d.from);if(null!=c&&(G.setAttributeForCell(b,d.from,null),""!=c))for(var c=c.split(","),e=0;e<c.length;e++){var f=k[d.to][c[e]];if(null!=f){var g=d.label;null!=d.fromlabel&&(g=(b.getAttribute(d.fromlabel)||"")+(g||""));null!=d.tolabel&&(g=(g||"")+(f.getAttribute(d.tolabel)||""));var l="target"==d.placeholders==!d.invert?f:a,l=null!=d.style?G.replacePlaceholders(l,d.style):G.createCurrentEdgeStyle();oa.push(G.insertEdge(null,null,g||"",d.invert?
+f:a,d.invert?a:f,l));mxUtils.remove(d.invert?a:f,ra)}}});ua(K,K,ta);if(null!=f[K.id])for(fa=0;fa<f[K.id].length;fa++)ua(K,f[K.id][fa],ta)}if(null!=ia)for(Q=0;Q<c.length;Q++)for(K=c[Q],fa=0;fa<ia.length;fa++)G.setAttributeForCell(K,mxUtils.trim(ia[fa]),null);if(0<e.length){var la=new mxParallelEdgeLayout(G);la.spacing=O;var Aa=function(){0<la.spacing&&la.execute(G.getDefaultParent());for(var a=0;a<e.length;a++){var b=G.getCellGeometry(e[a]);b.x=Math.round(G.snap(b.x));b.y=Math.round(G.snap(b.y));"auto"==
+J&&(b.width=Math.round(G.snap(b.width)));"auto"==N&&(b.height=Math.round(G.snap(b.height)))}};if("["==Y.charAt(0)){var Da=T;G.view.validate();this.executeLayoutList(JSON.parse(Y),function(){Aa();Da()});T=null}else if("circle"==Y){var na=new mxCircleLayout(G);na.resetEdges=!1;var La=na.isVertexIgnored;na.isVertexIgnored=function(a){return La.apply(this,arguments)||0>mxUtils.indexOf(e,a)};this.executeLayout(function(){na.execute(G.getDefaultParent());Aa()},!0,T);T=null}else if("horizontaltree"==Y||
+"verticaltree"==Y||"auto"==Y&&oa.length==2*e.length-1&&1==ra.length){G.view.validate();var Ba=new mxCompactTreeLayout(G,"horizontaltree"==Y);Ba.levelDistance=S;Ba.edgeRouting=!1;Ba.resetEdges=!1;this.executeLayout(function(){Ba.execute(G.getDefaultParent(),0<ra.length?ra[0]:null)},!0,T);T=null}else if("horizontalflow"==Y||"verticalflow"==Y||"auto"==Y&&1==ra.length){G.view.validate();var wa=new mxHierarchicalLayout(G,"horizontalflow"==Y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=
+S;wa.parallelEdgeSpacing=O;wa.interRankCellSpacing=Z;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(G.getDefaultParent(),oa);G.moveCells(oa,ja,U)},!0,T);T=null}else if("organic"==Y||"auto"==Y&&oa.length>e.length){G.view.validate();var xa=new mxFastOrganicLayout(G);xa.forceConstant=3*S;xa.resetEdges=!1;var Ma=xa.isVertexIgnored;xa.isVertexIgnored=function(a){return Ma.apply(this,arguments)||0>mxUtils.indexOf(e,a)};la=new mxParallelEdgeLayout(G);la.spacing=O;this.executeLayout(function(){xa.execute(G.getDefaultParent());
+Aa()},!0,T);T=null}}this.hideDialog()}finally{G.model.endUpdate()}null!=T&&T()}}catch(Ga){this.handleError(Ga)}};EditorUi.prototype.getSearch=function(a){var b="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var d="?",c;for(c in urlParams)0>mxUtils.indexOf(a,c)&&null!=urlParams[c]&&(b+=d+c+"="+urlParams[c],d="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;
+if("1"==urlParams.offline)a+=window.location.search;else{var d="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),c;for(c in urlParams)0>mxUtils.indexOf(d,c)&&(a=0==b?a+"?":a+"&",null!=urlParams[c]&&(a+=c+"="+urlParams[c],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,560,130,!0,!0);a.init()};var u=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=
+u.apply(this,arguments),d=this.editor.graph,c=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(d.container)&&d.pageVisible&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return c.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(d.container)&&
+null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(d.container)&&null!=this.source.minimumGraphSize){var c=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-
+2*c.x))/2)-c.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*c.y))/2)-c.y-5/a))}return new mxPoint(8/a,8/a)};var l=b.init;b.init=function(){l.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=d.getPageLayout(),b=d.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};
+this.editor.addListener("pageSelected",function(a,d){var c=d.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(c.previousPage.root,
+!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a,b){var d=1;null==this.drive&&"function"!==typeof window.DriveClient||d++;b||null==this.dropbox&&"function"!==typeof window.DropboxClient||d++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||d++;b||null==this.gitHub||d++;b||null==this.gitLab||d++;b&&a&&isLocalStorage&&"1"==urlParams.browser&&d++;return d};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();
+var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(c);
+Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(c),this.menus.get("newLibrary").setEnabled(c));a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.actions.get("undo").setEnabled(this.canUndo()&&a);this.actions.get("redo").setEnabled(this.canRedo()&&a);this.menus.get("edit").setEnabled(b);
+this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
+function(){};EditorUi.prototype.isDiagramActive=function(){var a=this.getCurrentFile();return null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var x=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){x.apply(this,arguments);var a=this.editor.graph,b=this.isDiagramActive(),c=this.getCurrentFile();this.actions.get("pageSetup").setEnabled(b);this.actions.get("autosave").setEnabled(null!=c&&c.isEditable()&&c.isAutosaveOptional());this.actions.get("guides").setEnabled(b);
+this.actions.get("editData").setEnabled(b);this.actions.get("shadowVisible").setEnabled(b);this.actions.get("connectionArrows").setEnabled(b);this.actions.get("connectionPoints").setEnabled(b);this.actions.get("copyStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(b&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(b);this.actions.get("createRevision").setEnabled(b);
+this.actions.get("moveToFolder").setEnabled(null!=c);this.actions.get("makeCopy").setEnabled(null!=c&&!c.isRestricted());this.actions.get("editDiagram").setEnabled(b&&(null==c||!c.isRestricted()));this.actions.get("publishLink").setEnabled(null!=c&&!c.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("find").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!=c&&c.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=c);this.menus.get("publish").setEnabled(null!=c&&!c.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(b&&null!=a&&null!=a.shape&&null!=a.shape.stencil)};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&
+(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);A.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,c,e,k,l,m){var d=a.editor.graph;if("xml"==c)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==c)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(d.getSvg(e,k,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,
+null,null,!0),g=d.getGraphBounds(),n=Math.floor(g.width*k/d.view.scale),p=Math.floor(g.height*k/d.view.scale);if(f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA)if(a.hideDialog(),"png"!=c&&"jpg"!=c&&"jpeg"!=c||!a.isExportToCanvas()){var q={globalVars:d.getExportVariables()};a.saveRequest(b,c,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<m?"&dpi="+m:"")+"&bg="+(null!=e?e:
+"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})}else"png"==c?a.exportImage(k,null==e||"none"==e,!0,!1,!1,l,!0,!1,null,null,m):a.exportImage(k,!1,!0,!1,!1,l,!0,!1,"jpeg");else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var a=this.editor.graph,b="";if(null!=this.pages)for(var c=0;c<this.pages.length;c++){var e=a;this.currentPage!=this.pages[c]&&(e=this.createTemporaryGraph(a.getStylesheet()),
+this.updatePageRoot(this.pages[c]),e.model.setRoot(this.pages[c].root));b+=this.pages[c].getName()+" "+e.getIndexableText()+" "}else b=a.getIndexableText();this.editor.graph.setEnabled(!0);return b};EditorUi.prototype.showRemotelyStoredLibrary=function(a){var b={},d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxUtils.htmlEntities(a));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(c);var e=
+document.createElement("div");e.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";e.innerHTML='<div style="text-align:center;padding:8px;"><img src="/images/spin.gif"></div>';var l={};try{var k=mxSettings.getCustomLibraries();for(a=0;a<k.length;a++){var m=k[a];if("R"==m.substring(0,1)){var p=JSON.parse(decodeURIComponent(m.substring(1)));l[p[0]]={id:p[0],title:p[1],downloadUrl:p[2]}}}}catch(H){}this.remoteInvoke("getCustomLibraries",null,null,function(a){e.innerHTML="";if(0==
+a.length)e.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var d=0;d<a.length;d++){var c=a[d];l[c.id]&&(b[c.id]=c);var f=this.addCheckbox(e,c.title,l[c.id]);(function(a,d){mxEvent.addListener(d,"change",function(){this.checked?b[a.id]=a:delete b[a.id]})})(c,f)}},mxUtils.bind(this,function(a){e.innerHTML="";var b=document.createElement("div");b.style.padding="8px";b.style.textAlign="center";mxUtils.write(b,
+mxResources.get("error")+": ");mxUtils.write(b,null!=a&&null!=a.message?a.message:mxResources.get("unknownError"));e.appendChild(b)}));d.appendChild(e);d=new CustomDialog(this,d,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var a=0,d;for(d in b)null==l[d]&&(a++,mxUtils.bind(this,function(b){this.remoteInvoke("getFileContent",[b.downloadUrl],null,mxUtils.bind(this,function(d){a--;0==a&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,d,b))}catch(t){this.handleError(t,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){a--;0==a&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(b[d]));for(d in l)b[d]||this.closeLibrary(new RemoteLibrary(this,null,l[d]));0==a&&this.spinner.stop()}),null,null,"https://desk.draw.io/support/solutions/articles/16000092763");this.showDialog(d.container,340,375,!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(a){this.remoteWin=a;for(var b=0;b<this.remoteInvokeQueue.length;b++)a.postMessage(this.remoteInvokeQueue[b],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(a){var b=
+a.msgMarkers,d=this.remoteInvokeCallbacks[b.callbackId];if(null==d)throw Error("No callback for "+(null!=b?b.callbackId:"null"));a.error?d.error&&d.error(a.error.errResp):d.callback&&d.callback.apply(this,a.resp);this.remoteInvokeCallbacks[b.callbackId]=null};EditorUi.prototype.remoteInvoke=function(a,b,c,e,k){var d=!0,f=window.setTimeout(mxUtils.bind(this,function(){d=!1;k({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),g=mxUtils.bind(this,function(){window.clearTimeout(f);
+d&&e.apply(this,arguments)});c=c||{};c.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:g,error:k});a=JSON.stringify({event:"remoteInvoke",funtionName:a,functionArgs:b,msgMarkers:c});null!=this.remoteWin?this.remoteWin.postMessage(a,"*"):this.remoteInvokeQueue.push(a)};EditorUi.prototype.handleRemoteInvoke=function(a,b){var d=mxUtils.bind(this,function(b,d){var c={event:"remoteInvokeResponse",msgMarkers:a.msgMarkers};null!=d?c.error={errResp:d}:null!=b&&(c.resp=
+b);this.remoteWin.postMessage(JSON.stringify(c),"*")});try{var c=a.funtionName,e=this.remoteInvokableFns[c];if(null!=e&&"function"===typeof this[c]){if(e.allowedDomains){for(var f=!1,k=0;k<e.allowedDomains.length;k++)if(b=="https://"+e.allowedDomains[k]){f=!0;break}if(!f){d(null,"Invalid Call: "+c+" is not allowed.");return}}var m=a.functionArgs;Array.isArray(m)||(m=[]);if(e.isAsync)m.push(function(){d(Array.prototype.slice.apply(arguments))}),m.push(function(a){d(null,a||"Unkown Error")}),this[c].apply(this,
+m);else{var p=this[c].apply(this,m);d([p])}}else d(null,"Invalid Call: "+c+" is not found.")}catch(H){d(null,"Invalid Call: An error occured, "+H.message)}};EditorUi.prototype.openDatabase=function(a,b){if(null==this.database){var d=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=d)try{var c=d.open("database",2);c.onupgradeneeded=function(a){var b=c.result;1>a.oldVersion&&b.createObjectStore("objects",{keyPath:"key"});2>a.oldVersion&&(b.createObjectStore("files",{keyPath:"title"}),
+b.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)};c.onsuccess=mxUtils.bind(this,function(b){var d=c.result;this.database=d;EditorUi.migrateStorageFiles&&(StorageFile.migrate(d),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(a){if(!a){var b=document.createElement("iframe");b.style.display="none";b.setAttribute("src",
+"https://www.draw.io?embed=1&proto=json");document.body.appendChild(b);var d=!0,c=!1,e,f=0,g=mxUtils.bind(this,function(){c=!0;this.setDatabaseItem(".drawioMigrated3",!0);b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),l=mxUtils.bind(this,function(){f++;k()}),k=mxUtils.bind(this,function(){try{if(f>=e.length)g();else{var a=e[f];StorageFile.getFileContent(this,a,mxUtils.bind(this,function(d){null==d||".scratchpad"==a&&d==this.emptyLibraryXml?
+b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[a]}),"*"):l()}),l)}}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}}),m=mxUtils.bind(this,function(a){try{this.setDatabaseItem(null,[{title:a.title,size:a.data.length,lastModified:Date.now(),type:a.isLib?"L":"F"},{title:a.title,data:a.data}],l,l,["filesInfo","files"])}catch(N){EditorUi.logError("Migration Caught: "+N.message,null,null,null,N,"INFO")}});
+a=mxUtils.bind(this,function(a){var f;try{if(a.source==b.contentWindow){f=a.data;var p=JSON.parse(a.data);"init"==p.event?(b.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),b.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=p.event||c||(d?null!=p.resp&&0<p.resp.length&&null!=p.resp[0]?(e=p.resp[0],d=!1,k()):g():null!=p.resp&&0<p.resp.length&&null!=p.resp[0]?m(p.resp[0]):l())}}catch(E){try{f=
+JSON.stringify(f)}catch(O){}EditorUi.logError("Migration Caught: "+E.message+(0<=E.message.indexOf("JSON")?" >> "+f:""),null,null,null,E,"INFO")}});window.addEventListener("message",a)}})));a(d);d.onversionchange=function(){d.close()}});c.onerror=b;c.onblocked=function(){}}catch(n){null!=b&&b(n)}else null!=b&&b()}else a(this.database)};EditorUi.prototype.setDatabaseItem=function(a,b,c,e,k){this.openDatabase(mxUtils.bind(this,function(d){try{k=k||"objects";Array.isArray(k)||(k=[k],a=[a],b=[b]);var f=
+d.transaction(k,"readwrite");f.oncomplete=c;f.onerror=e;for(d=0;d<k.length;d++)f.objectStore(k[d]).put(null!=a&&null!=a[d]?{key:a[d],data:b[d]}:b[d])}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.removeDatabaseItem=function(a,b,c,e){this.openDatabase(mxUtils.bind(this,function(d){e=e||"objects";Array.isArray(e)||(e=[e],a=[a]);d=d.transaction(e,"readwrite");d.oncomplete=b;d.onerror=c;for(var f=0;f<e.length;f++)d.objectStore(e[f])["delete"](a[f])}),c)};EditorUi.prototype.getDatabaseItem=function(a,
+b,c,e){this.openDatabase(mxUtils.bind(this,function(d){try{e=e||"objects";var f=d.transaction([e],"readonly").objectStore(e).get(a);f.onsuccess=function(){b(f.result)};f.onerror=c}catch(B){null!=c&&c(B)}}),c)};EditorUi.prototype.getDatabaseItems=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).openCursor(IDBKeyRange.lowerBound(0)),f=[];e.onsuccess=function(b){null==b.target.result?a(f):(f.push(b.target.result.value),
+b.target.result["continue"]())};e.onerror=b}catch(B){null!=b&&b(B)}}),b)};EditorUi.prototype.getDatabaseItemKeys=function(a,b,c){this.openDatabase(mxUtils.bind(this,function(d){try{c=c||"objects";var e=d.transaction([c],"readonly").objectStore(c).getAllKeys();e.onsuccess=function(){a(e.result)};e.onerror=b}catch(l){null!=b&&b(l)}}),b)};EditorUi.prototype.commentsSupported=function(){var a=this.getCurrentFile();return null!=a?a.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var a=
+this.getCurrentFile();return null!=a?a.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var a=this.getCurrentFile();return null!=a?a.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(a,b){var d=this.getCurrentFile();null!=d?d.getComments(a,b):a([])};EditorUi.prototype.addComment=function(a,b,c){var d=this.getCurrentFile();null!=d?d.addComment(a,b,c):b(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var a=this.getCurrentFile();return null!=a?
+a.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var a=this.getCurrentFile();return null!=a?a.canComment():!0};EditorUi.prototype.newComment=function(a,b){var d=this.getCurrentFile();return null!=d?d.newComment(a,b):new DrawioComment(this,null,a,Date.now(),Date.now(),!1,b)};EditorUi.prototype.isRevisionHistorySupported=function(){var a=this.getCurrentFile();return null!=a&&a.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(a,b){var d=this.getCurrentFile();null!=
+d&&d.getRevisions?d.getRevisions(a,b):b({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var a=this.getCurrentFile();return null!=a&&(a.constructor==DriveFile&&a.isEditable()||a.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(a){a.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==
+localStorage.getItem(".localStorageMigrated"))return null;for(var a=[],b=0;b<localStorage.length;b++){var c=localStorage.key(b),e=localStorage.getItem(c);if(0<c.length&&(".scratchpad"==c||"."!=c.charAt(0))&&0<e.length){var k="<mxfile "===e.substring(0,8)||"<?xml"===e.substring(0,5)||"\x3c!--[if IE]>"===e.substring(0,12),e="<mxlibrary>"===e.substring(0,11);(k||e)&&a.push(c)}}return a};EditorUi.prototype.getLocalStorageFile=function(a){if("1"==localStorage.getItem(".localStorageMigrated"))return null;
+var b=localStorage.getItem(a);return{title:a,data:b,isLib:"<mxlibrary>"===b.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(a,b,e,c,k,m){function p(){for(var a=y.getElementsByTagName("div"),b=0,d=0;d<a.length;d++)"none"!=a[d].style.display&&a[d].parentNode==y&&b++;H.style.display=0==b?"block":"none"}function u(a,b,d,c){function e(){b.removeChild(k);b.removeChild(m);g.style.display="block";f.style.display="block"}l={div:b,comment:a,saveCallback:d,deleteOnCancel:c};var f=b.querySelector(".geCommentTxt"),g=b.querySelector(".geCommentActionsList"),k=document.createElement("textarea");k.className=
 "geCommentEditTxtArea";k.style.minHeight=f.offsetHeight+"px";k.value=a.content;b.insertBefore(k,f);var m=document.createElement("div");m.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){c?(b.parentNode.removeChild(b),p()):e();l=null});n.className="geCommentEditBtn";m.appendChild(n);var t=mxUtils.button(mxResources.get("save"),function(){f.innerHTML="";a.content=k.value;mxUtils.write(f,a.content);e();d(a);l=null});mxEvent.addListener(k,"keydown",mxUtils.bind(this,
-function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(t.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));t.focus();t.className="geCommentEditBtn gePrimaryBtn";m.appendChild(t);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function v(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
-[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function z(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
-"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);c&&(e.style.display="none")}function y(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=E;a(b);return{pdiv:c,replies:d}}function x(c,e,l,m,n){function p(){A(u);b.addReply(v,function(a){v.id=a;b.replies.push(v);f(u);l&&l()},function(b){q();d(u);a.handleError(b,null,
-null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,n)}function q(){t(v,u,function(a){p()},!0)}var z=y().pdiv,v=a.newComment(c,a.getCurrentUser());v.pCommentId=b.id;null==b.replies&&(b.replies=[]);var u=g(v,b.replies,z,k+1);e?q():p()}if(m||!b.isResolved){H.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite");
-var B=document.createElement("div");B.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;B.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";B.appendChild(F);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,b.user.displayName||"");F.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",b.id);v(b,
-O);F.appendChild(O);E.appendChild(B);B=document.createElement("div");B.className="geCommentTxt";mxUtils.write(B,b.content||"");E.appendChild(B);B=document.createElement("div");B.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";B.appendChild(D);q||0!=k&&!n||z(mxResources.get("reply"),function(){x("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||q||(z(mxResources.get("edit"),function(){function c(){t(b,E,function(){A(E);b.editComment(b.content,
-function(){f(E)},function(b){d(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),z(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(E);b.deleteComment(function(){for(var a=y(b).replies,d=0;d<a.length;d++)u.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}H.style.display=0==u.getElementsByTagName("div").length?"block":"none"},function(b){d(E);a.handleError(b,null,null,
-null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=k||z(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=y(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
-k=0;k<l.length;k++)l[k]!=d.parentNode&&(l[k].style.display=c);C||(e[g].style.display="none")}p()}b.isResolved?x(mxResources.get("reOpened")+": ",!0,d,!1,!0):x(mxResources.get("markedAsResolved"),!1,d,!0)});E.appendChild(B);null!=e?u.insertBefore(E,e.nextSibling):u.appendChild(E);for(e=0;null!=b.replies&&e<b.replies.length;e++)B=b.replies[e],B.isResolved=b.isResolved,g(B,b.replies,null,k+1,m);null!=l&&(l.comment.id==b.id?(m=b.content,b.content=l.comment.content,t(b,E,l.saveCallback,l.deleteOnCancel),
-b.content=m):null==l.comment.id&&l.comment.pCommentId==b.id&&(u.appendChild(l.div),t(l.comment,l.div,l.saveCallback,l.deleteOnCancel)));return E}}var q=!a.canComment(),n=a.canReplyToReplies(),l=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var x=EditorUi.compactUi?"26px":"30px",u=document.createElement("div");u.className="geCommentsList";u.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
-Dialog.backdropColor;u.style.bottom=parseInt(x)+7+"px";B.appendChild(u);var H=document.createElement("span");H.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(H,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=x;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
-"none");x=document.createElement("a");x.className="geButton";mxClient.IS_QUIRKS&&(x.style.filter="none");if(!q){var F=x.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){t(e,l,function(b){A(l);a.addComment(b,function(a){b.id=a;y.push(b);f(l)},function(b){d(l);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
-!0)}var e=a.newComment("",a.getCurrentUser()),l=g(e,y,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=x.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&&
-(F=x.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
-(x.style.filter="invert(100%)"),mxEvent.addListener(x,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(x));B.appendChild(z);var y=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l)try{l.div=l.div.cloneNode(!0);var b=l.div.querySelector(".geCommentEditTxtArea"),d=l.div.querySelector(".geCommentEditBtns");l.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}u.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});u.innerHTML="";u.appendChild(H);H.style.display="block";y=a;for(a=0;a<y.length;a++)b(y[a].replies),
-g(y[a],y,null,0,C);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(u.appendChild(l.div),t(l.comment,l.div,l.saveCallback,l.deleteOnCancel))},mxUtils.bind(this,function(a){u.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):u.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(v(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])}
-if(this.window.isVisible()){for(var b=u.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<y.length;c++)a(y[c])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),B,b,e,c,k,!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,
+function(a){mxEvent.isConsumed(a)||((mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a))&&13==a.keyCode?(t.click(),mxEvent.consume(a)):27==a.keyCode&&(n.click(),mxEvent.consume(a)))}));t.focus();t.className="geCommentEditBtn gePrimaryBtn";m.appendChild(t);b.insertBefore(m,f);g.style.display="none";f.style.display="none";k.focus()}function x(b,d){d.innerHTML="";var c=new Date(b.modifiedDate),e=a.timeSince(c);null==e&&(e=mxResources.get("lessThanAMinute"));mxUtils.write(d,mxResources.get("timeAgo",
+[e],"{1} ago"));d.setAttribute("title",c.toLocaleDateString()+" "+c.toLocaleTimeString())}function A(a){var b=document.createElement("img");b.className="geCommentBusyImg";b.src=IMAGE_PATH+"/spin.gif";a.appendChild(b);a.busyImg=b}function d(a){a.style.border="1px solid red";a.removeChild(a.busyImg)}function f(a){a.style.border="";a.removeChild(a.busyImg)}function g(b,c,e,k,m){function t(a,d,c){var e=document.createElement("li");e.className="geCommentAction";var f=document.createElement("a");f.className=
+"geCommentActionLnk";mxUtils.write(f,a);e.appendChild(f);mxEvent.addListener(f,"click",function(a){d(a,b);a.preventDefault();mxEvent.consume(a)});D.appendChild(e);c&&(e.style.display="none")}function z(){function a(b){d.push(c);if(null!=b.replies)for(var e=0;e<b.replies.length;e++)c=c.nextSibling,a(b.replies[e])}var d=[],c=E;a(b);return{pdiv:c,replies:d}}function v(c,e,l,m,p){function n(){A(v);b.addReply(x,function(a){x.id=a;b.replies.push(x);f(v);l&&l()},function(b){t();d(v);a.handleError(b,null,
+null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},m,p)}function t(){u(x,v,function(a){n()},!0)}var q=z().pdiv,x=a.newComment(c,a.getCurrentUser());x.pCommentId=b.id;null==b.replies&&(b.replies=[]);var v=g(x,b.replies,q,k+1);e?t():n()}if(m||!b.isResolved){H.style.display="none";var E=document.createElement("div");E.className="geCommentContainer";E.setAttribute("data-commentId",b.id);E.style.marginLeft=20*k+5+"px";b.isResolved&&"dark"!=uiTheme&&(E.style.backgroundColor="ghostWhite");
+var B=document.createElement("div");B.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=b.user.pictureUrl||Editor.userImage;B.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";B.appendChild(F);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,b.user.displayName||"");F.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",b.id);x(b,
+O);F.appendChild(O);E.appendChild(B);B=document.createElement("div");B.className="geCommentTxt";mxUtils.write(B,b.content||"");E.appendChild(B);B=document.createElement("div");B.className="geCommentActions";var D=document.createElement("ul");D.className="geCommentActionsList";B.appendChild(D);q||0!=k&&!n||t(mxResources.get("reply"),function(){v("",!0)},b.isResolved);F=a.getCurrentUser();null==F||F.id!=b.user.id||q||(t(mxResources.get("edit"),function(){function c(){u(b,E,function(){A(E);b.editComment(b.content,
+function(){f(E)},function(b){d(E);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}c()},b.isResolved),t(mxResources.get("delete"),function(){a.confirm(mxResources.get("areYouSure"),function(){A(E);b.deleteComment(function(){for(var a=z(b).replies,d=0;d<a.length;d++)y.removeChild(a[d]);for(d=0;d<c.length;d++)if(c[d]==b){c.splice(d,1);break}H.style.display=0==y.getElementsByTagName("div").length?"block":"none"},function(b){d(E);a.handleError(b,null,null,
+null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},b.isResolved));q||0!=k||t(b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(a){function d(){var d=a.target;d.innerHTML="";b.isResolved=!b.isResolved;mxUtils.write(d,b.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var c=b.isResolved?"none":"",e=z(b).replies,f="dark"==uiTheme?"transparent":b.isResolved?"ghostWhite":"white",g=0;g<e.length;g++){e[g].style.backgroundColor=f;for(var l=e[g].querySelectorAll(".geCommentAction"),
+k=0;k<l.length;k++)l[k]!=d.parentNode&&(l[k].style.display=c);C||(e[g].style.display="none")}p()}b.isResolved?v(mxResources.get("reOpened")+": ",!0,d,!1,!0):v(mxResources.get("markedAsResolved"),!1,d,!0)});E.appendChild(B);null!=e?y.insertBefore(E,e.nextSibling):y.appendChild(E);for(e=0;null!=b.replies&&e<b.replies.length;e++)B=b.replies[e],B.isResolved=b.isResolved,g(B,b.replies,null,k+1,m);null!=l&&(l.comment.id==b.id?(m=b.content,b.content=l.comment.content,u(b,E,l.saveCallback,l.deleteOnCancel),
+b.content=m):null==l.comment.id&&l.comment.pCommentId==b.id&&(y.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel)));return E}}var q=!a.canComment(),n=a.canReplyToReplies(),l=null,B=document.createElement("div");B.className="geCommentsWin";B.style.background="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;var v=EditorUi.compactUi?"26px":"30px",y=document.createElement("div");y.className="geCommentsList";y.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":
+Dialog.backdropColor;y.style.bottom=parseInt(v)+7+"px";B.appendChild(y);var H=document.createElement("span");H.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(H,mxResources.get("noCommentsFound"));var z=document.createElement("div");z.className="geToolbarContainer geCommentsToolbar";z.style.height=v;z.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";z.style.backgroundColor="white"==Dialog.backdropColor?"whiteSmoke":Dialog.backdropColor;mxClient.IS_QUIRKS&&(z.style.filter=
+"none");v=document.createElement("a");v.className="geButton";mxClient.IS_QUIRKS&&(v.style.filter="none");if(!q){var F=v.cloneNode();F.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(b){function c(){u(e,l,function(b){A(l);a.addComment(b,function(a){b.id=a;t.push(b);f(l)},function(b){d(l);c();a.handleError(b,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},
+!0)}var e=a.newComment("",a.getCurrentUser()),l=g(e,t,null,0);c();b.preventDefault();mxEvent.consume(b)});z.appendChild(F)}F=v.cloneNode();F.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';F.setAttribute("title",mxResources.get("showResolved"));var C=!1;"dark"==uiTheme&&(F.style.filter="invert(100%)");mxEvent.addListener(F,"click",function(a){this.className=(C=!C)?"geButton geCheckedBtn":"geButton";I();a.preventDefault();mxEvent.consume(a)});z.appendChild(F);a.commentsRefreshNeeded()&&
+(F=v.cloneNode(),F.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',F.setAttribute("title",mxResources.get("refresh")),"dark"==uiTheme&&(F.style.filter="invert(100%)"),mxEvent.addListener(F,"click",function(a){I();a.preventDefault();mxEvent.consume(a)}),z.appendChild(F));a.commentsSaveNeeded()&&(v=v.cloneNode(),v.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',v.setAttribute("title",mxResources.get("save")),"dark"==uiTheme&&
+(v.style.filter="invert(100%)"),mxEvent.addListener(v,"click",function(a){m();a.preventDefault();mxEvent.consume(a)}),z.appendChild(v));B.appendChild(z);var t=[],I=mxUtils.bind(this,function(){this.hasError=!1;if(null!=l)try{l.div=l.div.cloneNode(!0);var b=l.div.querySelector(".geCommentEditTxtArea"),d=l.div.querySelector(".geCommentEditBtns");l.comment.content=b.value;b.parentNode.removeChild(b);d.parentNode.removeChild(d)}catch(D){a.handleError(D)}y.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";n=a.canReplyToReplies();a.commentsSupported()?a.getComments(function(a){function b(a){if(null!=a){a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});for(var d=0;d<a.length;d++)b(a[d].replies)}}a.sort(function(a,b){return new Date(a.modifiedDate)-new Date(b.modifiedDate)});y.innerHTML="";y.appendChild(H);H.style.display="block";t=a;for(a=0;a<t.length;a++)b(t[a].replies),
+g(t[a],t,null,0,C);null!=l&&null==l.comment.id&&null==l.comment.pCommentId&&(y.appendChild(l.div),u(l.comment,l.div,l.saveCallback,l.deleteOnCancel))},mxUtils.bind(this,function(a){y.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(a&&a.message?": "+a.message:""));this.hasError=!0})):y.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});I();this.refreshComments=I;z=mxUtils.bind(this,function(){function a(b){var c=d[b.id];if(null!=c)for(x(b,c),c=0;null!=b.replies&&c<b.replies.length;c++)a(b.replies[c])}
+if(this.window.isVisible()){for(var b=y.querySelectorAll(".geCommentDate"),d={},c=0;c<b.length;c++){var e=b[c];d[e.getAttribute("data-commentId")]=e}for(c=0;c<t.length;c++)a(t[c])}});setInterval(z,6E4);this.refreshCommentsTime=z;this.window=new mxWindow(mxResources.get("comments"),B,b,e,c,k,!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()}));this.window.setLocation=function(a,b){var d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;a=Math.max(0,Math.min(a,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,d-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var a=this.window.getX(),
-b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,k,m,p,t,v,A,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
-f.appendChild(g);null!=A&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),g.appendChild(b),f.appendChild(g));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";null!=t&&(m.innerHTML=t+"<br>"+m.innerHTML,m.style.paddingBottom=
-"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var n=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(q.checked)});A.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);f.appendChild(A);v?(A.style.marginTop=
+b=this.window.getY();this.window.setLocation(a,b)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(a,b,e,c,k,m,p,u,x,A,d){var f=document.createElement("div");f.style.textAlign="center";d=null!=d?d:44;var g=document.createElement("div");g.style.padding="6px";g.style.overflow="auto";g.style.maxHeight=d+"px";g.style.lineHeight="1.2em";mxClient.IS_QUIRKS&&(g.style.height="60px");mxUtils.write(g,b);
+f.appendChild(g);null!=A&&(g=document.createElement("div"),g.style.padding="6px 0 6px 0",b=document.createElement("img"),b.setAttribute("src",A),g.appendChild(b),f.appendChild(g));A=document.createElement("div");A.style.textAlign="center";A.style.whiteSpace="nowrap";var q=document.createElement("input");q.setAttribute("type","checkbox");m=mxUtils.button(m||mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c(q.checked)});m.className="geBtn";null!=u&&(m.innerHTML=u+"<br>"+m.innerHTML,m.style.paddingBottom=
+"8px",m.style.paddingTop="8px",m.style.height="auto",m.style.width="40%");a.editor.cancelFirst&&A.appendChild(m);var n=mxUtils.button(k||mxResources.get("ok"),function(){a.hideDialog();null!=e&&e(q.checked)});A.appendChild(n);null!=p?(n.innerHTML=p+"<br>"+n.innerHTML+"<br>",n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.className="geBtn",n.style.width="40%"):n.className="geBtn gePrimaryBtn";a.editor.cancelFirst||A.appendChild(m);f.appendChild(A);x?(A.style.marginTop=
 "10px",g=document.createElement("p"),g.style.marginTop="20px",g.appendChild(q),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberThisSetting")),g.appendChild(k),f.appendChild(g),mxEvent.addListener(k,"click",function(a){q.checked=!q.checked;mxEvent.consume(a)})):A.style.marginTop="12px";this.init=function(){n.focus()};this.container=f};function DiagramPage(a,b){this.node=a;null!=b?this.node.setAttribute("id",b):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(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=this.name=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
 function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
@@ -3448,9 +3450,9 @@ this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pa
 a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),e=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=this.editor&&this.editor.graph.refresh()})):
 "undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var e=b.getProperty("edit").changes,k=0;k<e.length;k++)if(e[k]instanceof SelectPage||e[k]instanceof RenamePage||e[k]instanceof MovePage||e[k]instanceof mxRootChange){c();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
 EditorUi.prototype.restoreViewState=function(a,b,e){a=null!=a?this.getPageById(a.getId()):null;var c=this.editor.graph;null!=a&&null!=this.currentPage&&null!=this.pages&&(a!=this.currentPage?this.selectPage(a,!0,b):(c.setViewState(b),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+b.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+b.scrollTop,c.restoreSelection(e))};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,t=a.getAttribute("extFonts");if(t)try{t=t.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(v){console.log("ExtFonts format error: "+v.message)}return{gridEnabled:"0"!=
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=parseFloat(a.getAttribute("pageScale")),c=parseFloat(a.getAttribute("pageWidth")),k=parseFloat(a.getAttribute("pageHeight")),m=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null,u=a.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(a){a=a.split("^");return{name:a[0],url:a[1]}})}catch(x){console.log("ExtFonts format error: "+x.message)}return{gridEnabled:"0"!=
 a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==a.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=m&&0<m.length?m:null,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:isNaN(e)?mxGraph.prototype.pageScale:e,pageFormat:isNaN(c)||isNaN(k)?"undefined"===
-typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:t||[]}};
+typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat():new mxRectangle(0,0,c,k),tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"1"==a.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,extFonts:u||[]}};
 Graph.prototype.saveViewState=function(a,b,e){e||(b.setAttribute("grid",null==a||a.gridEnabled?"1":"0"),b.setAttribute("gridSize",null!=a?a.gridSize:mxGraph.prototype.gridSize),b.setAttribute("guides",null==a||a.guidesEnabled?"1":"0"),b.setAttribute("tooltips",null==a||a.tooltips?"1":"0"),b.setAttribute("connect",null==a||a.connect?"1":"0"),b.setAttribute("arrows",null==a||a.arrows?"1":"0"),b.setAttribute("page",null==a&&this.defaultPageVisible||null!=a&&a.pageVisible?"1":"0"),b.setAttribute("fold",
 null==a||a.foldingEnabled?"1":"0"));b.setAttribute("pageScale",null!=a&&null!=a.pageScale?a.pageScale:mxGraph.prototype.pageScale);e=null!=a?a.pageFormat:"undefined"===typeof mxSettings?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=e&&(b.setAttribute("pageWidth",e.width),b.setAttribute("pageHeight",e.height));null!=a&&null!=a.background&&b.setAttribute("background",a.background);null!=a&&null!=a.backgroundImage&&b.setAttribute("backgroundImage",JSON.stringify(a.backgroundImage));b.setAttribute("math",
 null!=a&&a.mathEnabled?"1":"0");b.setAttribute("shadow",null!=a&&a.shadowVisible?"1":"0");null!=a&&null!=a.extFonts&&0<a.extFonts.length&&b.setAttribute("extFonts",a.extFonts.map(function(a){return a.name+"^"+a.url}).join("|"))};
@@ -3476,9 +3478,9 @@ EditorUi.prototype.createTabContainer=function(){var a=document.createElement("d
 EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="13px";b.style.marginLeft="30px";for(var e=this.editor.isChromelessView()?29:59,c=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
 e)/this.pages.length)+1),k=null,m=0;m<this.pages.length;m++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage?(d.className="geActivePage",d.style.backgroundColor="dark"==uiTheme?"#2a2a2a":"#fff"):d.className="geInactivePage";d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),k=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){k=
 null;a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=k&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=k&&c!=k&&this.movePage(k,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(m,this.createTabForPage(this.pages[m],c,this.pages[m]!=this.currentPage,m+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);c=this.createPageMenuTab();
-this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var t=this.createControlTab(4,"&nbsp;&#10095;");
-t.style.position="absolute";t.style.right=this.editor.chromeless?"0px":"29px";t.style.fontSize="13pt";this.tabContainer.appendChild(t);var v=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=v+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
-50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(t,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,v-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(t,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+this.tabContainer.appendChild(c);c=null;this.isPageInsertTabVisible()&&(c=this.createPageInsertTab(),this.tabContainer.appendChild(c));if(b.clientWidth>this.tabContainer.clientWidth-e){null!=c&&(c.style.position="absolute",c.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var u=this.createControlTab(4,"&nbsp;&#10095;");
+u.style.position="absolute";u.style.right=this.editor.chromeless?"0px":"29px";u.style.fontSize="13pt";this.tabContainer.appendChild(u);var x=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=x+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,0<b.scrollLeft?100:
+50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(u,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,x-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(u,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
 EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.textAlign="center";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="12px 4px 8px 4px";b.style.border="dark"==uiTheme?"1px solid #505759":"1px solid #e8eaed";b.style.borderTopStyle="none";b.style.borderBottomStyle=
 "none";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor="move";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="dark"==uiTheme?"black":"#e8eaed",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
 EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.lineHeight=this.tabContainerHeight+"px";e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
@@ -3488,7 +3490,7 @@ function(){this.removePage(e)}),b),a.addItem(mxResources.get("rename"),null,mxUt
 mxEvent.getClientX(a),k=mxEvent.getClientY(a);b.popup(c,k,null,a);this.setCurrentMenu(b);mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
 EditorUi.prototype.createTabForPage=function(a,b,e,c){e=this.createTab(e);var k=a.getName()||mxResources.get("untitled"),m=a.getId();e.setAttribute("title",k+(null!=m?" ("+m+")":"")+" ["+c+"]");mxUtils.write(e,k);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
 EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var c=!1,k=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){c=null!=this.currentMenu;k=a==this.currentPage;e.isMouseDown||k||this.selectPage(a)}),null,mxUtils.bind(this,function(m){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(m)&&k||mxEvent.isPopupTrigger(m))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var t=mxEvent.getClientX(m),v=mxEvent.getClientY(m);p.popup(t,v,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(m)||!c){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(m),x=mxEvent.getClientY(m);p.popup(u,x,null,m);this.setCurrentMenu(p,b)}mxEvent.consume(m)}}))};
 EditorUi.prototype.getLinkForPage=function(a){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var b=this.getCurrentFile();if(null!=b&&b.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var e=this.getSearch("create title mode url drive splash state".split(" ")),e=e+((0==e.length?"?":"&")+"page-id="+a.getId());return window.location.protocol+"//"+window.location.host+"/"+e+"#"+b.getHash()}}return null};
 EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,c){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);var k=this.getLinkForPage(a);null!=k&&(e.addSeparator(c),e.addItem(mxResources.get("link"),null,
 mxUtils.bind(this,function(){var a=new EmbedDialog(this,k);this.showDialog(a.container,440,240,!0,!0);a.init()}),c));e.addSeparator(c);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,mxResources.get("copyOf",[a.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(e.addSeparator(c),e.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,
@@ -3497,31 +3499,31 @@ null,null,!0,!0))}),c))})};(function(){var a=EditorUi.prototype.refresh;EditorUi
 (function(){var a=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" ")),b="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");a.afterEncode=function(a,c,k){k.setAttribute("relatedPage",c.relatedPage.getId());null==c.index&&(k.setAttribute("name",c.relatedPage.getName()),null!=c.relatedPage.viewState&&k.setAttribute("viewState",JSON.stringify(c.relatedPage.viewState,function(a,c){return 0>mxUtils.indexOf(b,
 a)?c:void 0})),null!=c.relatedPage.root&&a.encodeCell(c.relatedPage.root,k));return k};a.beforeDecode=function(a,b,k){k.ui=a.ui;k.relatedPage=k.ui.getPageById(b.getAttribute("relatedPage"));if(null==k.relatedPage){var c=b.ownerDocument.createElement("diagram");c.setAttribute("id",b.getAttribute("relatedPage"));c.setAttribute("name",b.getAttribute("name"));k.relatedPage=new DiagramPage(c);c=b.getAttribute("viewState");null!=c&&(k.relatedPage.viewState=JSON.parse(c),b.removeAttribute("viewState"));
 b=b.cloneNode(!0);c=b.firstChild;if(null!=c)for(k.relatedPage.root=a.decodeCell(c,!1),k=c.nextSibling,c.parentNode.removeChild(c),c=k;null!=c;){k=c.nextSibling;if(c.nodeType==mxConstants.NODETYPE_ELEMENT){var e=c.getAttribute("id");null==a.lookup(e)&&a.decodeCell(c)}c.parentNode.removeChild(c);c=k}}return b};a.afterDecode=function(a,b,k){k.index=k.previousIndex;return k};mxCodecRegistry.register(a)})();(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==":IMAGE_PATH+"/move.png";EditorUi.prototype.altShiftActions[68]=
-"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,e,t,v){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var k=e.slice(),d=[],f=0;f<e.length;f++){var g=this.view.getState(e[f]),m=null!=g?g.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&d.push(b);a!=e[f]&&d.push(a);return a==e[f]||!this.model.isCollapsed(a)})),
+"selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,e,u,x){c=null!=c?c:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var k=e.slice(),d=[],f=0;f<e.length;f++){var g=this.view.getState(e[f]),m=null!=g?g.style:this.getCellStyle(e[f]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(e[f],!0,mxUtils.bind(this,function(a,b){null!=b&&d.push(b);a!=e[f]&&d.push(a);return a==e[f]||!this.model.isCollapsed(a)})),
 this.model.setCollapsed(e[f],a))}for(f=0;f<d.length;f++)this.model.setVisible(d[f],!a);e=k;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};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 b(a){return B.isVertex(a)&&e(a)}function c(a){var b=!1;null!=a&&(b=l.view.getState(a),b="1"==(null!=b?b.style:l.getCellStyle(a)).treeMoving);
-return b}function e(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function t(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function v(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
-a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function A(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=v(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||
-f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var n=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var p=l.getOutgoingEdges(l.model.getTerminal(c[0],
-!0));if(null!=p){for(var q=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=c=0;t<p.length;t++){var z=l.model.getTerminal(p[t],!1);if(f==v(z)){var u=l.view.getState(z);z!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY())&&mxUtils.intersects(n,u)&&(c=10+Math.max(c,(Math.min(n.x+n.width,u.x+u.width)-Math.max(n.x,u.x))/m),g=10+Math.max(g,(Math.min(n.y+n.height,u.y+u.height)-Math.max(n.y,u.y))/m))}}q?g=0:c=0;for(t=0;t<p.length;t++)if(z=l.model.getTerminal(p[t],
-!1),f==v(z)&&(u=l.view.getState(z),z!=a&&null!=u&&(q&&b!=u.getCenterX()<k.getCenterX()||!q&&b!=u.getCenterY()<k.getCenterY()))){var y=[];l.traverse(u.cell,!0,function(a,b){null!=b&&y.push(b);y.push(a);return!0});l.moveCells(y,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=v(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
+return b}function e(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),b="tree"==(null!=b?b.style:l.getCellStyle(a)).containerType);return b}function u(a){var b=!1;null!=a&&(a=B.getParent(a),b=l.view.getState(a),l.view.getState(a),b=null!=(null!=b?b.style:l.getCellStyle(a)).childLayout);return b}function x(a){a=l.view.getState(a);if(null!=a){var b=l.getIncomingEdges(a.cell);if(0<b.length&&(b=l.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==
+a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function A(a,b){b=null!=b?b:!0;l.model.beginUpdate();try{var d=l.model.getParent(a),c=l.getIncomingEdges(a),e=l.cloneCells([c[0],a]);l.model.setTerminal(e[0],l.model.getTerminal(c[0],!0),!0);var f=x(a),g=d.geometry;f==mxConstants.DIRECTION_SOUTH||
+f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+10:-e[1].geometry.height-10;l.view.currentRoot!=d&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=l.view.getState(a),m=l.view.scale;if(null!=k){var p=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?p.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*m:p.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*m;var n=l.getOutgoingEdges(l.model.getTerminal(c[0],
+!0));if(null!=n){for(var t=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=c=0;q<n.length;q++){var u=l.model.getTerminal(n[q],!1);if(f==x(u)){var z=l.view.getState(u);u!=a&&null!=z&&(t&&b!=z.getCenterX()<k.getCenterX()||!t&&b!=z.getCenterY()<k.getCenterY())&&mxUtils.intersects(p,z)&&(c=10+Math.max(c,(Math.min(p.x+p.width,z.x+z.width)-Math.max(p.x,z.x))/m),g=10+Math.max(g,(Math.min(p.y+p.height,z.y+z.height)-Math.max(p.y,z.y))/m))}}t?g=0:c=0;for(q=0;q<n.length;q++)if(u=l.model.getTerminal(n[q],
+!1),f==x(u)&&(z=l.view.getState(u),u!=a&&null!=z&&(t&&b!=z.getCenterX()<k.getCenterX()||!t&&b!=z.getCenterY()<k.getCenterY()))){var v=[];l.traverse(z.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});l.moveCells(v,(b?1:-1)*c,(b?1:-1)*g)}}}return l.addCells(e,d)}finally{l.model.endUpdate()}}function d(a){l.model.beginUpdate();try{var b=x(a),c=l.getIncomingEdges(a),d=l.cloneCells([c[0],a]);l.model.setTerminal(c[0],d[1],!1);l.model.setTerminal(d[0],d[1],!0);l.model.setTerminal(d[0],a,!1);
 var e=l.model.getParent(a),f=e.geometry,g=[];l.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);l.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,m=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,m=-m):b==mxConstants.DIRECTION_WEST?(k=-k,m=0):b==mxConstants.DIRECTION_EAST&&(m=0);l.moveCells(g,k,m);return l.addCells(d,e)}finally{l.model.endUpdate()}}function f(a){l.model.beginUpdate();try{var b=
-l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=l.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),n=v(a),p=l.view.translate,q=l.view.scale;n==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/q-p.x-e.x+10,c[1].geometry.y+=c[1].geometry.height-
-e.y+40):n==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/q-p.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height+e.y+40):(c[1].geometry.x=n==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width+e.x+40):c[1].geometry.x+(c[1].geometry.width-e.x+40),c[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(m.y+m.height)/q-p.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function g(a,
-b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=v(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&l.setSelectionCell(d[c].cell)))))}var n=this,l=n.editor.graph,B=l.getModel(),x=n.menus.createPopupMenu;
-n.menus.createPopupMenu=function(a,c,d){x.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&&
+l.model.getParent(a),d=l.getIncomingEdges(a),c=l.cloneCells([d[0],a]);l.model.setTerminal(c[0],a,!0);var d=l.getOutgoingEdges(a),e=b.geometry,f=[];l.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<d.length;g++){var k=l.model.getTerminal(d[g],!1);null!=k&&f.push(k)}var m=l.view.getBounds(f),p=x(a),n=l.view.translate,t=l.view.scale;p==mxConstants.DIRECTION_SOUTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/t-n.x-e.x+10,c[1].geometry.y+=c[1].geometry.height-
+e.y+40):p==mxConstants.DIRECTION_NORTH?(c[1].geometry.x=null==m?a.geometry.x+(a.geometry.width-c[1].geometry.width)/2:(m.x+m.width)/t-n.x+-e.x+10,c[1].geometry.y-=c[1].geometry.height+e.y+40):(c[1].geometry.x=p==mxConstants.DIRECTION_WEST?c[1].geometry.x-(c[1].geometry.width+e.x+40):c[1].geometry.x+(c[1].geometry.width-e.x+40),c[1].geometry.y=null==m?a.geometry.y+(a.geometry.height-c[1].geometry.height)/2:(m.y+m.height)/t-n.y+-e.y+10);return l.addCells(c,b)}finally{l.model.endUpdate()}}function g(a,
+b,c){a=l.getOutgoingEdges(a);c=l.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=l.view.getState(l.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=x(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?n.actions.get("selectParent").funct():c==b?(d=l.getOutgoingEdges(a),null!=d&&0<d.length&&l.setSelectionCell(l.model.getTerminal(d[0],!1))):(c=l.getIncomingEdges(a),null!=c&&0<c.length&&(d=g(l.model.getTerminal(c[0],!0),d,a),c=l.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&l.setSelectionCell(d[c].cell)))))}var n=this,l=n.editor.graph,B=l.getModel(),v=n.menus.createPopupMenu;
+n.menus.createPopupMenu=function(a,c,d){v.apply(this,arguments);if(1==l.getSelectionCount()){c=l.getSelectionCell();var e=l.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&(b(l.getSelectionCell())&&this.addMenuItems(a,["selectChildren"],null,d),this.addMenuItems(a,["selectDescendants"],null,d));b(l.getSelectionCell())&&(a.addSeparator(),0<l.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d))}};n.actions.addAction("selectChildren",function(){if(l.isEnabled()&&
 1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],!1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+X");n.actions.addAction("selectSiblings",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=l.getOutgoingEdges(l.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(l.model.getTerminal(a[c],
 !1));l.setSelectionCells(b)}}},null,null,"Alt+Shift+S");n.actions.addAction("selectParent",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),a=l.getIncomingEdges(a);null!=a&&0<a.length&&l.setSelectionCell(l.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");n.actions.addAction("selectDescendants",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var a=l.getSelectionCell(),b=[];l.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});l.setSelectionCells(b)}},
-null,null,"Alt+Shift+D");var u=l.removeCells;l.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var g=a[f];B.isEdge(g)&&e(g)&&(d.push(g),g=B.getTerminal(g,!1));if(b(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==l.getIncomingEdges(a).length)return k.push(a),!0;k=[];return!1});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(a[f]),a=a.concat(g))}else null!=
-g&&d.push(a[f])}a=d;return u.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var H=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=H.call(this,a,c);if(k.length==a.length)for(e=
-0;e<a.length;e++)if(b(a[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var n=this.cloneCell(g[0]);this.addEdge(n,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=l.moveCells;l.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),q=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(q,"treeFolding","0")){for(var t=0;t<a.length;t++)if(b(a[t])||
-l.model.isEdge(a[t])&&null==l.model.getTerminal(a[t],!0)){f=l.model.getParent(a[t]);break}if(null!=n&&f!=n&&null!=this.view.getState(a[0])){var u=l.getIncomingEdges(a[0]);if(0<u.length){var v=l.view.getState(l.model.getTerminal(u[0],!0));if(null!=v){var y=l.view.getState(n);null!=y&&(c=(y.getCenterX()-v.getCenterX())/l.view.scale,d=(y.getCenterY()-v.getCenterY())/l.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(t=0;t<m.length;t++)if(this.model.isEdge(m[t]))b(n)&&
-0>mxUtils.indexOf(m,this.model.getTerminal(m[t],!0))&&this.model.setTerminal(m[t],n,!0);else if(b(a[t])&&(u=l.getIncomingEdges(a[t]),0<u.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],n,!0);else if(0==l.getIncomingEdges(m[t]).length){p=n;if(null==p||p==l.model.getParent(a[t]))p=l.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,l.getDefaultParent(),p,m[t])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var F=n.sidebar.dropAndConnect;
-n.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},y=
+null,null,"Alt+Shift+D");var y=l.removeCells;l.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var d=[],f=0;f<a.length;f++){var g=a[f];B.isEdge(g)&&e(g)&&(d.push(g),g=B.getTerminal(g,!1));if(b(g)){var k=[];l.traverse(g,!0,function(a,b){null!=b&&k.push(b);if(1==l.getIncomingEdges(a).length)return k.push(a),!0;k=[];return!1});0<k.length&&(d=d.concat(k),g=l.getIncomingEdges(a[f]),a=a.concat(g))}else null!=
+g&&d.push(a[f])}a=d;return y.apply(this,arguments)};n.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:this.graph.view.getState(this.graph.getCellAt(c,d))};var H=l.duplicateCells;l.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=l.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=l.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=H.call(this,a,c);if(k.length==a.length)for(e=
+0;e<a.length;e++)if(b(a[e])){var m=l.getIncomingEdges(k[e]),g=l.getIncomingEdges(a[e]);if(0==m.length&&0<g.length){var p=this.cloneCell(g[0]);this.addEdge(p,l.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var z=l.moveCells;l.moveCells=function(a,c,d,e,f,g,k){var m=null;this.model.beginUpdate();try{var p=f,n=this.view.getState(f),t=null!=n?n.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(t,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||
+l.model.isEdge(a[q])&&null==l.model.getTerminal(a[q],!0)){f=l.model.getParent(a[q]);break}if(null!=p&&f!=p&&null!=this.view.getState(a[0])){var u=l.getIncomingEdges(a[0]);if(0<u.length){var v=l.view.getState(l.model.getTerminal(u[0],!0));if(null!=v){var x=l.view.getState(p);null!=x&&(c=(x.getCenterX()-v.getCenterX())/l.view.scale,d=(x.getCenterY()-v.getCenterY())/l.view.scale)}}}}m=z.apply(this,arguments);if(null!=m&&null!=a&&m.length==a.length)for(q=0;q<m.length;q++)if(this.model.isEdge(m[q]))b(p)&&
+0>mxUtils.indexOf(m,this.model.getTerminal(m[q],!0))&&this.model.setTerminal(m[q],p,!0);else if(b(a[q])&&(u=l.getIncomingEdges(a[q]),0<u.length))if(!e)b(p)&&0>mxUtils.indexOf(a,this.model.getTerminal(u[0],!0))&&this.model.setTerminal(u[0],p,!0);else if(0==l.getIncomingEdges(m[q]).length){n=p;if(null==n||n==l.model.getParent(a[q]))n=l.model.getTerminal(u[0],!0);e=this.cloneCell(u[0]);this.addEdge(e,l.getDefaultParent(),n,m[q])}}finally{this.model.endUpdate()}return m};if(null!=n.sidebar){var F=n.sidebar.dropAndConnect;
+n.sidebar.dropAndConnect=function(a,c,d,e){var f=l.model,g=null;f.beginUpdate();try{if(g=F.apply(this,arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var m=l.getCellGeometry(g[k]);m.points=null;null!=m.getTerminalPoint(!0)&&m.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g}}var C={88:n.actions.get("selectChildren"),84:n.actions.get("selectSubtree"),80:n.actions.get("selectParent"),83:n.actions.get("selectSiblings")},t=
 n.onKeyDown;n.onKeyDown=function(a){try{if(l.isEnabled()&&!l.isEditing()&&b(l.getSelectionCell())&&1==l.getSelectionCount()){var c=null;0<l.getIncomingEdges(l.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?d(l.getSelectionCell()):f(l.getSelectionCell()):13==a.which&&(c=A(l.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&l.model.isEdge(c[0])?l.setSelectionCell(l.model.getTerminal(c[0],!1)):l.setSelectionCell(c[c.length-1]),null!=n.hoverIcons&&n.hoverIcons.update(l.view.getState(l.getSelectionCell())),
 l.startEditingAtCell(l.getSelectionCell()),mxEvent.consume(a);else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=C[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(l.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(l.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(a))}}catch(Z){console.log("error",Z)}mxEvent.isConsumed(a)||y.apply(this,arguments)};var I=l.connectVertex;l.connectVertex=function(a,c,e,g,k,m){var n=l.getIncomingEdges(a);return b(a)&&0<n.length?(e=v(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):A(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):I.call(this,a,c,e,g,k,m)};l.getSubtree=function(a){var d=[a];!c(a)&&
-!b(a)||t(a)||l.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var d=this.graph.model.getParent(this.state.cell),d=this.graph.view.getState(d);(c(this.state.cell)||b(this.state.cell))&&(null==d||"flowLayout"!=d.style.childLayout)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),
+mxEvent.consume(a))}}catch(Z){console.log("error",Z)}mxEvent.isConsumed(a)||t.apply(this,arguments)};var I=l.connectVertex;l.connectVertex=function(a,c,e,g,k,m){var p=l.getIncomingEdges(a);return b(a)&&0<p.length?(e=x(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,k=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,e==c?f(a):g==k?d(a):A(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST)):I.call(this,a,c,e,g,k,m)};l.getSubtree=function(a){var d=[a];!c(a)&&
+!b(a)||u(a)||l.traverse(a,!0,function(a,b){null!=b&&0>mxUtils.indexOf(d,b)&&d.push(b);0>mxUtils.indexOf(d,a)&&d.push(a);return!0});return d};var M=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){M.apply(this,arguments);var d=this.graph.model.getParent(this.state.cell),d=this.graph.view.getState(d);(c(this.state.cell)||b(this.state.cell))&&(null==d||"flowLayout"!=d.style.childLayout)&&0<this.graph.getOutgoingEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(a),
 this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="18px",this.moveHandle.style.height="18px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(a){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(a),mxEvent.getClientY(a),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;
 this.graph.isMouseTrigger=mxEvent.isMouseEvent(a);this.graph.isMouseDown=!0;n.hoverIcons.reset();mxEvent.consume(a)})))};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.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 N=mxVertexHandler.prototype.setHandlesVisible;
 mxVertexHandler.prototype.setHandlesVisible=function(a){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=a?"":"none")};var D=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(a,b){D.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,
@@ -3554,8 +3556,8 @@ this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(
 mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="#ffffff"/>').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="#ffffff"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<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.prototype.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=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var m=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.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 t=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
-e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):t.apply(this,arguments)};var v=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){v.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px");m.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 u=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(a,b){null!=b.shortcut&&900>
+e&&!mxClient.IS_IOS?a.firstChild.nextSibling.setAttribute("title",b.shortcut):u.apply(this,arguments)};var x=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){x.apply(this,arguments);if(null!=this.userElement){var a=this.userElement;a.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+a.style.display;a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.userImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat=
 "no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px";a.style.cssFloat="right";a.setAttribute("title",mxResources.get("changeUser"));"none"!=a.style.display&&(a.style.display="inline-block")}};var A=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){A.apply(this,arguments);if(null!=this.shareButton){var a=this.shareButton;a.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";
 a.className="geToolbarButton";a.innerHTML="";a.style.backgroundImage="url("+Editor.shareImage+")";a.style.backgroundPosition="center center";a.style.backgroundRepeat="no-repeat";a.style.backgroundSize="24px 24px";a.style.height="24px";a.style.width="24px"}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer){var a=document.createElement("div");a.style.display="inline-block";a.style.position="relative";a.style.marginTop="8px";a.style.marginRight="4px";var b=document.createElement("a");
 b.className="geMenuItem gePrimaryBtn";b.style.marginLeft="8px";b.style.padding="6px";"1"==urlParams.noSaveBtn?(mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b)):(mxUtils.write(b,mxResources.get("save")),b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
@@ -3576,7 +3578,7 @@ c.menus.addMenuItems(a,["-","revisionHistory"],b)})));var e=this.get("exportAs")
 a,b);a.addSeparator(b);c.menus.addMenuItems(a,["scrollbars","tooltips","ruler"],b);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&c.menus.addMenuItems(a,["-","search","scratchpad","-","showStartScreen"],b);!c.isOfflineApp()&&isLocalStorage&&c.menus.addMenuItem(a,"plugins",b);a.addSeparator(b);c.menus.addMenuItem(a,"drawConfig",b);a.addSeparator(b)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"importText plantUml - formatSql importCsv - createShape editDiagram".split(" "),
 b)})));mxUtils.bind(this,function(){var a=this.get("insert"),b=a.funct;a.funct=function(a,d){b.apply(this,arguments);a.addSeparator(d);c.menus.addMenuItems(a,["-","toggleShapes"],d)}})();var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(a,b,d,e){a.addItem(d,null,mxUtils.bind(this,function(){var a=new CreateGraphDialog(c,d,e);c.showDialog(a.container,620,420,!0,!1);a.init()}),b)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(a,
 b){for(var c=0;c<g.length;c++)"-"==g[c]?a.addSeparator(b):k(a,b,mxResources.get(g[c])+"...",g[c])})));this.put("view",new Menu(mxUtils.bind(this,function(a,b){c.menus.addMenuItems(a,"grid guides ruler - connectionArrows connectionPoints -".split(" "),b);if("undefined"!==typeof MathJax){var d=c.menus.addMenuItem(a,"mathematicalTypesetting",b);c.menus.addLinkToItem(d,"https://desk.draw.io/support/solutions/articles/16000032875")}c.menus.addMenuItems(a,["copyConnect","collapseExpand","-","pageScale"],
-b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=t.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,
+b)})))};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a,b,c){var d=k.menus.get(a),e=u.addMenu(mxResources.get(a),mxUtils.bind(this,function(){d.funct.apply(this,arguments)}),q);e.className="geMenuItem";e.style.display="inline-block";e.style.boxSizing="border-box";e.style.top="6px";e.style.marginRight="6px";e.style.height="30px";e.style.paddingTop="6px";e.style.paddingBottom="6px";e.style.cursor="pointer";e.setAttribute("title",mxResources.get(a));k.menus.menuCreated(d,
 e,"geMenuItem");null!=c?(e.style.backgroundImage="url("+c+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="24px 24px",e.style.width="34px",e.innerHTML=""):b||(e.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",e.style.backgroundPosition="right 6px center",e.style.backgroundRepeat="no-repeat",e.style.paddingRight="22px");return e}function c(a,b,c,d,e,f){var g=document.createElement("a");g.className="geMenuItem";g.style.display=
 "inline-block";g.style.boxSizing="border-box";g.style.height="30px";g.style.padding="6px";g.style.position="relative";g.style.verticalAlign="top";g.style.top="0px";null!=k.statusContainer?p.insertBefore(g,k.statusContainer):p.appendChild(g);null!=f?(g.style.backgroundImage="url("+f+")",g.style.backgroundPosition="center center",g.style.backgroundRepeat="no-repeat",g.style.backgroundSize="24px 24px",g.style.width="34px"):mxUtils.write(g,a);mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",
 mxUtils.bind(this,function(a){a.preventDefault()}));mxEvent.addListener(g,"click",function(a){"disabled"!=g.getAttribute("disabled")&&b(a);mxEvent.consume(a)});null==c&&(g.style.marginRight="4px");null!=d&&g.setAttribute("title",d);null!=e&&(a=function(){e.isEnabled()?(g.removeAttribute("disabled"),g.style.cursor="pointer"):(g.setAttribute("disabled","disabled"),g.style.cursor="default")},e.addListener("stateChanged",a),a());return g}function d(a,b){var c=document.createElement("div");c.className=
@@ -3589,13 +3591,13 @@ b.funct,null,mxResources.get("redo")+" ("+b.shortcut+")",b,"data:image/svg+xml;b
 d([c("",function(){m.popupMenuHandler.hideMenu();var a=m.view.scale,b=m.view.translate.x,c=m.view.translate.y;k.actions.get("resetView").funct();1E-5>Math.abs(a-m.view.scale)&&b==m.view.translate.x&&c==m.view.translate.y&&k.actions.get(m.pageVisible?"fitPage":"fitWindow").funct()},!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",g,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMyA1djRoMlY1aDRWM0g1Yy0xLjEgMC0yIC45LTIgMnptMiAxMEgzdjRjMCAxLjEuOSAyIDIgMmg0di0ySDV2LTR6bTE0IDRoLTR2Mmg0YzEuMSAwIDItLjkgMi0ydi00aC0ydjR6bTAtMTZoLTR2Mmg0djRoMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg=="),
 640<=e?c("",b.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",b,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHptMi41LTRoLTJ2Mkg5di0ySDdWOWgyVjdoMXYyaDJ2MXoiLz48L3N2Zz4="):
 null,640<=e?c("",f.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",f,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTUuNSAxNGgtLjc5bC0uMjgtLjI3QzE1LjQxIDEyLjU5IDE2IDExLjExIDE2IDkuNSAxNiA1LjkxIDEzLjA5IDMgOS41IDNTMyA1LjkxIDMgOS41IDUuOTEgMTYgOS41IDE2YzEuNjEgMCAzLjA5LS41OSA0LjIzLTEuNTdsLjI3LjI4di43OWw1IDQuOTlMMjAuNDkgMTlsLTQuOTktNXptLTYgMEM3LjAxIDE0IDUgMTEuOTkgNSA5LjVTNy4wMSA1IDkuNSA1IDE0IDcuMDEgMTQgOS41IDExLjk5IDE0IDkuNSAxNHpNNyA5aDV2MUg3eiIvPjwvc3ZnPg=="):
-null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(f=t.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
+null],60)}b=k.menus.get("language");null!=b&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=e?(null==O&&(f=u.addMenu("",b.funct),f.setAttribute("title",mxResources.get("language")),f.className="geToolbarButton",f.style.backgroundImage="url("+Editor.globeImage+")",f.style.backgroundPosition="center center",f.style.backgroundRepeat="no-repeat",f.style.backgroundSize="24px 24px",f.style.position="absolute",f.style.height="24px",f.style.width="24px",f.style.zIndex="1",f.style.right="8px",f.style.cursor=
 "pointer",f.style.top="1"==urlParams.embed?"12px":"11px",p.appendChild(f),O=f),k.buttonContainer.style.paddingRight="34px"):(k.buttonContainer.style.paddingRight="4px",null!=O&&(O.parentNode.removeChild(O),O=null))}n.apply(this,arguments);var g=document.createElement("div");g.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";g.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(g);null==urlParams.clibs&&
-null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,t=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
-k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var v=k.descriptorChanged;k.descriptorChanged=function(){v.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
+null==urlParams.libs||b(this);var k=this,m=k.editor.graph;k.toolbar=this.createToolbar(k.createDiv("geToolbar"));k.defaultLibraryName=mxResources.get("untitledLibrary");var p=document.createElement("div");p.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;border-bottom:1px solid lightgray;background-color:#ffffff;text-align:left;white-space:nowrap;";var q=null,u=new Menubar(k,p);k.statusContainer=k.createStatusContainer();k.statusContainer.style.position="relative";
+k.statusContainer.style.maxWidth="";k.statusContainer.style.marginTop="7px";k.statusContainer.style.marginLeft="6px";k.statusContainer.style.color="gray";k.statusContainer.style.cursor="default";k.editor.addListener("statusChanged",mxUtils.bind(this,function(){k.setStatusText(k.editor.getStatus())}));var x=k.descriptorChanged;k.descriptorChanged=function(){x.apply(this,arguments);var a=k.getCurrentFile();if(null!=a&&null!=a.getTitle()){var b=a.getMode();"google"==b?b="googleDrive":"github"==b?b="gitHub":
 "gitlab"==b?b="gitLab":"onedrive"==b&&(b="oneDrive");b=mxResources.get(b);p.setAttribute("title",a.getTitle()+(null!=b?" ("+b+")":""))}else p.removeAttribute("title")};k.setStatusText(k.editor.getStatus());p.appendChild(k.statusContainer);k.buttonContainer=document.createElement("div");k.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";p.appendChild(k.buttonContainer);k.menubarContainer=k.buttonContainer;
 k.tabContainer=document.createElement("div");k.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;border-bottom:1px solid lightgray;background-color:#ffffff;border-top:1px solid lightgray;margin-bottom:-2px;visibility:hidden;";var g=k.diagramContainer.parentNode,A=document.createElement("div");A.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";k.diagramContainer.style.top="47px";var N=k.menus.get("viewZoom");
-if(null!=N){this.tabContainer.style.right="70px";var D=t.addMenu("100%",N.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";
+if(null!=N){this.tabContainer.style.right="70px";var D=u.addMenu("100%",N.funct);D.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");D.style.whiteSpace="nowrap";D.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";D.style.backgroundPosition="right 6px center";D.style.backgroundRepeat="no-repeat";D.style.backgroundColor="#ffffff";D.style.paddingRight="10px";D.style.display="block";D.style.position="absolute";D.style.textDecoration="none";D.style.textDecoration="none";
 D.style.right="0px";D.style.bottom="0px";D.style.overflow="hidden";D.style.visibility="hidden";D.style.textAlign="center";D.style.color="#000";D.style.fontSize="12px";D.style.color="#707070";D.style.width="59px";D.style.cursor="pointer";D.style.borderTop="1px solid lightgray";D.style.borderLeft="1px solid lightgray";D.style.height=parseInt(k.tabContainerHeight)-1+"px";D.style.lineHeight=parseInt(k.tabContainerHeight)+1+"px";A.appendChild(D);N=mxUtils.bind(this,function(){D.innerHTML=Math.round(100*
 k.editor.graph.view.scale)+"%"});k.editor.graph.view.addListener(mxEvent.EVENT_SCALE,N);k.editor.addListener("resetGraphView",N);k.editor.addListener("pageSelected",N);var E=k.setGraphEnabled;k.setGraphEnabled=function(){E.apply(this,arguments);null!=this.tabContainer&&(D.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}A.appendChild(k.tabContainer);A.appendChild(p);A.appendChild(k.diagramContainer);
 g.appendChild(A);k.updateTabContainer();var O=null;f();mxEvent.addListener(window,"resize",function(){f();null!=k.sidebarWindow&&k.sidebarWindow.window.fit();null!=k.formatWindow&&k.formatWindow.window.fit();null!=k.actions.outlineWindow&&k.actions.outlineWindow.window.fit();null!=k.actions.layersWindow&&k.actions.layersWindow.window.fit();null!=k.menus.tagsWindow&&k.menus.tagsWindow.window.fit();null!=k.menus.findWindow&&k.menus.findWindow.window.fit()})}}};
@@ -3624,19 +3626,19 @@ c)):new ResizeSensor(this.graph.container,c));if(this.graphConfig.resize||(this.
 "100%");var e=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>e)){var m=null;null!=e&&b.height+2*this.graph.border>e-2&&(m=(e-2*this.graph.border-2)/b.height);this.fitGraph(m)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),
 Math.floor(this.graph.border-b.y/this.graph.view.scale)),k=a.offsetWidth):this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(p,0):p();this.positionGraph=function(){b=this.graph.getGraphBounds();k=null;p()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
 GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],c=this.graphConfig.layerIds,k=null!=c&&0<c.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var t=p.getChildCount(p.root),v=0;v<t;v++)p.setVisible(p.getChildAt(p.root,v),null!=b?m.isVisible(m.getChildAt(m.root,v)):!1);if(null==m)if(k)for(v=0;v<c.length;v++)p.setVisible(p.getCell(c[v]),!0);else for(v=0;v<e.length;v++)p.setVisible(p.getChildAt(p.root,
-parseInt(e[v])),!0)}finally{p.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers,e=null!=e?e.split(" "):[],c=this.graphConfig.layerIds,k=null!=c&&0<c.length;if(0<e.length||k||null!=b){var m=null!=b?b.getModel():null,p=a.getModel();p.beginUpdate();try{for(var u=p.getChildCount(p.root),x=0;x<u;x++)p.setVisible(p.getChildAt(p.root,x),null!=b?m.isVisible(m.getChildAt(m.root,x)):!1);if(null==m)if(k)for(x=0;x<c.length;x++)p.setVisible(p.getCell(c[x]),!0);else for(x=0;x<e.length;x++)p.setVisible(p.getChildAt(p.root,
+parseInt(e[x])),!0)}finally{p.endUpdate()}}};
 GraphViewer.prototype.addToolbar=function(){function a(a,b,c,f){var g=document.createElement("div");g.style.borderRight="1px solid #d0d0d0";g.style.padding="3px 6px 3px 6px";mxEvent.addListener(g,"click",a);null!=c&&g.setAttribute("title",c);g.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==f||f?(mxEvent.addListener(g,"mouseenter",function(){g.style.backgroundColor="#ddd"}),mxEvent.addListener(g,"mouseleave",
 function(){g.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),g.style.cursor="pointer"):mxUtils.setOpacity(g,30);g.appendChild(a);e.appendChild(g);d++;return g}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 c=null,k=null,m=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);c=window.setTimeout(mxUtils.bind(this,
 function(){mxUtils.setOpacity(e,0);c=null;k=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";k=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=c&&(window.clearTimeout(c),fadeThead=null);null!=k&&(window.clearTimeout(k),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),m())}));mxEvent.addListener(e,mxClient.IS_POINTER?
-"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var t=this.graph,v=t.getTolerance();t.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
-this.scrollLeft=t.container.scrollLeft;this.scrollTop=t.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-t.container.scrollLeft)<v&&Math.abs(this.scrollTop-t.container.scrollTop)<v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var A=this.toolbarItems,d=0,f=null,g=null,q=0;q<A.length;q++){var n=A[q];if("pages"==n){g=b.ownerDocument.createElement("div");
+"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var u=this.graph,x=u.getTolerance();u.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();
+this.scrollLeft=u.container.scrollLeft;this.scrollTop=u.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-u.container.scrollLeft)<x&&Math.abs(this.scrollTop-u.container.scrollTop)<x&&Math.abs(this.startX-b.getGraphX())<x&&Math.abs(this.startY-b.getGraphY())<x&&(0<parseFloat(e.style.opacity||0)?m():p(30))}})}for(var A=this.toolbarItems,d=0,f=null,g=null,q=0;q<A.length;q++){var n=A[q];if("pages"==n){g=b.ownerDocument.createElement("div");
 g.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(g,70);var l=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");l.style.borderRightStyle="none";l.style.paddingLeft="0px";l.style.paddingRight="0px";e.appendChild(g);var B=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
 1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");B.style.paddingLeft="0px";B.style.paddingRight="0px";n=mxUtils.bind(this,function(){g.innerHTML="";mxUtils.write(g,this.currentPage+1+" / "+this.diagrams.length);g.style.display=1<this.diagrams.length?"inline-block":"none";l.style.display=g.style.display;B.style.display=g.style.display});this.addListener("graphChanged",n);n()}else if("zoom"==n)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var x=this.graph.getModel(),u=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
-f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=u.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
-"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");x.addListener(mxEvent.CHANGE,function(){u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"});u.style.display=1<x.getChildCount(x.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==n){if(this.layersEnabled){var v=this.graph.getModel(),y=a(mxUtils.bind(this,function(a){if(null!=f)f.parentNode.removeChild(f),
+f=null;else{f=this.graph.createLayersDialog();mxEvent.addListener(f,"mouseleave",function(){f.parentNode.removeChild(f);f=null});a=y.getBoundingClientRect();f.style.width="140px";f.style.padding="2px 0px 2px 0px";f.style.border="1px solid #d0d0d0";f.style.backgroundColor="#eee";f.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";f.style.fontSize="11px";f.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(f,80);var b=mxUtils.getDocumentScrollOrigin(document);f.style.left=b.x+a.left+
+"px";f.style.top=b.y+a.bottom+"px";document.body.appendChild(f)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){y.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});y.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==n?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(n=this.graphConfig["toolbar-buttons"][n],
 null!=n&&a(null==n.enabled||n.enabled?n.handler:function(){},n.image,n.title,n.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*d);null!=this.graphConfig.title&&(A=b.ownerDocument.createElement("div"),A.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;",A.setAttribute("title",this.graphConfig.title),mxUtils.write(A,this.graphConfig.title),mxUtils.setOpacity(A,
 70),e.appendChild(A));this.minToolbarWidth=34*d;var H=b.style.border,A=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 a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-
 c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==H&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=f&&(f.parentNode.removeChild(f),
@@ -3650,10 +3652,10 @@ GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScro
 var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.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";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 c=Graph.prototype.shadowId;Graph.prototype.shadowId=
 "lightboxDropShadow";var k=new EditorUi(new Editor(!0),document.createElement("div"),!0);k.editor.editBlankUrl=this.editBlankUrl;k.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=c;k.refresh=function(){};var m=mxUtils.bind(this,function(a){27==a.keyCode&&k.destroy()}),p=k.destroy;k.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",m);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=
-!0;p.apply(this,arguments)};var t=k.editor.graph,v=t.container;v.style.overflow="hidden";this.lightboxChrome?(v.style.border="1px solid #c0c0c0",v.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var A=this;t.getImageFromBundles=function(a){return A.getImageUrl(a)};var d=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return A.getImageUrl(a)};return a};
-this.graphConfig.move&&(t.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(v.style,"border-radius","4px"),v.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(v.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(v.style,"transition","all .25s ease-in-out"));this.addClickHandler(t,k);window.setTimeout(mxUtils.bind(this,function(){v.style.outline="none";
-v.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(v);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(v.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(v.style.position="absolute",v.style.display="block",v.style.left=
-a.x+"px",v.style.top=a.y+"px",v.style.width=document.body.clientWidth-80+"px",v.style.height=document.body.clientHeight-80+"px",v.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(t,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
+!0;p.apply(this,arguments)};var u=k.editor.graph,x=u.container;x.style.overflow="hidden";this.lightboxChrome?(x.style.border="1px solid #c0c0c0",x.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",m)):(b.style.display="none",e.style.display="none");var A=this;u.getImageFromBundles=function(a){return A.getImageUrl(a)};var d=k.createTemporaryGraph;k.createTemporaryGraph=function(){var a=d.apply(this,arguments);a.getImageFromBundles=function(a){return A.getImageUrl(a)};return a};
+this.graphConfig.move&&(u.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(x.style,"border-radius","4px"),x.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow="hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(x.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(x.style,"transition","all .25s ease-in-out"));this.addClickHandler(u,k);window.setTimeout(mxUtils.bind(this,function(){x.style.outline="none";
+x.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(x);document.body.appendChild(e);k.setFileData(this.xml);mxUtils.setPrefixedStyle(x.style,"transform","rotateY(0deg)");k.chromelessToolbar.style.bottom="60px";k.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(k.chromelessToolbar);k.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(x.style.position="absolute",x.style.display="block",x.style.left=
+a.x+"px",x.style.top=a.y+"px",x.style.width=document.body.clientWidth-80+"px",x.style.height=document.body.clientHeight-80+"px",x.style.backgroundColor="white",k.chromelessToolbar.style.display="block",k.chromelessToolbar.style.position="absolute",k.chromelessToolbar.style.bottom="",k.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");k.lightboxFit();k.chromelessResize();this.showLayers(u,this.graph);mxEvent.addListener(b,"click",function(){k.destroy()})}),0);return k};
 GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
 GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var c=document.getElementsByTagName("*"),b=[],e=0;e<c.length;e++){var k=c[e].className;null!=k&&0<k.length&&(k=k.split(" "),0<=mxUtils.indexOf(k,a)&&b.push(c[e]))}return b};
 GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var c=JSON.parse(e),k=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,c);null!=b&&b(e)};null!=c.url?GraphViewer.getUrl(c.url,function(a){k(a)}):k(c.xml)}};
@@ -3661,7 +3663,7 @@ GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type=
 GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var c=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;c.open("GET",a);c.onload=function(){b(null!=c.getText?c.getText():c.responseText)};c.onerror=e;c.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
 (function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,c){function k(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function m(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
 new k,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<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>';
-b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,t=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(t))};a(t);var v,z,A,C,y=function(){if((A=b.offsetWidth)!=v||(C=b.offsetHeight)!=z)p=!0,v=A,z=C;g()},I=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",y);I(f,"scroll",y)}var t=function(){GraphViewer.resizeSensorEnabled&&c()},v=Object.prototype.toString.call(e),A="[object Array]"===v||"[object NodeList]"===v||"[object HTMLCollection]"===v||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var v=0,d=e.length;v<d;v++)p(e[v],t);else p(e,t);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+b.appendChild(b.resizeSensor);"static"==m(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var p=!1,u=function(){b.resizedAttached&&(p&&(b.resizedAttached.call(),p=!1),a(u))};a(u);var x,z,A,C,t=function(){if((A=b.offsetWidth)!=x||(C=b.offsetHeight)!=z)p=!0,x=A,z=C;g()},I=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};I(d,"scroll",t);I(f,"scroll",t)}var u=function(){GraphViewer.resizeSensorEnabled&&c()},x=Object.prototype.toString.call(e),A="[object Array]"===x||"[object NodeList]"===x||"[object HTMLCollection]"===x||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(A)for(var x=0,d=e.length;x<d;x++)p(e[x],u);else p(e,u);this.detach=function(){if(A)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
 b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
 (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 5fa4831771f5d5453652cabe44db6f0e475baa5e..9b12318ce6307e7fd0e09f81889aff500940e7c6 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -6,11 +6,11 @@ if (workbox)
 	workbox.precaching.precacheAndRoute([
   {
     "url": "js/app.min.js",
-    "revision": "887b6bc2f181d2888215c8712415a3e7"
+    "revision": "980a618d19ca664cdf543f7e9da9fbef"
   },
   {
     "url": "js/extensions.min.js",
-    "revision": "205dd0e7a7fbd8cbcb7d0752de501b18"
+    "revision": "02e798ec6d2bc29c702e201dce553719"
   },
   {
     "url": "js/diagramly/ElectronApp.js",
@@ -406,7 +406,10 @@ if (workbox)
   }
 ],
 	{
-		// Ignore all URL parameters.
+		// Ignore all URL parameters
+		// FIXME: Using this /open redirects to /open.html so
+		// DO NOT use filenames matching servlet mappings!
+		// See https://github.com/GoogleChromeLabs/sw-precache#ignoreurlparametersmatching-arrayregex
 		ignoreURLParametersMatching: [/.*/]
 	});
 }